TCS-11: Add eslint-plugin-no-barrel-files rule to react config#68
Open
brettcutt-aligent wants to merge 2 commits into
Open
TCS-11: Add eslint-plugin-no-barrel-files rule to react config#68brettcutt-aligent wants to merge 2 commits into
brettcutt-aligent wants to merge 2 commits into
Conversation
The repo's prettier.config.js is a deliberate two-line passthrough that imports prettierConfig from src and re-exports it as default. This is the recommended consumer pattern documented in the README, not a real barrel. Scope the override to prettier.config.js only so the rule still applies to every other file in this repo's self-lint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of the proposed changes
Adds
eslint-plugin-no-barrel-filesto the sharedreactESLint config so every consuming project picks up barrel-file enforcement without configuring it locally.Before: projects using
eslintConfigs.reacthad no rule against barrel files;export * from …and re-exports of imported variables were silently allowed.After: any such file errors with
no-barrel-files/no-barrel-files(Do not use export allorDo not re-export imported variable), via the plugin'sflat/recommendedconfig.Consumers should import from the source file directly instead:
Screenshots (if applicable)

Symlinked and tested on the Takeflight project
Other solutions considered (if any)
Notes to PR author
Notes to reviewers
ℹ️ When you've finished leaving feedback, please add a final comment to the PR tagging the author, letting them know that you have finished leaving feedback