S2 EsLint implementation
All checks were successful
Build, test and publish / verify (push) Successful in 1m40s
All checks were successful
Build, test and publish / verify (push) Successful in 1m40s
This commit is contained in:
13
agiledancers-fe/tools/install-hooks.mjs
Normal file
13
agiledancers-fe/tools/install-hooks.mjs
Normal file
@@ -0,0 +1,13 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import husky from 'husky';
|
||||
|
||||
// Docker uses CI=true; CI and local opt-out must never change Git configuration.
|
||||
if (!process.env.CI && process.env.HUSKY !== '0') {
|
||||
const root = fileURLToPath(new URL('../../', import.meta.url));
|
||||
if (existsSync(new URL('../../.git', import.meta.url))) {
|
||||
process.chdir(root);
|
||||
const error = husky('.husky');
|
||||
if (error) throw new Error(error);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user