Skip to content
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()' expressions are not supported yet inconsistency #349

Open
electriquo opened this issue Mar 11, 2023 · 5 comments
Open

'import()' expressions are not supported yet inconsistency #349

electriquo opened this issue Mar 11, 2023 · 5 comments

Comments

@electriquo
Copy link

When running ESLint, I get

error  'import()' expressions are not supported yet  node/no-unsupported-features/es-syntax

Where import() is compatible since Node.js 13.2.0 and I am using Node.js 18.15.0

$ cat package.json | jq '.engines'
{
  "node": ">=18.15.0",
  "npm": ">=9.6.0"
}

The error seems to be false negative.
Is this a bug or did is my configuration the issue?

@robatwilliams
Copy link

I have what seems to be the same issue - "Import and export declarations are not supported yet". Using v11.1.1 of this plugin.

Engines is "node": "^14.18.0 || >=16.0.0".

Even if I put an override comment at the top of a specific file to configure the version, I still get the error.

@robatwilliams
Copy link

robatwilliams commented May 12, 2023

There's a big map of features and versions supported since here. There is null in it for this particular feature.

https://github.com/mysticatea/eslint-plugin-node/blob/master/lib/rules/no-unsupported-features.js#L263

The message I'm getting though is "Import and export declarations are not supported yet", which comes from here https://github.com/mysticatea/eslint-plugin-node/blob/master/lib/rules/no-unsupported-features/es-syntax.js#L577. no-modules is an es-plugin-es feature by the same maintainer.

@voxpelli
Copy link

eslint-plugin-n is the maintained version of this module.

We switched to it in eg. eslint-config-standard / standard and it is maintained by me and other members of the official ESLint community organization.

@electriquo
Copy link
Author

eslint-plugin-n is the maintained version of this module.

@voxpelli do you mean that eslint-plugin-n should be used instead of eslint-plugin-node?

@voxpelli
Copy link

voxpelli commented Aug 15, 2023

@foolioo exactly 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants