Page MenuHomePhabricator

Enable the `freeze` option for JSHint
ClosedPublic

Authored by joshuaspence on Jan 20 2015, 7:40 AM.
Tags
None
Referenced Files
F19909421: D11439.diff
Thu, Apr 2, 12:38 AM
F19899050: D11439.id.diff
Sun, Mar 29, 5:30 PM
F19896579: D11439.id27489.diff
Sun, Mar 29, 4:06 AM
F19518315: D11439.id.diff
Jan 15 2026, 7:33 PM
F19516769: D11439.id27489.diff
Jan 15 2026, 3:39 AM
F19514858: D11439.diff
Jan 14 2026, 5:58 AM
F19383583: D11439.id27495.diff
Dec 27 2025, 1:03 AM
F19383582: D11439.id27489.diff
Dec 27 2025, 1:03 AM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Commits
Restricted Diffusion Commit
rP8113e6d8c1a3: 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.

Diff Detail

Repository
rP Phabricator
Branch
master
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3924
Build 3937: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Enable the `freeze` option for JSHint.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jan 20 2015, 9:20 AM
This revision was automatically updated to reflect the committed changes.