使用 eslint 检查 TS 报错

Error: Error while loading rule '@typescript-eslint/no-implied-eval': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.

提示其实已经给的比较明显了,就是需要给 .eslintrc.js 文件中添加配置,

parserOptions: {
    "ecmaVersion": 2019,
    "sourceType": "module",
    "ecmaFeatures": true,
    project: './tsconfig.json',
    tsconfigRootDir: __dirname,
  },

你可能感兴趣的:(使用 eslint 检查 TS 报错)