stylelint: Move .stylelintrc to stylelint.config.js.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-08-04 14:37:35 -07:00
parent 5d6df3dc01
commit 6c0afbb68d
3 changed files with 12 additions and 10 deletions

View File

@ -215,7 +215,7 @@ clean those files up eventually.
Zulip uses [stylelint](https://github.com/stylelint/stylelint) to lint
its CSS; see our
[configuration](https://github.com/zulip/zulip/blob/master/.stylelintrc)
[configuration](https://github.com/zulip/zulip/blob/master/stylelint.config.js)
for the rules we currently enforce.
#### Shell scripts

View File

@ -1,6 +1,8 @@
{
"rules": {
# Stylistic rules for CSS.
"use strict";
module.exports = {
rules: {
// Stylistic rules for CSS.
"function-comma-space-after": "always",
"function-comma-space-before": "never",
"function-max-empty-lines": 0,
@ -58,10 +60,10 @@
"at-rule-semicolon-space-before": "never",
"comment-whitespace-inside": "always",
"indentation": 4,
indentation: 4,
# Limit language features
// Limit language features
"color-no-hex": true,
"color-named": "never",
}
}
},
};

View File

@ -51,7 +51,7 @@ def run() -> None:
linter_config.external_linter('css', ['node', 'node_modules/.bin/stylelint'], ['css', 'scss'],
fix_arg='--fix',
description="Standard CSS style and formatting linter "
"(config: .stylelintrc)")
"(config: stylelint.config.js)")
linter_config.external_linter('eslint', ['node', 'node_modules/.bin/eslint',
'--quiet', '--cache', '--ext', '.js,.ts'], ['js', 'ts'],
fix_arg='--fix',