Skip to content

chore: enable no-export-all on index files#1551

Merged
tido64 merged 1 commit into
masterfrom
tido/fix-index-export
Mar 31, 2022
Merged

chore: enable no-export-all on index files#1551
tido64 merged 1 commit into
masterfrom
tido/fix-index-export

Conversation

@tido64

@tido64 tido64 commented Mar 30, 2022

Copy link
Copy Markdown
Member

Some bundlers, such as esbuild, are not able to tree-shake nested export * statements. Fixed them using the no-export-all ESLint rule.

Platforms Impacted

  • iOS
  • macOS
  • win32 (Office)
  • windows
  • android

Description of changes

Some bundlers, such as esbuild, are not able to tree-shake nested export * statements.

The Fluent team has also recently turned this on: microsoft/fluentui#22073

Fixed using the no-export-all ESLint rule.

Verification

Functionally, nothing has changed.

Some bundlers, such as esbuild, are not able to tree-shake nested
`export *` statements. Fixed them using the `no-export-all` ESLint rule.
@tido64
tido64 requested a review from a team as a code owner March 30, 2022 14:43
Comment thread apps/fluent-tester/src/index.ts
@rurikoaraki

Copy link
Copy Markdown
Collaborator

Out of curiosity, some index files are skipped, is that because they're not top-level files?

@tido64

tido64 commented Mar 30, 2022

Copy link
Copy Markdown
Member Author

Out of curiosity, some index files are skipped, is that because they're not top-level files?

This is the rule I added:

files: '**/src/index.{js,ts,tsx}',
rules: {
'@rnx-kit/no-export-all': ['error', { expand: 'all' }],
},

It should only catch the main file. Index files that are internal in the package are skipped for now.

@tido64
tido64 merged commit c39b443 into master Mar 31, 2022
@tido64
tido64 deleted the tido/fix-index-export branch March 31, 2022 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants