Various deprecation warning after upgrading stylelint to 15.0.0
crystalfp opened this issue · comments
After upgrading stylelint to 15.0.0 the following deprecation warnings appear:
- The "block-closing-brace-space-before" rule is deprecated.
- The "block-opening-brace-space-after" rule is deprecated.
- The "color-hex-case" rule is deprecated.
- The "max-empty-lines" rule is deprecated.
- The "no-empty-first-line" rule is deprecated.
- The "no-extra-semicolons" rule is deprecated.
- The "selector-list-comma-newline-after" rule is deprecated.
Could these rules be removed?
Thanks!
mario
@crystalfp I only get the single warning The "no-extra-semicolons" rule is deprecated.
- wonder if the others are from other configs that you have configured...?
@kristerkari To address this problem, since this rule is actually not configured in stylelint-config-recommended-scss
(see below), maybe the version of stylelint-config-recommended
just needs to be bumped to version ^10.0.1
?
stylelint-config-recommended-scss/index.js
Lines 1 to 39 in ae20b58
Right now it's at stylelint-config-recommended@^9.0.0
:
I haven't yet had time to look at the changes in stylelint 15, but I'll have a look at them this weekend.
I think I have around 10+ npm packages to update.
I tried to upgrade stylelint-config-recommended-scss
with disastrous consequences:
npm up -D stylelint-config-recommended-scss
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: iie@0.19.0
npm ERR! Found: stylelint@15.0.0
npm ERR! node_modules/stylelint
npm ERR! dev stylelint@"^15.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer stylelint@"^14.10.0" from stylelint-config-recommended-scss@8.0.0
npm ERR! node_modules/stylelint-config-recommended-scss
npm ERR! dev stylelint-config-recommended-scss@"^8.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\mvalle\AppData\Local\npm-cache\_logs\2023-02-10T18_29_30_383Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mvalle\AppData\Local\npm-cache\_logs\2023-02-10T18_29_30_383Z-debug-0.log
Installing stylelint-config-recommended
that was not installed but I think it comes from stylelint itself had similar outcome.
So maybe I should wait till the various stylelint-config-*
will be upgraded.
Thanks!
mario
This should be fixed now with the new version:
https://github.com/stylelint-scss/stylelint-config-recommended-scss/releases/tag/v9.0.0
Thanks! Just tried out stylelint-config-recommended-scss@9.0.0
- looks good, no more warnings on my side:
$ yarn stylelint 'packages/**/*.{js,tsx}'
Done in 7.84s.
Fixed thanks!
Still appear some of the deprecation warnings because I have to disable the corresponding rule in my configuration (like color-hex-case: null
or no-empty-first-line: null
).
I have to disable the corresponding rule in my configuration (like
color-hex-case: null
orno-empty-first-line: null
).
You can remove the lines disabling these rules now, as long as the other configs that you're extending from do not configure them. If you're extending from other configs which configure these rules, then you could open a similar issue in the repo of these other configs.
I also did this, now that stylelint-config-recommended-scss
no longer configures these rules: upleveled/eslint-config-upleveled@55c7fcd
(#197)
Thanks! I removed all deprecated rules from my configuration, but a single one remains and I don't have it anywhere:
"block-closing-brace-newline-after
. It is defined somewhere in:
extends:
- stylelint-config-standard
- stylelint-config-standard-vue
- stylelint-config-standard-scss
- stylelint-config-recommended-vue/scss
- stylelint-config-recommended-scss
I'll investigate.
Found. The block-closing-brace-newline-after
rule is defined in stylelint-config-standard-scss/index.js
line 14.
Where should I report this problem?
Found. The
block-closing-brace-newline-after
rule is defined instylelint-config-standard-scss/index.js
line 14. Where should I report this problem?
You can report it here:
https://github.com/stylelint-scss/stylelint-config-standard-scss
@crystalfp Just check first that you are using the latest version of that library.
Yes, they fixed it. Thanks!
mario