iamturns / eslint-config-airbnb-typescript

Airbnb's ESLint config with TypeScript support
MIT License
1.04k stars 87 forks source link

"The file must be included in at least one of the projects provided" even after using tsconfig.eslint.json trick #199

Open SwiftWinds opened 3 years ago

SwiftWinds commented 3 years ago

Here's my .eslintrc.js:

module.exports = {
  parser: '@typescript-eslint/parser', // add the TypeScript parser
  parserOptions: { project: './tsconfig.eslint.json' },
  plugins: [
    'svelte3',
    '@typescript-eslint', // add the TypeScript plugin
  ],
  extends: 'airbnb-typescript/base',
  overrides: [ // this stays the same
    {
      files: ['*.svelte'],
      processor: 'svelte3/svelte3',
    },
  ],
  rules: {
    // ...
  },
  settings: {
    'svelte3/typescript': require('typescript'), // pass the TypeScript package to the Svelte plugin
    // ...
  },
};

my tsconfig.eslint.json:

{
  "extends": "./tsconfig.json",
  "include": ["**/*.{js,json,ts,svelte}"]
}

my tsconfig.json:

{
  "extends": "@tsconfig/svelte/tsconfig.json",

  "include": ["src/**/*"],
  "exclude": ["node_modules/*", "__sapper__/*", "public/*"]
}

However, when I open any file, such as src/main.ts, ESLint complains that "The file must be included in at least one of the projects provided." Could you please offer any suggestion as to why this is happening? Any help would be greatly appreciated! :)

abhisheksett commented 3 years ago

Facing the same issue with React project

Avivhdr commented 2 years ago

Same here