ESLint Typescript shareable config for OpenCover's coding style
Make sure you have already installed
eslint
andtypescript
as they are required packages.
yarn add -D eslint-config-opencover
Then, add this to your .eslintrc.js
:
module.exports = {
extends: "@opencover/eslint-config-opencover",
rules: {
// your overrides
},
};
Adjust your .eslintrc.js
like this:
module.exports = {
extends: "@opencover/eslint-config-opencover/with-react",
rules: {
// your overrides
},
};
*.css
*.svg
{
"printWidth": 100,
"trailingComma": "es5",
"tabWidth": 4,
"semi": true,
"singleQuote": true
}
If you are using vscode this .vscode/settings.json
file may come in handy:
{
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true,
"eslint.alwaysShowStatus": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.rulers": [100]
}