eslint-config/README.md
2021-10-31 22:58:00 +08:00

632 B

@antfu/eslint-config

npm

Usage

Install

pnpm add -D eslint @antfu/eslint-config

Config .eslintrc

{
  "extends": [
    "@antfu"
  ]
}

Config .eslintignore

dist
public

Add script for package.json

For example:

{
  "scripts": {
    "lint": "eslint \"**/*.{vue,ts,js}\""
  }
}

Config VSCode auto fix

Create .vscode/settings.json

{
  "prettier.enable": false,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}