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

[core] Add eslint rule to force default export equals to filename in doc #3674

Merged
merged 4 commits into from Jan 25, 2022

Conversation

alexfauquette
Copy link
Member

This should never append again after #3564 (comment)

Eslint-rule

@mui-bot
Copy link

mui-bot commented Jan 20, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 149.1 301 269.3 240.6 57.826
Sort 100k rows ms 320.6 631.2 516.6 514.54 108.203
Select 100k rows ms 153 241.8 197 202.32 29.96
Deselect 100k rows ms 96.6 238.3 238.3 150.98 53.135

Generated by 🚫 dangerJS against 7988c6b

.eslintrc.js Outdated
Comment on lines 63 to 65
files: ['docs/src/pages/**/*.js', 'docs/src/pages/**/*.tsx'],
rules: {
'filenames/match-exported': ['error', [null, 'kebab', 'snake']],
Copy link
Member

Choose a reason for hiding this comment

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

Keeping kebab and snake makes it to still suggest other names, although they can't be used because of another rule:

image

Maybe?

Suggested change
files: ['docs/src/pages/**/*.js', 'docs/src/pages/**/*.tsx'],
rules: {
'filenames/match-exported': ['error', [null, 'kebab', 'snake']],
files: ['docs/src/pages/components/**/*.js', 'docs/src/pages/components/**/*.tsx'],
rules: {
'filenames/match-exported': ['error', [null]],

@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 25, 2022
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jan 25, 2022
@alexfauquette alexfauquette merged commit 15d331e into mui:master Jan 25, 2022
@alexfauquette alexfauquette deleted the force-default-export branch January 25, 2022 16:10
@cherniavskii cherniavskii added the core Infrastructure work going on behind the scenes label Feb 3, 2022
@oliviertassinari
Copy link
Member

@alexfauquette Oh wow, nice! Can we move this to @mui/monorepo/.eslintrc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants