-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Environment
Node version: v22.15.0
npm version: v11.3.0
Local ESLint version: v9.27.0 (Currently used)
Global ESLint version: Not found
Operating System: linux 5.15.167.4-microsoft-standard-WSL2
What parser are you using?
Default (Espree)
What did you do?
I have installed some plugins and configured ESLint to use them. ESLint works fine, but TypeScript throws some type errors related to exactOptionalPropertyTypes, which I have set to true in my tsconfig.json since I'm extending from @tsconfig/strictest.
What did you expect to happen?
There should be no type errors when using exactOptionalPropertyTypes.
What actually happened?
Type errors occurred.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/vitejs-vite-gantpukn?file=eslint.config.mjs,tsconfig.json&view=editor
Participation
- I am willing to submit a pull request for this issue.
Additional comments
I have 2 reproductions:
- https://stackblitz.com/edit/vitejs-vite-gantpukn?file=eslint.config.mjs,tsconfig.json&view=editor: Contains a minimal reproducible example. It reproduces the error using a single plugin
@eslint/markdown. - https://stackblitz.com/edit/stackblitz-starters-rh2kntpu?file=eslint.config.mjs,tsconfig.config.json&view=editor: This is the configuration where I experienced the issue. It makes use of many plugins, so there are more type errors. You may notice that
eslintdoes not work in this repro. This is because npm fails to installeslint-import-resolver-typescript, which requires native modules. It works if you download the code and run it locally. You can also make it work by force installing@unrs/resolver-binding-wasm32-wasias suggested in Failed to load native bindings on linux x64 platform import-js/eslint-import-resolver-typescript#431. I did not do this because it breaksnpm iand I did not want to break the repo.
According to @nzakas: "The Plugin type exported from eslint is the thing that needs updating to address this." (#391 (comment))
Metadata
Metadata
Assignees
Labels
Type
Projects
Status