Skip to content

Commit 8113e6d

Browse files
committed
Enable the freeze option for JSHint
Summary: This option prohibits overwriting prototypes of native objects such as `Array`, `Date` and so on. ```lang=js // jshint freeze:true Array.prototype.count = function (value) { return 4; }; // -> Warning: Extending prototype of native object: 'Array'. ``` Test Plan: Linted existing JavaScript files, found no violations. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11439
1 parent 02eca68 commit 8113e6d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

support/lint/browser.jshintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"bitwise": true,
33
"curly": true,
4+
"freeze": true,
45
"immed": true,
56
"indent": 2,
67
"latedef": true,

support/lint/node.jshintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"bitwise": true,
33
"curly": true,
4+
"freeze": true,
45
"immed": true,
56
"indent": 2,
67
"latedef": true,

0 commit comments

Comments
 (0)