diff --git a/lint-staged.config.js b/lint-staged.config.js index 4ca6f1ca9c..2839e9f78f 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -1,30 +1,34 @@ module.exports = { - "*.css": [ - "stylelint --fix --cache --allow-empty-input --report-descriptionless-disables --report-invalid-scope-disables --report-needless-disables", + "dist/*.css": [ "prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc", ], - "*.{js,json},!package.json": [ - "eslint --fix --cache --no-error-on-unmatched-pattern" - ], - "*.{md,mdx}": [ + "*.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", - "markdownlint --config .markdownlint.json --fix" ], - "package.json": (files) => ([ + "package.json": (files) => [ "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" + "git add yarn.lock", ], "components/*/dist/metadata.json": (files) => { return [ - ...(files.map(file => `pajv test --valid -s ./schemas/metadata.schema.json -d "${file}"`) ?? []), + ...(files.map( + (file) => + `pajv test --valid -s ./schemas/metadata.schema.json -d "${file}"`, + ) ?? []), ]; }, - ".github/renovate.json": () => ([ - "yarn dlx --package renovate -- renovate-config-validator" - ]) + ".github/renovate.json": () => [ + "yarn dlx --package renovate -- renovate-config-validator", + ], + "*.{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", + ], + "*": [ + "prettier --no-error-on-unmatched-pattern --ignore-unknown --log-level silent --write --config .prettierrc", + ], };