Skip to content

Commit

Permalink
chore(husky): add more extension to lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
blephy committed Jul 3, 2022
1 parent c084c10 commit 6249343
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lint-staged.config.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
'package.json': ['yarn check:packagejson'],
'**/*.ts': () => ['tsc -p tsconfig.json --noEmit', 'jest -o'],
'**/*.{ts,js}': (filenames) => `eslint ${filenames.join(' ')} --fix --cache`,
'**/*.{ts,mts,cts,tsx}': () => ['tsc -p tsconfig.json --noEmit', 'jest -o'],
'**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx}': (filenames) =>
`eslint ${filenames.join(' ')} --fix --cache`,
'*': (filenames) => `prettier --ignore-unknown --write ${filenames.join(' ')}`,
'**/*.md': (filenames) => `markdownlint-cli2-fix ${filenames.join(' ')}`,
};

0 comments on commit 6249343

Please sign in to comment.