Skip to content

Latest commit

 

History

History
47 lines (43 loc) · 896 Bytes

README.MD

File metadata and controls

47 lines (43 loc) · 896 Bytes

使用方法

yarn add  -D eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-tsboot
// 。eslintrc.json
{
    "env": {
        "browser": false,
        "node": true,
        "commonjs": true,
        "es2021": true
    },
    "extends": [
        "eslint:recommended",
        "plugin:@typescript-eslint/eslint-recommended",
        "plugin:@typescript-eslint/recommended",
        "tsboot"
    ],
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
        "ecmaVersion": 12
    },
    "plugins": [
        "@typescript-eslint"
    ],
      "settings": {
        "import/resolver": {
          "node": {
            "extensions": [
              ".ts",
              ".js",
              ".json",
              ".node"
            ],
            "paths": [
              "src"
            ]
          }
        }
      }
}