Deprecation Warning: 'declaration-property-unit-whitelist' has been deprecated.
ocean90 opened this issue · comments
Deprecation Warning: 'declaration-property-unit-whitelist' has been deprecated. Instead use 'declaration-property-unit-allowed-list'. See: https://github.com/stylelint/stylelint/blob/13.7.0/lib/rules/declaration-property-unit-whitelist/README.md
The rule is defined in stylelint-config-wordpress
and is already fixed since WordPress-Coding-Standards/stylelint-config-wordpress#267 but no new version has been release yet, see WordPress-Coding-Standards/stylelint-config-wordpress#268.
The warning can be removed by using
'declaration-property-unit-whitelist': null, // Set to null to disable rule and to avoid deprecation warning.
'declaration-property-unit-allowed-list': {
'line-height': [ 'px' ],
},
This works in CLI and VSCode, but Atom for some reason produces an Expected option value for rule "declaration-property-unit-allowed-list" 1:1
error.
Updating stylelint
in the Atom package itself seems to fix the error:
- Go to
~/.atom/packages/linter-stylelint
- Open
package.json
- Update
dependencies.stylelint
to13.8.0
- Run
npm install
in~/.atom/packages/linter-stylelint
I was getting the stylelint error in Atom: Expected option value for rule "declaration-property-value-disallowed-list"
, in a 100% completely unrelated project to this, but stumbled upon this solution from a random Google search. Updating linter-stylint's stylelint dependency to 13.8.0, as suggested here, fixed the problem for me. So thanks!