Add a bunch of extra checks to be performed by jshint. For documentation, see http://jshint.com/docs/options/.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- Restricted Diffusion Commit
rPfcaeb2aeb6d9: Be more strict with JSHint.
Ran jshint --config support/jshint/jshintconfig webroot/rsrc/js/. There were a bunch of existing violations, but some of these are legitimate and probably require attention.
{ "bitwise": true, // 0 violations "curly": true, // 0 violations "immed": true, // 1 violation "indent": 2, // 0 violations "latedef": true, // 10 violations "newcap": true, // 1 violation "noarg": true, // 0 violations "quotmark": "single", // 55 violations "undef": true, // 24 violations "unused": true, // 107 violations "expr": true, "loopfunc": true, "sub": true, "globals": { "JX": false, "__DEV__": false }, "browser": true }
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Branch
- jshint
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 1294 Build 1294: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
Comment Actions
Just confirming... you're happy with this even though it introduces a bunch of linter errors?
support/jshint/jshintconfig | ||
---|---|---|
21 | We may want a separate JSHint configuration file for NodeJS? |
Comment Actions
Yep, that's fine -- we can clean deal with them as we go.
I think it's probably fine not to warn about use of document, etc., in Node.js code -- we share some code anyway. We could split things out if there's an issue.