diff options
author | James D. Forrester <jforrester@wikimedia.org> | 2019-04-12 10:12:42 -0700 |
---|---|---|
committer | James D. Forrester <jforrester@wikimedia.org> | 2019-04-12 10:18:45 -0700 |
commit | ae3f5f12ff8334c55a928634f4d8fc32879f3ec0 (patch) | |
tree | 97721dd0686284287a03e7f5c35e5d198213fc7c /.stylelintrc.json | |
parent | 75fa35b702a7c4a6dd2a1df59d408f4b4bc83816 (diff) | |
download | mediawikicore-ae3f5f12ff8334c55a928634f4d8fc32879f3ec0.tar.gz mediawikicore-ae3f5f12ff8334c55a928634f4d8fc32879f3ec0.zip |
linting: Start enforcing a basic CSS class naming rule (with lots of opt-outs)
Wow, so many opt-outs, and a lot of probably-not-going-to-change ones.
Actually wanted pattern:
* "^mw-…"
Content-related classes we're probably not going to scrap:
* "^wikitable$"
Hard-to-change classes used in lots of skins:
* "^toc$"
* "^toctoggle$"
* "^tochidden$"
Necessary for over-rides/specificity battles:
* "^oo-ui-…"
Probably worth considering changing soon:
* "^client-js$"
* "^client-nojs$"
Some of the exemptions have been applied to deprecated styles (where they're being
renamed); some are for code in entirely deprecated areas themselves; some have the
"wrong" name but sit alongside classes with an appropriate one. And some are, very
clearly, in the wrong repo. Such sigh.
Change-Id: I9b8423d53b6750b5ca79d2f69e111f75c93c5bdc
Diffstat (limited to '.stylelintrc.json')
-rw-r--r-- | .stylelintrc.json | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.stylelintrc.json b/.stylelintrc.json index 60c8f36d4806..43f499b5a63b 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,8 +1,8 @@ { "extends": "stylelint-config-wikimedia", "rules": { + "selector-class-pattern": "^((mw|oo-ui)-|(wikitable|(toc(|toggle|hidden))|client-(no)?js)$)", "no-descending-specificity": null, - "selector-max-id": null } } |