Mark Banner
3414ce9b54
Bug 1515952 - Allow ESLint rule spaced-comment to accept source-map comments. r=mossop
...
Differential Revision: https://phabricator.services.mozilla.com/D15207
--HG--
extra : moz-landing-system : lando
2018-12-21 18:05:39 +00:00
Mark Banner
0304564ac7
Bug 1415483 - Apply the new options to reject-importGlobalProperties across the codebase, remove unnecessary importGlobalProperties. r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D13754
--HG--
extra : moz-landing-system : lando
2018-12-11 21:39:40 +00:00
Csoregi Natalia
9e970681f2
Backed out 2 changesets (bug 1415483) for multiple failures e.g. on test_message_manager_ipc.html. CLOSED TREE
...
Backed out changeset d00748de66fc (bug 1415483)
Backed out changeset 8dea94258f54 (bug 1415483)
2018-12-11 19:30:57 +02:00
Mark Banner
1abdc8687f
Bug 1415483 - Apply the new options to reject-importGlobalProperties across the codebase, remove unnecessary importGlobalProperties. r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D13754
--HG--
extra : moz-landing-system : lando
2018-12-11 14:09:44 +00:00
Mark Banner
ff9179a99e
Bug 1507487 - Handling of importScripts by ESLint should fallback to the file name if there is no entry in modules.json. r=mossop
...
We already have a fallback for items that aren't in a worker scope, we should have the same for ones that are. This means we don't need single maps (foo.js -> foo) in modules.json, and also we can identify more as explicit variables, so that no-unused-vars can detect them.
Differential Revision: https://phabricator.services.mozilla.com/D13299
--HG--
extra : moz-landing-system : lando
2018-12-11 09:31:26 +00:00
Cosmin Sabou
e3d5f2a521
Backed out changeset 6f69dc19ed7c (bug 1507487) for devtools failures on browser_scratchpad_pprint.js CLOSED TREE
2018-12-10 19:04:49 +02:00
Mark Banner
d4cd673de5
Bug 1507487 - Handling of importScripts by ESLint should fallback to the file name if there is no entry in modules.json. r=mossop
...
We already have a fallback for items that aren't in a worker scope, we should have the same for ones that are. This means we don't need single maps (foo.js -> foo) in modules.json, and also we can identify more as explicit variables, so that no-unused-vars can detect them.
Differential Revision: https://phabricator.services.mozilla.com/D13299
--HG--
extra : moz-landing-system : lando
2018-12-06 17:27:56 +00:00
Mark Banner
235ab837b2
Bug 1509270 - Allow 'location' as a writeable global property for ESLint (previously read-only). r=mossop
...
Differential Revision: https://phabricator.services.mozilla.com/D12748
--HG--
extra : moz-landing-system : lando
2018-11-27 18:55:11 +00:00
Mark Banner
84c4aa45ce
Bug 1502048 - Update the list of ESLint globals for recent JSM scope changes. r=nika,mossop
...
This patch creates a new list of privileged globals, based on the webidl bindings. The list of jsm globals is reduced to only the ones specially extended to that scope.
The privileged globals are enabled everywhere for the time being - although we likely could limit scopes, doing so is difficult with our current mozilla-central layout and configuration settings.
Differential Revision: https://phabricator.services.mozilla.com/D12302
--HG--
extra : moz-landing-system : lando
2018-11-22 16:46:19 +00:00
Mark Banner
8fb3e110a9
Bug 1508322 - Define 'importGlobalProperties' variables as explicit in ESLint to help identify unused variables. r=mossop
...
Differential Revision: https://phabricator.services.mozilla.com/D12327
--HG--
extra : moz-landing-system : lando
2018-11-19 18:23:16 +00:00
Mark Striemer
1f6ce6a3f9
Bug 1504890 - Restrict usage of event global r=Standard8,ahal
...
The event global is only available on Nightly so it should not be used.
Differential Revision: https://phabricator.services.mozilla.com/D10984
Differential Revision: https://phabricator.services.mozilla.com/D11125
--HG--
extra : rebase_source : 43d8c198a1eb9c633922d077a219f1cf17b811c1
2018-11-06 16:35:05 -06:00
Mark Banner
e749f1b196
Bug 1469384 - Allow no-useless-removeEventListener to not throw if only one argument is given to an addEventListener call. r=florian
...
Differential Revision: https://phabricator.services.mozilla.com/D5882
--HG--
extra : moz-landing-system : lando
2018-09-14 17:05:09 +00:00
Mark Banner
c6885f5391
Bug 1488445 - Remove and replace obsolete ESLint rules. r=mossop
...
This removes a number of references to rules that are now deprecated or removed from ESLint.
- no-native-reassign is replaced with no-global-assign
- no-spaced-func is replaced with func-call-spacing (where enabled)
Depends on D4944
Differential Revision: https://phabricator.services.mozilla.com/D4946
--HG--
extra : moz-landing-system : lando
2018-09-04 18:08:43 +00:00
Dave Townsend
e63bb1c465
Bug 1487246: Enable the eslint no-sequences rule. r=Standard8
...
Differential Revision: https://phabricator.services.mozilla.com/D4681
--HG--
extra : rebase_source : ae253571d7d47c4a113a98a8b7c29bf712a0d764
2018-08-29 16:15:33 -07:00
Mark Banner
226dbd7bdc
Bug 1456078 - Upgrade ESLint to version 5.3.0, and eslint-plugin-html to 4.0.5. r=mossop
...
MozReview-Commit-ID: 7yvvXKxYodA
Differential Revision: https://phabricator.services.mozilla.com/D2834
--HG--
extra : moz-landing-system : lando
2018-08-07 14:46:19 +00:00
Mark Banner
17b4516d3c
Bug 1478305 - Update ESLint to treat ChromeUtils.import definitions as real variable definitions for single-export modules. r=mossop
...
One minor issue with this method, is that we are unable to support exported definitions without further work. This may cause false-positives if items are exported. However, this is already the case with the other import mechanisms, and the benefits seem to be larger than the disadvantages here.
MozReview-Commit-ID: 4fx2aLRBt7T
--HG--
extra : rebase_source : 1e24c8d9bc2773e80c37f47feca781be53321616
2018-07-25 08:50:54 +01:00
Mark Banner
037b733636
Bug 1456762 - Add parsing of HTML files to ESLint to discover their script tags and the globals that are imported. r=mossop
...
MozReview-Commit-ID: 6jiEbZnyv6e
Differential Revision: https://phabricator.services.mozilla.com/D1643
2018-06-16 08:20:38 +00:00
Mark Banner
7f558bc1bd
Bug 1465476 - Support binary expressions for globals evaluation in ESLint. r=mossop
...
MozReview-Commit-ID: 66g1ISJ2ML1
--HG--
extra : rebase_source : bb7a61710467dbbae81c6d654d409453edf729f8
2018-05-30 15:43:23 +01:00
Felipe Gomes
ad24f8ae59
Bug 1462400 - Tell eslint about XPCOMUtils.defineLazyProxy. r=standard8
...
Also bump eslint-plugin-mozilla version to 0.13.0
MozReview-Commit-ID: ELWC6RYNPjT
--HG--
extra : rebase_source : aecc1a032e761812f78f9e57a2534d0e694d0b9c
2018-05-18 13:24:54 -03:00
Mark Banner
88e4fd5825
Bug 1456076 - Update ESLint to 4.19.1 & eslint-plugin-html to 4.0.3. r=mossop
...
MozReview-Commit-ID: Gs6T8AsLPPo
--HG--
extra : rebase_source : bf189ef047294ea405d8e7628eae94daa6d93e89
2018-04-23 11:33:31 +01:00
Kris Maglione
35409daeed
Bug 1456686: Part 2 - Update ESLint plugin to treat explicit imports as real variable definitions. r=standard8
...
This has the effect of exposing explicit imports (e.g., defineModuleGetter),
but not implicit imports (e.g., Cu.import), to rules like no-unused-vars and
no-shadow.
MozReview-Commit-ID: C8oXoSKMU1s
--HG--
extra : rebase_source : 21e87b48514c2075d09eca7e20a1671b206d871f
extra : histedit_source : 5080aef443f0a21f3a1e3e2bb398aadcc5a05402%2Cc472717700446079b1f7ac552a4c3339d207ad61
2018-04-24 20:17:12 -07:00
Mark Banner
0f3ec963be
Bug 1443093 - Update eslint-plugin-no-unsanitized to 3.0.0 / eslint to 4.18.2. r=mossop
...
Also change eslint-plugin-mozilla's globals.js to use eslint-scope rather than escope as
ESLint 4.x changed to eslint-scope. This avoids dependency issues that were masked by the
depedencies of eslint-plugin-no-unsanitized's previous version.
MozReview-Commit-ID: 6wLY7Oj0am3
--HG--
extra : rebase_source : 863313d7907e8246d1f5b0ee83164cc0f943f8f6
2018-03-05 10:34:38 +00:00
Mark Banner
294979dc32
Bug 1441460 - ESLint's no-define-cc-etc looks at the wrong property item when checking for Cc/Ci/Cu/Cr usage. r=florian
...
MozReview-Commit-ID: IkSkCWqBHOn
--HG--
extra : rebase_source : 6b3a2977d4b157aea54c6e3f6960d3673e751a34
2018-02-23 20:42:17 +00:00
Mark Banner
6afe18b30a
Bug 1440379 - Tidy up ESlint no-unused-vars definitions wrt Ci/Cu/Cr/Cc usage for varsIgnorePattern. r=florian
...
MozReview-Commit-ID: HmliR8iNRDq
--HG--
extra : rebase_source : 483ae0b54b9e781cceac2accdfb2255d725ace6a
2018-02-22 16:55:36 +00:00
Mark Banner
8387fb332e
Bug 1439949 - Update eslint to 4.18.1 to support async iteration. r=mossop
...
MozReview-Commit-ID: 6S8Fq7yHISq
--HG--
extra : rebase_source : 719181833e15bd299a20239ac546734dbb11509a
2018-02-21 16:00:24 +00:00
Jared Wein
1225eda729
Bug 1436575 - Prevent ==/!= comparisons with booleans as they aren't necessary. r=standard8
...
MozReview-Commit-ID: 25oVDVNzDyF
--HG--
rename : tools/lint/eslint/eslint-plugin-mozilla/lib/rules/use-includes-instead-of-indexOf.js => tools/lint/eslint/eslint-plugin-mozilla/lib/rules/no-compare-against-boolean-literals.js
rename : tools/lint/eslint/eslint-plugin-mozilla/tests/use-chromeutils-import.js => tools/lint/eslint/eslint-plugin-mozilla/tests/no-compare-against-boolean-literals.js
extra : rebase_source : 46b7159f659ae0182408d5f11ac2ebafb08fe2df
2018-02-08 11:51:17 -05:00
Mark Banner
b4f572f5fa
Bug 1436389 - Upgrade ESLint to version 4.17.0. r=mossop
...
MozReview-Commit-ID: I4KBELxhBlM
--HG--
extra : rebase_source : d206fb88f8c70d161cc0541a068db1b2f02e7a37
2018-02-07 16:01:29 +00:00
Mark Banner
54c4111311
Bug 1230369 - Add ESLint rules to disallow defining Cc/Ci etc and to prefer the use of Cc/Ci rather than the Components.* equivalents. r=florian
...
MozReview-Commit-ID: 9eAgUO3iIJW
--HG--
extra : rebase_source : 3208d5f74477733e4c81206613f74d7c7821ac0d
2018-02-06 22:40:12 +00:00
Mark Banner
9a2172526a
Bug 1434449 - Enable no-unused-vars for the global (as well as local) scope on jsm files, whitelist directories still to be fixed. r=florian.
...
MozReview-Commit-ID: 3vBWDR3UjGF
--HG--
extra : rebase_source : 61495d14a8d761e71b4072b02e2ca57e77f44059
2018-01-30 22:10:08 +00:00
Mark Banner
bc030d501e
Bug 1430923 - Handle EXPORTED_SYMBOLS in ESLint to help define globals in jsm files, and disallow 'let EXPORTED_SYMBOLS = '. r=mossop
...
MozReview-Commit-ID: 5abfpM8EAEL
--HG--
extra : rebase_source : b266018a3754459aa8628217232f86e1a56c00b7
2018-01-16 23:07:25 +00:00
Mark Banner
30935fa314
Bug 1369722 - Disable ESLint browser environment for jsm files. r=mossop
...
MozReview-Commit-ID: IVAyPmTqtCB
--HG--
extra : rebase_source : 7db82ead3e0ca7fcbf909021c8eafc79f7cd2a9a
2017-11-07 22:59:09 +00:00
Mark Banner
499ca20f31
Bug 1421968 - Enable ESLint rule mozilla/use-services by default, but whitelist it for various directories still to be fixed. r=mossop
...
MozReview-Commit-ID: KOZWr7FiDQZ
--HG--
extra : rebase_source : 92c9bc236c9043f6ce25cc2ba45264918eb2ac15
2017-11-28 19:24:12 +00:00
Dan Banner
b2e847755c
Bug 1367704 - Enable the semi ESLint rule across the tree. r=standard8
...
MozReview-Commit-ID: GrlcOI9K2hJ
--HG--
extra : rebase_source : 6574cf3c67eb11733ffd9999c260f71c8551abc4
2017-05-28 19:57:46 +01:00
Mark Banner
c62d0c64f8
Bug 1371293 - Upgrade ESLint to version 4.8.0, configuration changes. r=mossop
...
MozReview-Commit-ID: 2YHYOLTtqxu
--HG--
extra : rebase_source : 7bbc673bb72d546e1fca63227d54b6607a4ab33e
2017-10-09 10:54:16 +01:00
Mark Banner
3b50478984
Bug 1246896 - Bump version number of eslint-plugin-mozilla, and update its dev dependencies. r=florian
...
MozReview-Commit-ID: 1rmbkvCeXfa
--HG--
extra : rebase_source : a79b9c1412914362bfd227478511c54729b801e7
2017-10-27 16:44:53 +01:00
Mark Banner
8340eb52c8
Bug 1230373
- Add an ESLint rule to prefer using Services.jsm rather than getService. r=mossop
...
MozReview-Commit-ID: G9dp4PxcyT7
--HG--
extra : rebase_source : 957b5ead56c8c778b1ba812343c132b34030135f
2017-10-06 17:03:38 +01:00
Mark Banner
5c31c8a30b
Bug 1399946 - Bump version number of eslint-plugin-mozilla for releasing the dependency fixes from bug 1395879. r=ahal
...
MozReview-Commit-ID: 79nDcgcvm0c
--HG--
extra : rebase_source : 78d2dd8eaec5d36c8611effe96f93949b76929e9
2017-09-18 09:15:57 +01:00
Mark Banner
2c7467dd71
Bug 1395879 - Remove espree/escope etc from the direct dependencies of eslint-plugin-mozilla since they are really peerDependencies supplied by the existing eslint peer. r=mossop
...
MozReview-Commit-ID: 2FEfFaEoomU
--HG--
extra : rebase_source : f284707bb792443de11c57524f0bd296fdc675cf
2017-09-01 11:27:33 +01:00
Mark Banner
a9005029b6
Bug 1392098 - Add an ESLint rule to avoid unnecessary run_test() functions. r=mossop
...
MozReview-Commit-ID: pbXjamX4bk
--HG--
extra : rebase_source : cc506d08e7d47e75464ca7f07bd3ef323184270d
2017-08-18 21:49:44 +01:00
Mark Banner
2612544280
Bug 1380956 - Use exact matches of versions in eslint-plugin-mozilla for better tracking. r=ahal
...
MozReview-Commit-ID: 2UYwQd2BhnC
--HG--
extra : rebase_source : b3f187f2a79ade2e181bec15260f6c906d3e8210
2017-07-14 12:01:17 +01:00
Mark Banner
29eaca2240
Bug 1379119 - Add a builder to run the unit tests for eslint-plugin-mozilla. r=ahal
...
MozReview-Commit-ID: 5QsxUsvJz8O
--HG--
extra : rebase_source : fbfcb5f83e519903c58e587ed1b82cbb3cb1878f
2017-07-10 15:27:00 +01:00