Skip to content

Commit 61244cb

Browse files
committed
chore: updating lint-staged file inheritance order
1 parent 2120514 commit 61244cb

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

lint-staged.config.js

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,34 @@
11
module.exports = {
2-
"*.css": [
3-
"stylelint --fix --cache --allow-empty-input --report-descriptionless-disables --report-invalid-scope-disables --report-needless-disables",
2+
"dist/*.css": [
43
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc",
54
],
6-
"*.{js,json},!package.json": [
7-
"eslint --fix --cache --no-error-on-unmatched-pattern"
8-
],
9-
"*.{md,mdx}": [
5+
"*.css": [
6+
"stylelint --fix --cache --allow-empty-input --report-descriptionless-disables --report-invalid-scope-disables --report-needless-disables",
107
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc",
11-
"markdownlint --config .markdownlint.json --fix"
128
],
13-
"package.json": (files) => ([
9+
"package.json": (files) => [
1410
"yarn constraints --fix",
1511
"yarn install --refresh-lockfile",
1612
`eslint --fix --cache --no-error-on-unmatched-pattern ${files.join(" ")}`,
17-
"git add yarn.lock"
18-
]),
19-
"dist/*.css": [
20-
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc"
13+
"git add yarn.lock",
2114
],
2215
"components/*/dist/metadata.json": (files) => {
2316
return [
24-
...(files.map(file => `pajv test --valid -s ./schemas/metadata.schema.json -d "${file}"`) ?? []),
17+
...(files.map(
18+
(file) =>
19+
`pajv test --valid -s ./schemas/metadata.schema.json -d "${file}"`,
20+
) ?? []),
2521
];
2622
},
27-
".github/renovate.json": () => ([
28-
"yarn dlx --package renovate -- renovate-config-validator"
29-
])
23+
".github/renovate.json": () => [
24+
"yarn dlx --package renovate -- renovate-config-validator",
25+
],
26+
"*.{js,json}": ["eslint --fix --cache --no-error-on-unmatched-pattern"],
27+
"*.md": [
28+
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc",
29+
"markdownlint --config .markdownlint.json --fix",
30+
],
31+
"*": [
32+
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc",
33+
],
3034
};

0 commit comments

Comments
 (0)