chore: add extra husky check
This commit is contained in:
parent
187d50b6bc
commit
36f152cc97
2 changed files with 13 additions and 0 deletions
|
|
@ -59,6 +59,9 @@
|
||||||
"eslint --fix",
|
"eslint --fix",
|
||||||
"prettier --write",
|
"prettier --write",
|
||||||
"git add"
|
"git add"
|
||||||
|
],
|
||||||
|
"yarn.lock": [
|
||||||
|
"node ./scripts/yarn-lock-scan.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
scripts/yarn-lock-scan.js
Normal file
10
scripts/yarn-lock-scan.js
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
const yarnLockPath = './yarn.lock';
|
||||||
|
const data = fs.readFileSync(path.resolve(yarnLockPath), 'utf8');
|
||||||
|
if (data.match(/artifactory/g)) {
|
||||||
|
throw new Error(
|
||||||
|
'Artifactory references in your yarn.lock! Please make sure you are using the official yarn or npm registry when downloading your dependencies!',
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue