Skip to content

Ignore Stylelint rules in SCSS files#10

Closed
szepeviktor wants to merge 1 commit intoconedevelopment:mainfrom
szepeviktor:global-rules
Closed

Ignore Stylelint rules in SCSS files#10
szepeviktor wants to merge 1 commit intoconedevelopment:mainfrom
szepeviktor:global-rules

Conversation

@szepeviktor
Copy link
Copy Markdown
Contributor

@szepeviktor szepeviktor commented Aug 4, 2023

... instead of ignoring them in the Stylelint configuration.

So further violations will pop up!
Lovely 5 line config file 🤩

Please consider doing this in other projects.

@szepeviktor szepeviktor changed the title Ignore Stylelint rules locally Ignore Stylelint rules in SCSS files Aug 4, 2023
@adamlaki
Copy link
Copy Markdown
Member

adamlaki commented Aug 8, 2023

I am on the fence with this. Right now just these 4 modification needed?

@szepeviktor
Copy link
Copy Markdown
Contributor Author

Right now just these 4 modification needed?

Righty-right!

@szepeviktor
Copy link
Copy Markdown
Contributor Author

szepeviktor commented Aug 8, 2023

Let's say you have four violations of the same rule and one of them is intentional.
If you ignore a rule in the config file all four will vanish 〰

@szepeviktor
Copy link
Copy Markdown
Contributor Author

@adamlaki Friendly ping 🏓

@adamlaki
Copy link
Copy Markdown
Member

@szepeviktor not forgotten. After the release of the admin theme (in the next 2-3 weeks), I will come to Spruce (both CSS and UI) for a bigger iteration. Thanks for the reminder!

@szepeviktor
Copy link
Copy Markdown
Contributor Author

@adamlaki I am planning to close this on the 4th monthiversary

@adamlaki adamlaki closed this Dec 3, 2023
@szepeviktor szepeviktor deleted the global-rules branch December 3, 2023 14:46
@szepeviktor
Copy link
Copy Markdown
Contributor Author

szepeviktor commented Feb 28, 2024

@adamlaki I would like to contribute again but emotionally blocked my the above ignoring method.
npx prettier --write --single-quote --print-width 120 'scss/**/*.scss'

@adamlaki
Copy link
Copy Markdown
Member

adamlaki commented Feb 28, 2024

@szepeviktor, you know you are welcome, Viktor. The config - as it is now - was just easier for me, that's all.

What would prettier solve? The alphabetizing? Can we ditch Stylelint for prettier?

@szepeviktor
Copy link
Copy Markdown
Contributor Author

What would prettier solve? The alphabetizing? Can we ditch Stylelint for prettier?

Stylelint v16 dropped formatting features. Those features could be added back by installing Prettier.

@szepeviktor
Copy link
Copy Markdown
Contributor Author

Prettier is not easy.

-@mixin generate-table(
-  $selector: '.table',
-  $has-variations: true,
-  $has-responsive-table: true
-) {
+@mixin generate-table($selector: '.table', $has-variations: true, $has-responsive-table: true) {

e.g. I don't know how to prevent this change.
You won't be happy with prettier-ignore comments.

@adamlaki
Copy link
Copy Markdown
Member

I understand; thanks for the clarification!

Well, the example is not so ideal. We have so much mixin where the line-breaking helps visually. I will try to look into it.

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.

2 participants