-
Notifications
You must be signed in to change notification settings - Fork 195
/
lint-staged.config.js
27 lines (27 loc) · 1015 Bytes
/
lint-staged.config.js
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
27
module.exports = {
"components/*/*.css": [
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write",
"stylelint --fix --cache --allow-empty-input --quiet"
],
"*.json": [
"eslint --fix --cache --no-error-on-unmatched-pattern --quiet"
],
"components/*/stories/*.js": [
"eslint --fix --cache --no-error-on-unmatched-pattern --quiet"
],
"plugins/*/*.js": [
"eslint --fix --cache --no-error-on-unmatched-pattern --quiet"
],
"dist/*.css": [
"prettier --no-config --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write"
],
"components/*/metadata/*.{yml,yaml}": (files) => {
return [
...(files.map(file => `pajv test --valid -s ./schemas/documentation.schema.json -d "${file}"`) ?? []),
`prettier --no-config --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write ${files.join(" ")}`
];
},
"*.md": [
"prettier --no-config --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write"
]
};