-
Notifications
You must be signed in to change notification settings - Fork 214
Expand file tree
/
Copy pathlint-staged.config.js
More file actions
32 lines (32 loc) · 1.29 KB
/
Copy pathlint-staged.config.js
File metadata and controls
32 lines (32 loc) · 1.29 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
27
28
29
30
31
32
module.exports = {
"package.json": (files) => ([
/** why build? constraints checks for compiled dist output to validate exports */
"cross-env NODE_ENV=production yarn build",
"yarn constraints --fix",
"yarn install --refresh-lockfile",
`eslint --fix --cache --no-error-on-unmatched-pattern ${files.join(" ")}`,
"git add yarn.lock"
]),
"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}"`) ?? []),
];
},
".github/renovate.json": () => ([
"yarn dlx --package renovate -- renovate-config-validator"
]),
"!(*dist/**).css": [
"stylelint --fix --cache --allow-empty-input --report-descriptionless-disables --report-invalid-scope-disables --report-needless-disables",
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc",
],
"!(*metadata|package|renovate).{cjs,js,json}": [
"eslint --fix --cache --no-error-on-unmatched-pattern"
],
"*.md": [
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc",
"markdownlint --config .markdownlint.json --fix"
],
};