From 6f6022a33c0e5a31b2af308c3575dcaf2fd11618 Mon Sep 17 00:00:00 2001 From: JounQin Date: Sun, 14 Aug 2022 21:44:47 +0800 Subject: [PATCH] fix(lint-staged): enable `--allow-empty-input` for stylelint (#156) --- .changeset/breezy-sloths-act.md | 5 +++++ packages/lint-staged/base.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/breezy-sloths-act.md diff --git a/.changeset/breezy-sloths-act.md b/.changeset/breezy-sloths-act.md new file mode 100644 index 00000000..4710b714 --- /dev/null +++ b/.changeset/breezy-sloths-act.md @@ -0,0 +1,5 @@ +--- +"@1stg/lint-staged": patch +--- + +fix: enable `--allow-empty-input` for `stylelint` diff --git a/packages/lint-staged/base.js b/packages/lint-staged/base.js index c5437537..fc1d4993 100644 --- a/packages/lint-staged/base.js +++ b/packages/lint-staged/base.js @@ -37,7 +37,7 @@ if (isEslintAvailable) { if (isStylelintAvailable) { config[`*.{${STYLELINT_PRETTIER_FILES}}`] = [ - 'stylelint --cache --fix', + 'stylelint --allow-empty-input --cache --fix', ...(useStylelintPrettier ? [] : ['prettier --write']), ] }