Stickee settings for ESlint
- Lints JavaScript based on the latest standards
- Removes 99.99% of the problems QA finds with your JavaScript code*
*no refunds
`npx stickee-javascript-code-style'
- If you don't already have a
package.json
create one withnpm init
- Install the peer dependencies of the config
npx install-peerdeps --dev @stickee/eslint-config
- Admire all the new devDependencies you have
- Create an
.eslintrc.json
file in the root of your project's directory{ "extends": [ "@stickee" ], }
- Add a lint script into your
package.json
:"scripts": { "lint": "eslint .", "lint:fix": "eslint . --fix" }
- Write beautiful JavaScript that makes QA proud
You can override any of the settings:
{
"extends": [
"@stickee"
],
"rules": {
"no-console": 2
}
}
ESLint should be configured to run as a pre-commit hook on the project you're working on but there's no harm in running it on every save.
Refer to the docs for instructions on running ESLint from PHPStorm.
- Install the ESLint package
- Change your VSCode
settings.json
file:// These are all my auto-save configs "editor.formatOnSave": true, // turn it off for JS and JSX, we will do this via eslint "[javascript]": { "editor.formatOnSave": false }, "[javascriptreact]": { "editor.formatOnSave": false }, // tell the ESLint plugin to run on save "eslint.autoFixOnSave": true,