11import path from 'node:path'
22
3- import { withoutProjectParserOptions } from '@typescript-eslint/typescript-estree'
3+ // import { withoutProjectParserOptions } from '@typescript-eslint/typescript-estree'
44import type { TSESLint , TSESTree } from '@typescript-eslint/utils'
55import debug from 'debug'
66
@@ -13,6 +13,19 @@ import type {
1313
1414import { moduleRequire } from './module-require'
1515
16+ // https://github.com/nuxt/eslint/issues/494
17+ function withoutProjectParserOptions (
18+ opts : TSESLint . ParserOptions ,
19+ ) : Exclude <
20+ TSESLint . ParserOptions ,
21+ 'EXPERIMENTAL_useProjectService' | 'project' | 'projectService'
22+ > {
23+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- The variables are meant to be omitted
24+ const { EXPERIMENTAL_useProjectService, project, projectService, ...rest } =
25+ opts
26+ return rest
27+ }
28+
1629const log = debug ( 'eslint-plugin-import-x:parse' )
1730
1831function keysFromParser (
@@ -90,9 +103,7 @@ export function parse(
90103 // "project" or "projects" in parserOptions. Removing these options means the parser will
91104 // only parse one file in isolate mode, which is much, much faster.
92105 // https://github.com/import-js/eslint-plugin-import/issues/1408#issuecomment-509298962
93- parserOptions = withoutProjectParserOptions (
94- parserOptions ,
95- ) as TSESLint . ParserOptions
106+ parserOptions = withoutProjectParserOptions ( parserOptions )
96107
97108 // require the parser relative to the main module (i.e., ESLint)
98109 const parser =
0 commit comments