Skip to content

Commit

Permalink
Expand @fluentui/react root index file's export *s to uncover and fix…
Browse files Browse the repository at this point in the history
… duplicate exports. (microsoft#25545)

* expanding index.

* change.

* Replacing with inline deprecation exclusions.

* setting export * to warning.

* change.

* moving rules around.
  • Loading branch information
dzearing authored and NotWoods committed Nov 18, 2022
1 parent 77fe025 commit fef01f4
Show file tree
Hide file tree
Showing 5 changed files with 1,498 additions and 92 deletions.
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"
}
10 changes: 9 additions & 1 deletion packages/eslint-plugin/src/configs/base-legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,13 @@ module.exports = {
*/
...getNamingConventionRule({ prefixInterface: true }),
},
overrides: [],
overrides: [
{
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' }],
},
},
],
};
1 change: 1 addition & 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,5 @@ module.exports = {
'jsdoc/check-tag-names': 'off',
'@griffel/no-shorthands': 'off',
},
overrides: [],
};
Loading

0 comments on commit fef01f4

Please sign in to comment.