Sungtt

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

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',
  },

'TypeScript' 카테고리의 다른 글

[TypeScript] Object is possibly 'null'  (0) 2022.05.23
[TypeScript] interface와 Type Alias의 차이  (0) 2022.05.09
[TypeScript] 기본 타입  (0) 2022.05.08
[TypeScript] 타입스크립트란..?  (0) 2022.03.26
Comments