-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import/namespace
failures when importing chai@5
#2949
Comments
What’s your eslint config? A parse error is not expected. |
env:
browser: true
es6: true
extends:
- xo
- plugin:import/recommended
parserOptions:
ecmaVersion: 2021
sourceType: module
plugins:
- import
- redos
rules:
arrow-parens: 0
object-curly-spacing: 0
import/no-unresolved: [2]
redos/no-vulnerable: error
overrides:
- files:
- "**/*.spec.js"
rules:
redos/no-vulnerable: 'off' |
(fwiw i would advise against using any "recommended" configs; use the airbnb config for the best settings for this plugin) Is there any way you could make a repro repo for this? I don't see anything in https://unpkg.com/browse/chai@5.0.0/lib/chai/interface/expect.js that should fail to parse, but with a repro i can debug it locally. |
Interesting - thanks. Does the README need to be updated to advise this? I will prepare a repro for this later. |
Yes, it probably should be, I'll get on that. |
I get this same error when attempting to import |
Upgrading from chai v4 to chai v5 yields the following eslint error:
The line of code in question is as follows:
For now I have added an ignore annotation to my code so that the linting passes, but it would be good to know why the
import/namespace
rule has started to fail with this new, ESM-only, version of chai.Thank you 😸
The text was updated successfully, but these errors were encountered: