Skip to content

Commit

Permalink
Fix js selector in stylelint (#698)
Browse files Browse the repository at this point in the history
"/^[.#]js-/" looks at the whole selector and fails to catch things like `div .js-foo`, `div.js-foo`, `.s-good, .js-bad`.
  • Loading branch information
bnickel authored Jun 11, 2021
1 parent 8b49250 commit 0de21a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"selector-pseudo-element-colon-notation": "single",
"no-descending-specificity": null,
"selector-disallowed-list": [
"/^[.#]js-/",
"/[.#]js-/",
{
"message": "js-* selectors can’t have visual styling. https://stackoverflow.design/product/guidelines/javascript/#javascript-classnames"
}
Expand Down

0 comments on commit 0de21a0

Please sign in to comment.