TCS-11: Add eslint-plugin-no-barrel-files rule to react config#68
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.
kai-nguyen-aligent
left a comment
There was a problem hiding this comment.
LGTM. However, is there any reason not to apply this to the base config also?
@nettree the scope of the task is to apply the rule to react, but should we instead apply it to the base? |
Sure @brettcutt-aligent If @kai-nguyen-aligent and @aligent-lturner agree with this rule to be applied to all our TS projects then I'm happy with it |
Fine with me |
|
@brettcutt-aligent let's move this to base :) |
|
Awesome, let's go :) |
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