- javascript
- typescript
- vue
- react
- json
- yaml
- sort
- prettier
pnpx @sujian/eslint-config
pnpm i @sujian/eslint-config -D
// file: eslint.config.js
import { defineConfig } from '@sujian/eslint-config'
export default defineConfig({
// ...options
})
Create .vscode/settings.json
{
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": [
"javascript",
"typescript",
"javascriptreact",
"typescriptreact",
"vue",
"json",
"jsonc",
"json5",
"yaml"
],
"eslint.experimental.useFlatConfig": true,
}
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}