Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
if [ -z "$SKIP_STORYBOOK_GIT_HOOKS" ]; then
yarn lint-staged
yarn lint-staged --concurrent=false
fi
6 changes: 4 additions & 2 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ const fmtCmd = autofix ? 'oxfmt' : 'oxfmt --check';
const lintSuffix = autofix ? ' --fix' : '';

export default {
'code/**/*.{js,jsx,mjs,ts,tsx,html,json}': [fmtCmd, `yarn --cwd code lint:js:cmd${lintSuffix}`],
// oxfmt skips unknown extensions and respects .oxfmtrc.json ignorePatterns,
// so matching every staged file keeps pre-commit aligned with CI (yarn fmt:check)
'*': [fmtCmd],
'code/**/*.{js,jsx,mjs,ts,tsx,html,json}': [`yarn --cwd code lint:js:cmd${lintSuffix}`],
'scripts/**/*.{html,js,json,jsx,mjs,ts,tsx}': [`yarn --cwd scripts lint:js:cmd${lintSuffix}`],
'docs/_snippets/**/*.{js,jsx,mjs,ts,tsx,html,json}': [fmtCmd],
'**/*.ejs': ['yarn --cwd scripts exec ejslint'],
'**/package.json': ['yarn --cwd scripts lint:package'],
};
Loading