Skip to content
Snippets Groups Projects
Commit 25bc6d4b authored by Rob Lemley's avatar Rob Lemley
Browse files

Bug 1834590 - [stylelint] Use "stylelint-rc" from stylelint.yml if it exists....

Bug 1834590 - [stylelint] Use "stylelint-rc" from stylelint.yml if it exists. r=linter-reviewers,Standard8

Default to using .stylelintrc.js in $topsrcdir with optional override for
Thunderbird's config file in comm-central.

Differential Revision: https://phabricator.services.mozilla.com/D178835
parent d37afaf8
No related branches found
No related tags found
No related merge requests found
......@@ -78,6 +78,9 @@ def lint(paths, config, binary=None, fix=None, rules=[], setup=None, **lintargs)
["--ignore-pattern", os.path.relpath(path, lintargs["root"])]
)
# Default to $topsrcdir/.stylelintrc.js, but allow override in stylelint.yml
stylelint_rc = config.get("stylelint-rc", ".stylelintrc.js")
# First run Stylelint
cmd_args = (
[
......@@ -89,7 +92,7 @@ def lint(paths, config, binary=None, fix=None, rules=[], setup=None, **lintargs)
"json",
"--allow-empty-input",
"--config",
os.path.join(lintargs["root"], ".stylelintrc.js"),
os.path.join(lintargs["root"], stylelint_rc),
]
+ extra_args
+ exclude_args
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment