eslint-config-firstvet v8.0.0
FirstVet ESLint Rules
From your repository, run
npx install-peerdeps -D eslint-config-firstvet. Requires npm 5+.Create
.eslintrc.jsonin your root and paste one of the following:
JS
{
"extends": ["firstvet"]
}JS + Vue
{
"extends": ["firstvet/vue"]
}Setup autoformatting on save for VS Code users:
Install VS Code plugin ESLint.
Open your
settings.jsonin VS Code and add/edit the following:
// Turn editor formatting since we will do this via ESLint.
"[javascript]": {
"editor.formatOnSave": false,
"editor.formatOnPaste": false,
},
"[json]": {
"editor.formatOnSave": false,
"editor.formatOnPaste": false,
},
"[vue]": {
"editor.formatOnSave": false,
"editor.formatOnPaste": false,
},
"[typescript]": {
"editor.formatOnSave": false,
"editor.formatOnPaste": false,
},
// Tell the ESLint plugin to run on save.
"eslint.validate": ["javascript", "json", "vue", "typescript"],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
// Turn off prettier formatting (if previously installed).
"prettier.disableLanguages": ["javascript", "json", "vue", "typescript"],
"path-intellisense.mappings": {
"@": "${workspaceRoot}/src"
}Note
There is an issue with VSCode and autoformatting on subdirectories. If the linting rules are used in a subdirectory you will need to open that directory as the "project root" in VSCode for it to work. See thread on StackOverflow.
9 months ago
1 year ago
2 years ago
2 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago