In my eslintrc.js I have a.o:
extends: [
'plugin:react/recommended',
'airbnb',
'airbnb/hooks',
'plugin:jsx-a11y/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
],
globals: {
__PATH_PREFIX__: true,
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
ecmaFeatures: {
jsx: true,
typescript: true,
tsx: true,
},
},
In the root of my Gatsby project I have gatsby-config.js
and gatsby-config.js
. In the beginning of the file I get a ESLint
linting error:
Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser. The file does not match your project config: gatsby-config.js. The file must be included in at least one of the projects provided.eslint
How do I solve this?