@wmm387/eslint-config
v0.0.5
Published
Zero's ESLint config
Downloads
3
Readme
@wmm387/eslint-config
- extend @antfu/eslint-config
- add my own rules
Usage
Install
pnpm add -D eslint @wmm387/eslint-config
Config .eslintrc
{
"extends": "@wmm387"
}
You don't need
.eslintignore
normally as it has been provided by the preset.
Add script for package.json
For example:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
VS Code support (auto fix)
Install VS Code ESLint extension
Add the following settings to your settings.json
:
{
"prettier.enable": false,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": false
},
// The following is optional.
// It's better to put under project setting `.vscode/settings.json`
// to avoid conflicts with working with different eslint configs
// that does not support all formats.
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
]
}