eslint-config-adam-demirel
v1.0.3
Published
My favourite eslint rules
Downloads
3
Readme
adams-eslint-config
- My favourite ESlint rules
Usage
In eslintrc file of project:
"extends": "adam-demirel"
or "eslint-config-adam-demirel" for standard JS linting rules"extends": "adam-demirel/react"
or "eslint-config-adam-demirel/react for react linting rules
Example .eslintrc.js
:
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'adam-demirel',
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
};
Recommended VScode settings
In CLI:
$ code --install-extension dbaeumer.vscode-eslint
to installdbaeumer.vscode-eslint
extension (make sure it's enabled)In VScodes
settings.json
(cmd+p + "Preferences: Open Settings (JSON)"):
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
},
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
- This formats linting rules on save
NPM helper commands
$ npm version <patch|minor|major>
(required for new publish)$ npm publish