TypeScript

[ERROR] eslint // You have used a rule which requires parserServices to be generated

sungtt 2022. 8. 23. 16:24

오류 내용

Error while loading rule '@typescript-eslint/dot-notation': 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

 

해결 방법

eslintrc의 parserOptions에

project: './tsconfig.json', 추가

  parserOptions: {
    project: './tsconfig.json', // 추가
    ecmaVersion: 'latest',
    sourceType: 'module',
  },