Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 815a1b6

Browse files
committed
Lots of cleanup
- Update deps - Move to a fork of pre-commit that is nicer and quieter
1 parent e5968a5 commit 815a1b6

File tree

5 files changed

+1017
-936
lines changed

5 files changed

+1017
-936
lines changed

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"env": {
3+
"es6": true
4+
},
25
"extends": [
36
"mongodb-js/node"
47
]

bin/mongodb-js-precommit.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
11
#!/usr/bin/env node
22

33
/* eslint no-sync:0, no-console:0 */
4-
var path = require('path');
5-
var fs = require('fs');
64
var chalk = require('chalk');
75
var figures = require('figures');
86

9-
var usage = fs.readFileSync(path.resolve(__dirname, '../usage.txt')).toString();
107
var args = require('minimist')(process.argv.slice(2), {
118
boolean: ['debug', 'json'],
129
string: ['detective']
1310
});
1411

12+
var usage = `Usage: mongodb-js-precommit <file>... [--dir=<path/to/module/dir>]
13+
14+
I'll help you keep typos out of your projects.
15+
16+
Usage:
17+
# Lint all js files in the \`./lib\` directory:
18+
mongodb-js-precommit ./lib/{*.js,**/*.js}
19+
20+
Options:
21+
<file>
22+
--dir=<path> The directory your package.json lives in. [Default: \`process.cwd()]\`].
23+
--json Ooutput as JSON for your machine friends [Default: \`false\`].
24+
--debug Enable debug messages.
25+
-h --help Show this screen.
26+
--version Show version.
27+
--detective Use a different parser for the \`dependency-check\`. [Default: \`precinct\`].
28+
`;
29+
1530
if (args.debug) {
1631
process.env.DEBUG = 'mongodb-js-precommit';
1732
}

0 commit comments

Comments
 (0)