Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1.24 KB

jsx-props-class-name.md

File metadata and controls

41 lines (26 loc) · 1.24 KB

Enforce 'class' or 'className' attributes (inferno/jsx-props-class-name)

🔧 This rule is automatically fixable by the --fix CLI option.

💼 This rule is enabled in the following configs: all.

🔧 This rule is automatically fixable using the --fix flag on the command line.

Rule Details

This rule will enforce one or the other to keep consistency in your code.

Fixable: This rule is automatically fixable using the --fix flag on the command line.

Rule Options

This rule has a string option:

  • className: (default) enforces the use of 'className' instead of 'class' in JSX attributes.
...
"inferno/jsx-props-class-name": [<enabled>, "className"]
...
  • class: enforces the use of 'class' instead of 'className' in JSX attributes.
...
"inferno/jsx-props-class-name": [<enabled>, "class"]
...

When not to use it

If you want to allow both className and class attributes

Related rules