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

Deprecation Warning: 'declaration-property-unit-whitelist' has been deprecated. #103

Closed
ocean90 opened this issue Nov 24, 2020 · 2 comments
Milestone

Comments

@ocean90
Copy link
Member

ocean90 commented Nov 24, 2020

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.

image

@ocean90
Copy link
Member Author

ocean90 commented Nov 24, 2020

Updating stylelint in the Atom package itself seems to fix the error:

  • Go to ~/.atom/packages/linter-stylelint
  • Open package.json
  • Update dependencies.stylelint to 13.8.0
  • Run npm install in ~/.atom/packages/linter-stylelint

@ocean90 ocean90 added this to the 2.0.0 milestone Dec 1, 2020
ocean90 added a commit that referenced this issue Dec 12, 2020
@ocean90 ocean90 modified the milestones: 2.0.0, 1.6.0 Dec 12, 2020
@burntcustard
Copy link

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!

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

No branches or pull requests

2 participants