We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 220726e commit be2e411Copy full SHA for be2e411
scripts/preCommit.js
@@ -3,10 +3,10 @@ const simpleGit = require('simple-git');
3
const git = simpleGit();
4
git.diff({ '--name-only': true, '--staged': true }).then(res => {
5
const files = res.split('\n').filter(Boolean);
6
- // disallow commit example folder
7
- const status = files.some(file => file.startsWith('example/'));
+ // disallow commit examples folder
+ const status = files.some(file => file.startsWith('examples/'));
8
if (status) {
9
- console.error('\n✖ Do not commit the "example" folder \n');
+ console.error('\n✖ Do not commit the "examples" folder \n');
10
process.exit(1);
11
}
12
process.exit(0);
0 commit comments