forked from adobe/spectrum-css
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlint-staged.config.js
More file actions
26 lines (26 loc) · 1.01 KB
/
Copy pathlint-staged.config.js
File metadata and controls
26 lines (26 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module.exports = {
"*.css": [
"stylelint --fix --cache --allow-empty-input --report-descriptionless-disables --report-invalid-scope-disables --report-needless-disables",
"prettier --no-config --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc",
],
"*.{js,json}": [
"eslint --fix --cache --no-error-on-unmatched-pattern --quiet"
],
"package.json": (files) => [
"yarn constraints --fix",
"yarn install",
`eslint --fix --cache --no-error-on-unmatched-pattern --quiet ${files.join(" ")}`,
],
"dist/*.css": [
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc"
],
"components/*/dist/metadata.json": (files) => {
return [
...(files.map(file => `pajv test --valid -s ./schemas/metadata.schema.json -d "${file}"`) ?? []),
];
},
"*.{md,mdx}": [
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc",
"markdownlint --config .markdownlint.json --fix"
]
};