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

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

Closed
ScorpAL opened this issue Feb 14, 2023 · 12 comments · Fixed by #6 or #8
Closed

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

ScorpAL opened this issue Feb 14, 2023 · 12 comments · Fixed by #6 or #8

Comments

@ScorpAL
Copy link

ScorpAL commented Feb 14, 2023

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.
prettier/stylelint-config-prettier#140

@ScorpAL ScorpAL changed the title Stylelint 15 Stylelint 15 + stylelint-config-prettier-scss Feb 14, 2023
@ekatioz
Copy link

ekatioz commented Feb 20, 2023

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
Copy link

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
Copy link

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

@TannerS
Copy link

TannerS commented Apr 25, 2023

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

@elwayman02
Copy link
Collaborator

elwayman02 commented May 4, 2023

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: stylelint-scss/stylelint-scss#814

elwayman02 added a commit to elwayman02/stylelint-config-prettier-scss that referenced this issue May 5, 2023
Fixes prettier#5

* In alignment with Stylelint v15 changes, removes `stylelint-config-prettier` which is no longer needed after rule deprecations and remove from standard recommended config.
* Adds stylelint and stylelint-config-recommended-scss as devDeps to allow builds to pass locally and not just in CI
* Updated CI config to bump action and dep versions
* Drops Node 12 support (Stylelint v15 only supports Node 14+)
* Bumps peerDep for stylelint to v15+
* Updates fail test to check for a stylistic rule from the scss standard config (`indentation` was deprecated and removed)
* Utilizes new `resolveConfig()` method to get config for checker
@elwayman02
Copy link
Collaborator

I took a stab at a PR to update everything!

@shannonmoeller
Copy link
Member

shannonmoeller commented May 5, 2023

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

@shannonmoeller shannonmoeller reopened this May 5, 2023
@elwayman02
Copy link
Collaborator

@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
Copy link
Member

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

npm install stylelint-config-prettier-scss@next

@elwayman02
Copy link
Collaborator

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

@elwayman02
Copy link
Collaborator

I plan to get this out in a release tomorrow.

@elwayman02
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants