Commit Graph

9 Commits

Author SHA1 Message Date
Dave Townsend
4c45c258f1 Bug 1245916: Unify eslint global discovery rules. r=pbrosset
While working on turning on no-undef I discovered that the various rules we
have for defining globals are a little inconsistent in whether the files they
load recurse through import-globals-from directives and none of them imported
eslint globals directives.

I think we're better off putting all this global parsing code in a single place
rather than spread across multiple rules. Have one rule to turn it on for
parsed files and one function to load globals from other files and make them
share most of the code so we won't get inconsistent. If we find us needing to
turn on/off individual features we can figure out a way to do that in the
future.

This patch does that, the globals.js file does all global parsing with a shared
object that receives events from the AST, either through from an ESlint rule
or from a simple AST walker using estraverse.

MozReview-Commit-ID: 9KQZwsNNOUl
2016-02-05 11:37:50 -08:00
Phil Ringnalda
b8c3290d04 Backed out 5 changesets (bug 1245916) for browser-chrome and devtools bustages
CLOSED TREE

Backed out changeset 70eca07367f4 (bug 1245916)
Backed out changeset 04c1740aa499 (bug 1245916)
Backed out changeset b554c7ce41c4 (bug 1245916)
Backed out changeset 01675e4828b5 (bug 1245916)
Backed out changeset 878db4caf845 (bug 1245916)
2016-02-15 13:58:27 -08:00
Dave Townsend
7061a50bbb Bug 1245916: Unify eslint global discovery rules. r=pbrosset
While working on turning on no-undef I discovered that the various rules we
have for defining globals are a little inconsistent in whether the files they
load recurse through import-globals-from directives and none of them imported
eslint globals directives.

I think we're better off putting all this global parsing code in a single place
rather than spread across multiple rules. Have one rule to turn it on for
parsed files and one function to load globals from other files and make them
share most of the code so we won't get inconsistent. If we find us needing to
turn on/off individual features we can figure out a way to do that in the
future.

This patch does that, the globals.js file does all global parsing with a shared
object that receives events from the AST, either through from an ESlint rule
or from a simple AST walker using estraverse.

MozReview-Commit-ID: 9KQZwsNNOUl
2016-02-05 11:37:50 -08:00
Tom Tromey
5dccd728ef Bug 1231963 - handle top-level "this.mumble" assignments in eslint; r=mikeratcliffe 2016-01-21 07:44:11 -07:00
Dave Townsend
2da1796b85 Bug 1229142: Add shared eslintrc files for the different test suites. r=Standard8 2015-12-17 15:28:06 -08:00
Mark Banner
a2902cbee3 Bug 1228628 - Add a minimal .eslintrc configuration for browser and start linting a few browser files with basic rules. r=Mossop 2015-11-30 11:42:25 +00:00
Phil Ringnalda
19851ebadb Back out 343223ce6b34 (bug 1228628) for Experiments xpcshell bustage
CLOSED TREE
2015-11-27 20:55:17 -08:00
Mark Banner
70f59040f6 Bug 1228628 - Add a minimal .eslintrc configuration for browser and start linting a few browser files with basic rules. r=Mossop 2015-11-27 22:37:38 +00:00
Michael Ratcliffe
49de3d4930 Bug 1203520 - We need a DevTools ESLint plugin containing our ruleset r=gps 2015-09-30 14:44:48 +01:00