Skip to content

Deprecation Warning: stylelint unit blacklist & whitelist has been deprecated #39

Open

Description

@atatarenko

Context

Running a command in my project's directory dreact lint styles 'src/**/*.css'

Actual result

All lints pass but here is the warning in the console:

Deprecation Warning: 'declaration-property-unit-blacklist' has been deprecated. Instead use 'declaration-property-unit-disallowed-list'. See: https://github.com/stylelint/stylelint/blob/13.7.0/lib/rules/declaration-property-unit-blacklist/README.md
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
Deprecation Warning: 'unit-whitelist' has been deprecated. Instead use 'unit-allowed-list'. See: https://github.com/stylelint/stylelint/blob/13.7.0/lib/rules/unit-whitelist/README.md

Expected result

No warning.

Activity

  1. ezhlobo commented on Jan 26, 2022

    @ezhlobo
    Member

    @atatarenko thank you for notice. We are not actively support dreact at the moment, so it may take a while to fix the things.

    So far I can suggest you to change your project's ./config/stylelint.config.js:

    + 'declaration-property-unit-blacklist': null,
    + 'declaration-property-unit-whitelist': null,
    + 'unit-whitelist': null,

    If you still care about units, you can add the contraint about no pixels:

    + 'unit-disallowed-list': [
    +   'px',
    +   {
    +     'ignoreProperties': {
    +       'px': [
    +         '/^(border(?!-radius))/'
    +       ]
    +     }
    +   }
    + ],
  2. atatarenko commented on Jun 13, 2022

    @atatarenko
    Author

    @ezhlobo thank you for giving a tip on how we can mitigate an issue. I'd prefer to keep this one open until we find a proper fix if you don't mind.

  3. ohmycthulhu commented on Oct 25, 2022

    @ohmycthulhu

    I will take a look and try fixing this issue

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions