mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
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
This commit is contained in:
parent
07dbd520bd
commit
b6e0c76c7d
3 changed files with 34 additions and 2 deletions
14
.arclint
14
.arclint
|
@ -21,10 +21,20 @@
|
||||||
"(^support/aphlict/)"
|
"(^support/aphlict/)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"jshint": {
|
"jshint-browser": {
|
||||||
"type": "jshint",
|
"type": "jshint",
|
||||||
"include": "(\\.js$)",
|
"include": "(\\.js$)",
|
||||||
"jshint.jshintrc": "support/lint/jshintrc"
|
"exclude": [
|
||||||
|
"(^support/aphlict/server/.*\\.js$)"
|
||||||
|
],
|
||||||
|
"jshint.jshintrc": "support/lint/browser.jshintrc"
|
||||||
|
},
|
||||||
|
"jshint-node": {
|
||||||
|
"type": "jshint",
|
||||||
|
"include": [
|
||||||
|
"(^support/aphlict/server/.*\\.js$)"
|
||||||
|
],
|
||||||
|
"jshint.jshintrc": "support/lint/node.jshintrc"
|
||||||
},
|
},
|
||||||
"json": {
|
"json": {
|
||||||
"type": "json",
|
"type": "json",
|
||||||
|
|
22
support/lint/node.jshintrc
Normal file
22
support/lint/node.jshintrc
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"bitwise": true,
|
||||||
|
"curly": true,
|
||||||
|
"immed": true,
|
||||||
|
"indent": 2,
|
||||||
|
"latedef": true,
|
||||||
|
"newcap": true,
|
||||||
|
"noarg": true,
|
||||||
|
"quotmark": "single",
|
||||||
|
"undef": true,
|
||||||
|
"unused": true,
|
||||||
|
|
||||||
|
"expr": true,
|
||||||
|
"loopfunc": true,
|
||||||
|
"sub": true,
|
||||||
|
|
||||||
|
"globals": {
|
||||||
|
"JX": false,
|
||||||
|
"__DEV__": false
|
||||||
|
},
|
||||||
|
"node": true
|
||||||
|
}
|
Loading…
Reference in a new issue