Homec4science

Enable the `freeze` option for JSHint

Authored by Joshua Spence <josh@joshuaspence.com> on Jan 20 2015, 11:25.

Description

Enable the freeze option for JSHint

Summary:
This option prohibits overwriting prototypes of native objects such as Array, Date and so on.

// 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

Details

Committed
Joshua Spence <josh@joshuaspence.com>Jan 20 2015, 11:25
Pushed
aubortJan 31 2017, 17:16
Parents
rPH02eca684ae8c: Add a call to predict the next event for a trigger
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@joshuaspence.com> committed rPH8113e6d8c1a3: Enable the `freeze` option for JSHint (authored by Joshua Spence <josh@joshuaspence.com>).Jan 20 2015, 11:25