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

[code-infra] Fix stylelint locally #42411

Merged
merged 1 commit into from
May 27, 2024

Conversation

oliviertassinari
Copy link
Member

When running pnpm stylelint locally with Next.js having already done a build, it will crash with:

SCR-20240526-sfau

Annoying.

Instead, I'm reproducing the fix done in Base UI by @michaldudak https://github.com/mui/base-ui/blob/bf8fca5f2aac3d6d39d41496a20d722d67cc1fba/.stylelintrc.js#L7.

I found this testing some stuff with Pigment CSS.

@oliviertassinari oliviertassinari added the scope: code-infra Specific to the core-infra product label May 26, 2024
Comment on lines -23 to +22
files: ['**/*.js', '**/*.cjs', '**/*.mjs', '**/*.jsx', '**/*.ts', '**/*.tsx'],
files: ['**/*.js', '**/*.cjs', '**/*.mjs', '**/*.ts', '**/*.tsx'],
Copy link
Member Author

Choose a reason for hiding this comment

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

We don't allow .jsx files so this shouldn't be here.

Comment on lines -11 to -19
'declaration-colon-newline-after': null,
'function-parentheses-newline-inside': null, // not compatible with prettier
'media-feature-range-notation': null,
'no-empty-source': null,
'no-missing-end-of-source-newline': null,
'selector-class-pattern': null,
'string-no-newline': null, // not compatible with prettier
'value-keyword-case': null,
'value-list-comma-newline-after': null, // not compatible with prettier
Copy link
Member Author

Choose a reason for hiding this comment

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

No idea what's going on here. I'm simply trying to follow the default as much as possible, it seems to pass. I saw Base UI is doing this.

@oliviertassinari oliviertassinari changed the title [code-infra] Fix stylint locally [code-infra] Fix stylelint locally May 26, 2024
@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label May 26, 2024
@mui-bot
Copy link

mui-bot commented May 26, 2024

Netlify deploy preview

https://deploy-preview-42411--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against d99da4e

@oliviertassinari oliviertassinari merged commit 6e7e936 into mui:next May 27, 2024
21 checks passed
@oliviertassinari oliviertassinari deleted the fix-stylelint-locally branch May 27, 2024 10:48
oliviertassinari added a commit that referenced this pull request May 28, 2024
@oliviertassinari
Copy link
Member Author

oliviertassinari commented May 28, 2024

Apparently, it's not very effective https://stylelint.io/user-guide/configure/#ignorefiles

SCR-20240527-lnlm

Fixed in 70327ca

joserodolfofreitas pushed a commit to joserodolfofreitas/material-ui that referenced this pull request Jul 29, 2024
joserodolfofreitas pushed a commit to joserodolfofreitas/material-ui that referenced this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work scope: code-infra Specific to the core-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants