Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v11 error with typescript information #43

Open
koooge opened this issue Jun 18, 2022 · 2 comments
Open

v11 error with typescript information #43

koooge opened this issue Jun 18, 2022 · 2 comments

Comments

@koooge
Copy link
Contributor

koooge commented Jun 18, 2022

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

@koooge koooge changed the title v11 shows with typescript information v11 error with typescript information Jun 18, 2022
@koooge
Copy link
Contributor Author

koooge commented Jun 18, 2022

It's the same as vuejs/vue-eslint-parser#156

@freakzlike
Copy link

I fixed my error by setting the parserOptions.parser inside the .eslintrc.js:

parserOptions: {
  parser: '@typescript-eslint/parser'
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants