prettier / stylelint-config-prettier-scss

Turns off all CSS and SCSS rules that are unnecessary or might conflict with prettier.
MIT License
25 stars 4 forks source link

Stylelint 15 + stylelint-config-prettier-scss #5

Closed ScorpAL closed 1 year ago

ScorpAL commented 1 year ago

Do we need stylelint-config-prettier-scss for Stylelint 15?

stylelint-config-prettier v9.0.5 already declared:

As of Stylelint v15, you may not need this package anymore. https://github.com/prettier/stylelint-config-prettier/issues/140

ekatioz commented 1 year ago

I can at least verify, that setting the at-rule-empty-line-before rule to "null" (extended from stylelint-config-prettier) would be missing.

mjohenneken commented 1 year ago

I had to include it to silence some formatting related warnings. I'd don't remember which though.

Another aspect i want to add: Rules which are deprecated by stylelint 15 in favor of prettier are showing up in the output as deprecated when stylelint is executed.

I used this stylelintrc:

{
  "extends": [
    "stylelint-config-standard-scss",
    "stylelint-config-prettier-scss"
  ]
}

Is there a way to avoid the deprecation warnings?

byjokese commented 1 year ago

If it's still necessary, could we update the peerDependencies for stylelint, currently: stylelint@">= 11.x < 15

TannerS commented 1 year ago

^ what he said above running into vulnerabilities in stylelint for an old version but cannot update due to issues with the above

elwayman02 commented 1 year ago

I believe the answer here would be to stop extending the base stylelint-config-prettier. stylelint-config-scss still has stylistic rules this package needs to disable, but for v15 of stylelint, we no longer need the base rules disabled.

Essentially, we remove this line for now: https://github.com/prettier/stylelint-config-prettier-scss/blob/main/src/index.js#L4

...along with the associated dependency.

I've also filed a relevant issue on the stylelint-scss repo that they should follow the same strategy as the core stylelint project, so we can eventually remove the need for this package: https://github.com/stylelint-scss/stylelint-scss/issues/814

elwayman02 commented 1 year ago

I took a stab at a PR to update everything!

shannonmoeller commented 1 year ago

Could folks in this thread validate that that PR fixes their issues? Unfortunately I don't have the time to dedicate to this config anymore and I'm looking for a maintainer. #7

elwayman02 commented 1 year ago

@shannonmoeller if you can cut a release or pre-release, I can test on Monday. I also wouldn't mind helping maintain it moving forward, it's a pretty small package. :)

shannonmoeller commented 1 year ago

Published v1.0.0-alpha.0 with the next tag.

npm install stylelint-config-prettier-scss@next
elwayman02 commented 1 year ago

I've identified one missing rule, fixed in #8. We should be able to put out a stable release after this.

elwayman02 commented 1 year ago

I plan to get this out in a release tomorrow.

elwayman02 commented 1 year ago

https://github.com/prettier/stylelint-config-prettier-scss/releases/tag/v1.0.0