Skip to content

Fix false positives for overflowX for CSS-in-JS in property-no-unknown #4020

Closed
gucong3000/postcss-jsx
#60
@ivancuric

Description

Clearly describe the bug

Using React and the CSS object notation leads to an error for the following piece of code:

<div style={{overflowX: 'scroll', color: 'black'}}>

error:

demo.jsx
68:41  ×  Unexpected unknown property "overflowx"   property-no-unknown

Which rule, if any, is the bug related to?

property-no-unknown

What CSS is needed to reproduce the bug?

style={overflowX: 'scroll'}

What stylelint configuration is needed to reproduce the bug?

e.g.

{
  "extends": ["stylelint-config-standard", "stylelint-config-prettier"],
}

Which version of stylelint are you using?

9.10.1

How are you running stylelint: CLI, PostCSS plugin, Node.js API?

CLI, VScode

Does the bug relate to non-standard syntax (e.g. SCSS, Less etc.)?

No.

What did you expect to happen?

No warnings to be flagged.

What actually happened (e.g. what warnings or errors did you get)?

The following warnings were flagged:

demo.jsx
68:41  ×  Unexpected unknown property "overflowx"   property-no-unknown

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions