Comments (11)
Hard to say much of anything without some information. Would need a repro to be able to provide any advice.
Though the reported error message isn't one of ours.
from eslint-plugin-import.
We don't yet support v6 of the TS eslint parser (meaning, we don't test on it).
from eslint-plugin-import.
Do you have any plans?
from eslint-plugin-import.
I believe @bradzacher is more suitable to answer the question.
from eslint-plugin-import.
I suspect this error comes from tsconfig-paths; itβs not one of ours either.
from eslint-plugin-import.
Reproduce repo
This is a cleaned up version of our config.
Before the update to typescript-eslint/parser@6, everything worked fine.
If I comment these lines eslint-module-utils/parser.js
delete parserOptions.EXPERIMENTAL_useProjectService;
delete parserOptions.project;
delete parserOptions.projects;
Everything also worked fine.
from eslint-plugin-import.
To fix this, we'll need to start testing on v6 of the TS eslint parser.
from eslint-plugin-import.
errorOnTypeScriptSyntacticAndSemanticIssues: true,
I had forgotten that even existed. I didn't know people used it - it's literally tge first time I've ever seen it used.
Turn that off and it'll work.
from eslint-plugin-import.
This is a common standard for our company, I'll ask if we can disable it.
But in any case, do you think this is normal behavior?
from eslint-plugin-import.
Yes. The behaviour of deleting the parser options is intended (and implemented by me).
eslint-plugin-import
does its own out-of-band parsing so it can analyse exports of dependencies. To do this is uses your configured parser.
If we leave those parser options behind then it means that when import/
attempts to parse a dependency it will cause our parser to attempt to do a type-aware parse. If the file isn't part of a project (eg it's in node_modules
) then this causes REALLY REALLY REALLY BAD BEHAVIOUR such as crashes or CRAZY BAD slowness (as you noted - #1408)
When I added those deletes 5 years ago I didn't remember errorOnTypeScriptSyntacticAndSemanticIssues
existed.
In v6 we changed the underlying infra so that that option requires type information.
It's an undocumented parser option and shouldn't actually work within eslint anyways. We'll look at removing it entirely (filed typescript-eslint/typescript-eslint#8681).
You should delete it from your eslint config.
from eslint-plugin-import.
Got it, thanks!
from eslint-plugin-import.
Related Issues (20)
- Is this parsing the entire node_modules? HOT 3
- no-unused-modules: ignore imports in files listed in ignoreExports HOT 7
- Improve the way to find tsconfig.json HOT 2
- Does a resolver have to be cjs? HOT 1
- [spam] HOT 1
- core modules docs are misleading HOT 1
- import/order Issue: Inconsistency of sorting, presumably because of different operating systems HOT 4
- [import/no-duplicates] Autofix merges imports incorrectly - single index.d.ts but multiple modules HOT 2
- "import/internal-regex" monorepo package are ignored HOT 2
- 'TypeError: context.getAncestors is not a function' with ESLint v9 HOT 3
- `no-extraneous-dependencies` requeres restarting eslint server in vscode when adding new dependencies HOT 1
- [spam] HOT 5
- Incorrect behavior of import/order in a monorepo setup - using internal package in workspace HOT 4
- Compatibility with ESLint 9.x HOT 2
- Sort custom Path to add newlines-between HOT 1
- ESLint: Parse errors in imported module 'foo': parserPath or languageOptions.parser is required! (undefined:undefined)(import/namespace) HOT 1
- fix long imports by exchanging with alias/paths from tsconfig HOT 1
- Unexpected token when running tests with nyc HOT 3
- arbitrary-module-namespace-identifier is showing an error in tests HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-import.