Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand @fluentui/react root index file's export *s to uncover and fix duplicate exports. #25545

Merged
merged 6 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Updating react-legacy linting to warn on export star usage.",
"packageName": "@fluentui/eslint-plugin",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "This change removes top-level export * from the index.js of @fluentui/react, which was implicitly exporting duplicates of symbols. Changing to explicit exports means that the export * as the top level barrel file can't introduce duplicate names. This works around an issue identified in esbuild: https://github.com/evanw/esbuild/issues/2658",
"packageName": "@fluentui/react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
9 changes: 9 additions & 0 deletions packages/eslint-plugin/src/configs/react-legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,13 @@ module.exports = {
'jsdoc/check-tag-names': 'off',
'@griffel/no-shorthands': 'off',
},
overrides: [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should go to configs/base-legacy.js as it has nothing specific with react

{
files: '**/src/index.{ts,tsx,js}',
rules: {
// TODO: propagate to `error` once all packages barrel files have been fixed
'@rnx-kit/no-export-all': ['warn', { expand: 'all' }],
},
},
],
};
Loading