eslint-plugin-import
eslint-plugin-import copied to clipboard
[Fix] `order`: codify invariants from docs into config schema
Updating schema wrt https://github.com/import-js/eslint-plugin-import/pull/3127#discussion_r1926534364
EDIT: depends on #3129 for its added tests
This PR seems to have too much stuff in it - but either way, if a rule or option is already released, its schema can’t be tightened further.
@ljharb It seems like it has a lot because it's on top of the consolidateIslands PR (rather than main so the schema changes can run against the latest tests), but the two new commits are tiny and only touch the schema and two tests. I can pull the lines around dependencies/consolidateIslands one commit up into the consolidateIslands PR if desired :)
EDIT: I can also rebase onto main and decouple from the other PRs, but not hitting all the new tests plus no direct tests of the schema makes me a bit nervous.
As for the tightening of existing options, I assume you're talking about lines 865 and 866 for pathGroupsExcludedImportTypes? I can revert those. I did add a comment to the groups schema warning that additional validation happens elsewhere, and added two newlines to the named schema for consistency, but those changes should be just cosmetic.
In that case, I'll wait to review this since it needs to wait on #3129
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.63%. Comparing base (
4f145a2) to head (a73a2f2). Report is 2 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #3152 +/- ##
==========================================
+ Coverage 95.17% 95.63% +0.45%
==========================================
Files 83 83
Lines 3688 3687 -1
Branches 1331 1330 -1
==========================================
+ Hits 3510 3526 +16
+ Misses 178 161 -17
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
I just rebased this, and took a look - can you remind me why removing tests isn't a breaking change?
IIRC, those tests were removed because the validation code they were testing was removed (at your request), because we're relying on eslint and json schema for validation previously provided by that code.
The error messages will change to eslint's.
Perfect, thank you :-)