chore: add extra husky check

This commit is contained in:
Joren Broekema 2019-06-28 11:00:23 +02:00
parent 187d50b6bc
commit 36f152cc97
2 changed files with 13 additions and 0 deletions

View file

@ -59,6 +59,9 @@
"eslint --fix",
"prettier --write",
"git add"
],
"yarn.lock": [
"node ./scripts/yarn-lock-scan.js"
]
}
}

10
scripts/yarn-lock-scan.js Normal file
View 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!',
);
}