IDE Support
VSCode
- Install VS Code ESLint extension
- Add the following settings to your project setting
.vscode/settings.json
:
{ // Enable the ESlint flat config support "eslint.useFlatConfig": true, "eslint.runtime": "node",
// Disable the default formatter, use eslint instead "prettier.enable": false,
// Auto fix "editor.formatOnSave": false, "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit", "source.organizeImports": "never" },
// Enable eslint for supported languages "eslint.validate": [ "javascript", "javascriptreact", "typescript", "typescriptreact", // "astro", // "svelte", // "vue", ]}
JetBrains IDEs
- Open the Settings dialog
- Go to
Languages & Frameworks -> JavaScript -> Code Quality Tools -> ESLint
- Select the
Run eslint --fix on save
checkbox.
Refer to JetBrains Docs