eslint-plugin-react-data-attr
Stylelint plugin for data attributes with React.
Installation
$ npm install stylelint-plugin-react-data-attr --save-dev
Setup
{
"plugins": ["stylelint-plugin-react-data-attr"],
"rules": {
"stylelint-plugin-react-data-attr/deny-upper-case": true,
}
}
Supported Rules
This plugin currently supports 1 rule.
Rule: deny-upper-case
Detects that uppercase letters are used in the data attribute name.
Examples of incorrect code for this rule:
div[data-userInfo] {}
Examples of correct code for this rule:
div[data-user-info] {}
Related
-
eslint-plugin-react-data-attr
: ESLint rules for data attribute of React's JSX