mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-02 12:47:41 +02:00
Tools: Run pre-commit hook tasks in parallel
This commit is contained in:
parent
28fd9c3039
commit
d5ac7c6bc0
@ -1,22 +1,27 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
// Don't compile when committing as it will process all TS files in the
|
// # About TypeScript compilation
|
||||||
// monorepo, which is too slow. Errors should be checked during development
|
//
|
||||||
// using `npm run watch`.
|
// Don't compile when committing as it will process all TS files in the monorepo, which is too
|
||||||
|
// slow. Errors should be checked during development using `yarn watch`.
|
||||||
//
|
//
|
||||||
// Or if we add this back, we could do something like this:
|
// Or if we add this back, we could do something like this:
|
||||||
// https://stackoverflow.com/a/44748041/561309
|
// https://stackoverflow.com/a/44748041/561309
|
||||||
//
|
//
|
||||||
// The script would check where the TS file is located, then use the right
|
// The script would check where the TS file is located, then use the right tsconfig.json file
|
||||||
// tsconfig.json file along with the tsconfig override.
|
// along with the tsconfig override.
|
||||||
//
|
//
|
||||||
// '**/*.ts?(x)': () => 'npm run tsc',
|
// # Running tasks in parallel
|
||||||
'*.{js,jsx,ts,tsx}': [
|
//
|
||||||
'yarn checkIgnoredFiles',
|
// lint-staged does not allow running concurrent tasks for the same extension, because multiple
|
||||||
'yarn spellcheck',
|
// tasks might modify the same files. This doesn't apply to us because only one task modifies
|
||||||
'yarn packageJsonLint',
|
// files (the linter task) while others only notify about errors. So to go around this we add
|
||||||
'yarn linter-precommit',
|
// this fake extension "task?" to make lint-staged think those are different extension tasks
|
||||||
],
|
// that can run in parallel.
|
||||||
'*.{md,mdx}': [
|
//
|
||||||
'yarn spellcheck',
|
// See https://github.com/lint-staged/lint-staged/issues/934#issuecomment-743299357
|
||||||
],
|
'*.{js,jsx,ts,tsx,task1}': 'yarn checkIgnoredFiles',
|
||||||
|
'*.{js,jsx,ts,tsx,task2}': 'yarn spellcheck',
|
||||||
|
'*.{js,jsx,ts,tsx,task3}': 'yarn packageJsonLint',
|
||||||
|
'*.{js,jsx,ts,tsx,task4}': 'yarn linter-precommit',
|
||||||
|
'*.{md,mdx}': 'yarn spellcheck',
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user