This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview of change:
As the
no-default-export
, the rule supposed to reduce usage of default imports/exports.New rule supposed to narrow the scope of your changes in the case of medium-sized (and bigger) projects. Say, you have 20 packages and every removed default export from utility package would lead to changes in each package, which might be harder to get merged by various reasons (harder to get your code approved due to a number of required reviewers; longer build time due to a number of affected packages). That's why "requires too many changes elsewhere" is a reason why I see
no-default-export
ignored so often.Unlike
no-default-export
, the rule requires you to make changes only in the package you work on and the package you import from (unless the member you try to import already exported as a named one).It has a config option where you have to specify a regexp for packages you own, imports from which are to be checked. By default it checks relative imports, presuming, you own these files.
CHANGELOG.md entry:
[new-rule]
no-default-import