Skip to content

Commit dd9f170

Browse files
committed
chore: update release script to lean on lint-staged
1 parent fee01ea commit dd9f170

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lint-staged.config.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ module.exports = {
66
"*.{js,json}": [
77
"eslint --fix --cache --no-error-on-unmatched-pattern --quiet"
88
],
9-
"package.json": (files) => [
10-
"yarn constraints --fix",
11-
`eslint --fix --cache --no-error-on-unmatched-pattern --quiet ${files.join(" ")}`,
9+
"*.{md,mdx}": [
10+
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc",
11+
"markdownlint --config .markdownlint.json --fix"
1212
],
13+
"package.json": () => ([
14+
"yarn constraints --fix",
15+
"yarn install --refresh-lockfile",
16+
]),
1317
"dist/*.css": [
1418
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc"
1519
],
1620
"components/*/dist/metadata.json": (files) => {
1721
return [
1822
...(files.map(file => `pajv test --valid -s ./schemas/metadata.schema.json -d "${file}"`) ?? []),
1923
];
20-
},
21-
"*.{md,mdx}": [
22-
"prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc",
23-
"markdownlint --config .markdownlint.json --fix"
24-
]
24+
}
2525
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"tester": "cross-env NODE_ENV=development nx run storybook:test:scope",
5454
"validate": "yarn validator tag:component",
5555
"validator": "nx run-many --target validate --verbose --projects",
56-
"version:packages": "changeset version && yarn constraints --fix && yarn install"
56+
"version:packages": "changeset version && yarn lint-staged"
5757
},
5858
"workspaces": [
5959
"components/*",

0 commit comments

Comments
 (0)