Open Xunnamius opened 3 days ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.23%. Comparing base (
a20d843
) to head (1c127b7
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚨 Try these New Features:
I already use
import/order
with custompathGroups
. This allows me to control the grouping of certain paths, such as custom aliases fromtsconfig.json
'spaths
. This in turn ensures all imports are sorted properly, even when the project is using syntactically sound but otherwise bespoke custom aliases likemy-project:api.js
(in lieu of../../../../src/api.js
).Unfortunately, if I mistype
my-project:api
(i.e. I forgot the extension), theimport/extensions
rule will still pass; the enforcement decision is "ignore" when it should have been "enforce". This is because, likeimport/order
, the grouping strategy employed by this rule is quite coarse-grained, but unlikeimport/order
, this rule is missing apathGroups
-like setting for finer-grained sorting. The goal of this PR is to fill that gap.This PR allows developers to override the decision to enforce or ignore extensions for imports with matching specifiers. This is implemented via
pathGroupOverrides
.The documentation updates associated with the changes in this PR are part of a separate PR and can be previewed here (towards the bottom of the section). This PR also includes tests.