美文网首页
使用 eslint 检查 TS 报错

使用 eslint 检查 TS 报错

作者: 美食家儿菜 | 来源:发表于2020-04-28 15:42 被阅读0次

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 报错

      本文链接:https://www.haomeiwen.com/subject/qbzvwhtx.html