eslint-config-varp-common
v2.2.0
Published
Common ESLint Rules by Varp
Downloads
89
Maintainers
Readme
eslint-config-varp-common
Go in
Setup
- Install with peer dependencies:
npm install -D eslint-config-varp-common
- Create
.prettierrc.js
file with content:
module.exports = {
/* Rrettier rules */
};
- Create
.eslintrc.js
file with content:
module.exports = {
extends: ["varp-common"],
rules: {
/* Eslint rules */
}
};
- Add
.vscode/settings.json
file with content:
{
"editor.tabSize": 2,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"eslint.format.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
"eslint.validate": ["typescript", "typescriptreact", "javascript", "javascriptreact", "markdown", "json"],
}
- Add new scripts to package.json:
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
User cases
Override rules
- Create file in selected folder:
.eslintrc.js
- Add content:
module.exports = {
extends: '../.eslintrc.js',
rules: {
/* Overridden rules */
}
};
Ignore path
- Create file:
.eslintignore
- Add content:
disc