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

eslint: investigate eslint-plugin-import false negatives & eslint-plugin-import-x alternative #1273

Open
florian-sanders-cc opened this issue Dec 5, 2024 · 0 comments
Labels
maintenance Code refactoring, project structure, dev tooling (storybook, dev server, npm tasks...)

Comments

@florian-sanders-cc
Copy link
Contributor

Context

With #1141, we have moved to eslint 9.0 and we have disabled a few rules from the import plugin:

  • import/named which checks named imports,
  • import/no-unresolved which makes sure modules are resolved,
  • import/extensions which enforces extension usage for imports.

Some of these rules have been disabled because TypeScript already checks that but as pointed out by @Galimede, if we extract this config later on so that it can be used in any Clever Cloud JS project, we cannot rely on TypeScript only and maybe these rules should be enabled (or at least maybe we should provide a way to enable them).

The issue is that named and no-unresolved have been disabled because they also return false negatives.
I couldn't understand why, it might be related to some CJS vs ESM shenanigan.

We should take time to understand the issues with these rules and find the proper settings or investigate using the fork of this plugin (eslint-plugin-import-x) which may be more reliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Code refactoring, project structure, dev tooling (storybook, dev server, npm tasks...)
Projects
None yet
Development

No branches or pull requests

1 participant