-
-
Notifications
You must be signed in to change notification settings - Fork 472
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-plugin-import #1117
Comments
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@XantreGodlike To be honest I don't really get this rule, and there's so many issues with it https://github.com/search?q=repo%3Aimport-js%2Feslint-plugin-import+no-named-as-default&type=issues But for default exports, you may add a |
#1117 Code: https://github.com/import-js/eslint-plugin-import/blob/main/src/rules/no-named-as-default.js Tests: https://github.com/import-js/eslint-plugin-import/blob/main/tests/src/rules/no-named-as-default.js Docs: https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default.md
|
@yordis Is it separate rule? |
There is no |
The test cases |
Regarding |
I want to tackle the list of super slow rules that use
Wish me luck. |
To port the tests, we'll need to clone console.log("let pass = vec![" + valid.map((test) => `r#\"${test.code.trim()}\"#`).join(',\n') + "];\n")
console.log("let fail = vec![" + invalid.map((test) => `r#\"${test.code.trim()}\"#`).join(',\n') + "];") |
Great news) |
After battling cjs / esm for 3 days ... I'm going to cut the scope and focus on ESM only. i.e. Only lint if the imported file is a ESM file. Most of the rules are working as intended unless a CJS file is imported, which may contain any kind of bizarre export :-) Performance wise, we should expect import-plugin + all the other rules finish within a second on a M2. In a typical project with thousands of files:
|
Maybe a good addition: https://github.com/thepassle/barrel-begone |
Sharing some data on how much some ESLint rules take in the world. Would be nice to prioritise the slow ones
|
…oject#2109) oxc-project#1117 Code: https://github.com/import-js/eslint-plugin-import/blob/main/src/rules/no-named-as-default.js Tests: https://github.com/import-js/eslint-plugin-import/blob/main/tests/src/rules/no-named-as-default.js Docs: https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default.md
|
Not sure if that rule even belongs in a linter or if a separate tool like knip is a better idea: https://knip.dev/ |
|
Warning
This comment is maintained by CI. Do not edit this comment directly.
To update comment template, see https://github.com/oxc-project/oxc/tree/main/tasks/lint_rules
This is tracking issue for
eslint-plugin-import
.There are 44(+ 1 deprecated) rules.
To get started, run the following command:
Then register the rule in
crates/oxc_linter/src/rules.rs
and alsodeclare_all_lint_rules
at the bottom.Recommended rules
✨: 7, 🚫: 1 / total: 8
✨ = Implemented, 🚫 = No need to implement
Not recommended rules
✨: 12, 🚫: 0 / total: 36
✨ = Implemented, 🚫 = No need to implement
Deprecated rules
✨: 0, 🚫: 0 / total: 1
✨ = Implemented, 🚫 = No need to implement
The text was updated successfully, but these errors were encountered: