2013-05-19 02:04:22 +02:00
|
|
|
{
|
Be more strict with JSHint.
Summary: Add a bunch of extra checks to be performed by `jshint`. For documentation, see http://jshint.com/docs/options/.
Test Plan:
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.
```lang=json
{
"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
}
```
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: epriestley, Korvin
Differential Revision: https://secure.phabricator.com/D9659
2014-06-22 20:07:52 +02:00
|
|
|
"bitwise": true,
|
|
|
|
"curly": true,
|
2015-01-20 11:25:12 +01:00
|
|
|
"freeze": true,
|
Be more strict with JSHint.
Summary: Add a bunch of extra checks to be performed by `jshint`. For documentation, see http://jshint.com/docs/options/.
Test Plan:
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.
```lang=json
{
"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
}
```
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: epriestley, Korvin
Differential Revision: https://secure.phabricator.com/D9659
2014-06-22 20:07:52 +02:00
|
|
|
"immed": true,
|
|
|
|
"indent": 2,
|
|
|
|
"latedef": true,
|
|
|
|
"newcap": true,
|
|
|
|
"noarg": true,
|
|
|
|
"quotmark": "single",
|
|
|
|
"undef": true,
|
|
|
|
"unused": true,
|
|
|
|
|
|
|
|
"expr": true,
|
|
|
|
"loopfunc": true,
|
Enable "strict" mode for NodeJS
Summary:
In particular, this changes the behavior of NodeJS in the following ways:
- Any attempt to get or modify the global object will result in an error.
- `null` values of `this` will no longer be evaluated to the global object and primitive values of this will not be converted to wrapper objects.
- Writing or deleting properties which have there writeable or configurable attributes set to false will now throw an error instead of failing silently.
- Adding a property to an object whose extensible attribute is false will also throw an error now.
- A functions arguments are not writeable so attempting to change them will now throw an error `arguments = [...]`.
- `with(){}` statements are gone.
- Use of `eval` is effectively banned.
- `eval` and `arguments` are not allowed as variable or function identifiers in any scope.
- The identifiers `implements`, `interface`, `let`, `package`, `private`, `protected`, `public`, `static` and `yield` are all now reserved for future use (roll on ES6).
Test Plan: Verified that Aphlict was still functional.
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11430
2015-01-19 21:41:46 +01:00
|
|
|
"strict": true,
|
Be more strict with JSHint.
Summary: Add a bunch of extra checks to be performed by `jshint`. For documentation, see http://jshint.com/docs/options/.
Test Plan:
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.
```lang=json
{
"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
}
```
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: epriestley, Korvin
Differential Revision: https://secure.phabricator.com/D9659
2014-06-22 20:07:52 +02:00
|
|
|
"sub": true,
|
|
|
|
|
|
|
|
"globals": {
|
2014-12-30 22:39:24 +01:00
|
|
|
"JX": true,
|
Be more strict with JSHint.
Summary: Add a bunch of extra checks to be performed by `jshint`. For documentation, see http://jshint.com/docs/options/.
Test Plan:
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.
```lang=json
{
"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
}
```
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: epriestley, Korvin
Differential Revision: https://secure.phabricator.com/D9659
2014-06-22 20:07:52 +02:00
|
|
|
"__DEV__": false
|
|
|
|
},
|
2014-12-30 12:01:58 +01:00
|
|
|
"node": true
|
2013-05-19 02:04:22 +02:00
|
|
|
}
|