eslint-config-typescript
eslint-config-typescript copied to clipboard
v11 error with typescript information
Hi there, v11 with typescript-eslint's type information rules does not work. I have confirmed that it works in v10.
$ npm run lint
> [email protected] lint
> eslint --ext .vue .
Oops! Something went wrong! :(
ESLint: 8.18.0
Error: Error while loading rule '@typescript-eslint/await-thenable': 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.
Occurred while linting <path/to>/eslint-config-typescript-1011/v11/src/App.vue
at Object.getParserServices (<path/to>/eslint-config-typescript-1011/v11/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js:16:15)
at create (<path/to>/eslint-config-typescript-1011/v11/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js:44:37)
at Object.create (<path/to>/eslint-config-typescript-1011/v11/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js:42:20)
at creatfollowingeRuleListeners (<path/to>/eslint-config-typescript-1011/v11/node_modules/eslint/lib/linter/linter.js:922:21)
at <path/to>/eslint-config-typescript-1011/v11/node_modules/eslint/lib/linter/linter.js:1104:110
at Array.forEach (<anonymous>)
at runRules (<path/to>/eslint-config-typescript-1011/v11/node_modules/eslint/lib/linter/linter.js:1041:34)
at Linter._verifyWithoutProcessors (<path/to>/eslint-config-typescript-1011/v11/node_modules/eslint/lib/linter/linter.js:1389:31)
at <path/to>/eslint-config-typescript-1011/v11/node_modules/eslint/lib/linter/linter.js:1798:29
at Array.map (<anonymous>)
I made the repro env here: https://github.com/koooge/eslint-config-typescript-1011
It's the same as https://github.com/vuejs/vue-eslint-parser/issues/156
I fixed my error by setting the parserOptions.parser
inside the .eslintrc.js
:
parserOptions: {
parser: '@typescript-eslint/parser'
},