- Flat config, ESLint 9
- JavaScript and TypeScript configs
- Vue.js config (TS)
- Node.js
- Codestyle config
- JSDoc configs for JS and TS
- Global variables list
- Gitignore support
Add package to your dev-dependencies using npm or yarn:
yarn add -D eslint-config-codex eslint
Add following lines to your eslint.config.mjs
:
import CodeX from 'eslint-config-codex'
export default [
...CodeX,
// your customization
]
Open Code
/ Settings
, find "Open Settings (JSON)" icon at the top-bar
Then fill opened .vscode/settings.json
:
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"typescript",
"vue",
"html",
]
Since 7.x ESLint loads plugins from the location of each config file which has the plugins
field. Resolve this issue by adding the root flag to your .eslintrc
config
{
"root": true
}