1.4.3 • Published 4 years ago
@pixellot/eslint-plugin v1.4.3
eslint-plugin-pixellot
Plugin used by Pixellot company
Installation
Install @pixellot/eslint-plugin:
npm install @pixellot/eslint-plugin --save-devNOTE: You'll need npm 7 and above to install this plugin.
Usage (one time per repo)
- Install the plugin as explained above
- Add
@pixellotto the plugins section of your.eslintrcconfiguration file, then choose the configuration you wish (e.g:cloudInfra):
{
"plugins": [
"@pixellot"
],
"extends": ["plugin:@pixellot/cloudInfra"]
}- Add
.eslintignorefile to indicate ESLint to skip these files/folders (add others, if needed):
node_modules
coverage- Add the eslint to the
.dockerignore
.eslintrc.js
.eslintignore- Add the following to the
scriptsproperty in thepackage.jsonfile:
"lint": "eslint .",
"lint:fix": "eslint . --fix"NOTE: You can now run
npm run lintandnpm run lint:fixto run the linter on all files / fix them accordingly. 6. Add the lint validation to the CI. You can use thenpm run lintmentioned above.
Configurations
cloudInfra
Used by the cloud infra team.
Based on airbnb-base, eslint:recommended and jest, and some rule tweaks
VSCode Integration
To use eslint with the VSCode IDE:
1. Install the ESLint VSCode extension
2. In VSCode menu choose: File->Preferences->Settings
3. Add the following to the User settings and save:
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.format.enable": true,
"editor.formatOnSave": true,
"editor.formatOnType": trueNOTE: Use: VSCode >= 1.63.2, ESLint Extension >= 2.2.2