Skip to content

Commit b6e0c76

Browse files
joshuaspenceepriestley
authored and
epriestley
committedDec 30, 2014
Define a seperate JSHint configuration for NodeJS files
Summary: Currently, we assume that all JavaScript files are for use in a browser. This is not true for the NodeJS Aphlict server code. Split the current JSHint configuration into `jshint-browser` and `jshint-node`. Test Plan: `arc lint` Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11071
1 parent 07dbd52 commit b6e0c76

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed
 

‎.arclint

+12-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,20 @@
2121
"(^support/aphlict/)"
2222
]
2323
},
24-
"jshint": {
24+
"jshint-browser": {
2525
"type": "jshint",
2626
"include": "(\\.js$)",
27-
"jshint.jshintrc": "support/lint/jshintrc"
27+
"exclude": [
28+
"(^support/aphlict/server/.*\\.js$)"
29+
],
30+
"jshint.jshintrc": "support/lint/browser.jshintrc"
31+
},
32+
"jshint-node": {
33+
"type": "jshint",
34+
"include": [
35+
"(^support/aphlict/server/.*\\.js$)"
36+
],
37+
"jshint.jshintrc": "support/lint/node.jshintrc"
2838
},
2939
"json": {
3040
"type": "json",
File renamed without changes.

‎support/lint/node.jshintrc

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"bitwise": true,
3+
"curly": true,
4+
"immed": true,
5+
"indent": 2,
6+
"latedef": true,
7+
"newcap": true,
8+
"noarg": true,
9+
"quotmark": "single",
10+
"undef": true,
11+
"unused": true,
12+
13+
"expr": true,
14+
"loopfunc": true,
15+
"sub": true,
16+
17+
"globals": {
18+
"JX": false,
19+
"__DEV__": false
20+
},
21+
"node": true
22+
}

0 commit comments

Comments
 (0)
Failed to load comments.