npm i @alexlit/config-eslint -D
// .eslintrc.js
module.exports = {
extends: ['./node_modules/@alexlit/config-eslint'],
};
-
If you use vue.js with
options api
syntax you need to turn offsort-keys
rule for*.vue
files// .eslintrc.js overrides: [ { files: ['*.vue'], rules: { 'sort-keys': 'off', }, }, ];
-
Skip some words
// .eslintrc.js const SPELLCHECK_RULES = require('@alexlit/config-eslint/plugins/spellcheck') .rules['spellcheck/spell-checker'][1]; module.exports = { rules: { 'spellcheck/spell-checker': [ 'warn', { ...SPELLCHECK_RULES, skipWords: [...SPELLCHECK_RULES.skipWords, 'word1', 'word2'], }, ], }, };
-
Disable spell checking
// .eslintrc.js module.exports = { rules: { 'spellcheck/spell-checker': 'off', }, };