Skip to content
Snippets Groups Projects
Commit d8a762c4 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

Add a bin/lint for easy running of the linter

parent 2700c8cd
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,8 @@ should be asked on the ...@@ -56,6 +56,8 @@ should be asked on the
test suite under `mode/XXX/test.js`. Feel free to add new test test suite under `mode/XXX/test.js`. Feel free to add new test
suites to modes that don't have one yet (be sure to link the new suites to modes that don't have one yet (be sure to link the new
tests into `test/index.html`). tests into `test/index.html`).
- Follow the general code style of the rest of the project (see
below). Run `bin/lint` to verify that the linter is happy.
- Make sure all tests pass. Visit `test/index.html` in your browser to - Make sure all tests pass. Visit `test/index.html` in your browser to
run them. run them.
- Submit a pull request - Submit a pull request
...@@ -65,6 +67,6 @@ should be asked on the ...@@ -65,6 +67,6 @@ should be asked on the
- 2 spaces per indentation level, no tabs. - 2 spaces per indentation level, no tabs.
- Include semicolons after statements. - Include semicolons after statements.
- Note that the linter (`test/lint/lint.js`) which is run after each - Note that the linter (`bin/lint`) which is run after each commit
commit complains about unused variables and functions. Prefix their complains about unused variables and functions. Prefix their names
names with an underscore to muffle it. with an underscore to muffle it.
bin/lint 0 → 100755
#!/usr/bin/env node
var lint = require("../test/lint/lint");
process.chdir(__dirname.slice(0, __dirname.lastIndexOf("/")));
lint.checkDir("mode");
lint.checkDir("lib");
lint.checkDir("addon");
process.exit(lint.success() ? 0 : 1);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment