Commit Graph

103 Commits

Author SHA1 Message Date
Mark Banner
6584dd495f Bug 1463673 - Member expressions should also be allowed as expected arguments to Assert.throws/rejects. r=mossop
MozReview-Commit-ID: Jhs3TD60bli
2018-05-23 08:58:19 +01:00
Mark Banner
e084fb3732 Bug 1461997 - Add an ESLint rule to ensure that Assert.rejects is preceeded by await. r=mossop
MozReview-Commit-ID: kVrHRIi9l6
2018-05-16 21:04:13 +01:00
Mark Banner
0515a85722 Bug 1461997 - Create a rule to prevent usages of Assert.throws/rejects without an 'expected' argument. r=mossop
MozReview-Commit-ID: 979uJQUjybl
2018-04-09 18:54:13 +01:00
Kris Maglione
c03fa450d6 Bug 1460092: Add ESLint rule to enforce use of ChromeUtils.generateQI. r=Gijs
Also fixes existing code which fails the rule.

MozReview-Commit-ID: CkLFgsspGMU
2018-05-08 18:36:22 -07:00
Kris Maglione
63c039d983 Bug 1455458: De-XPIDLify the blocklist service. r=gijs
Going through XPConnect for JS-to-JS access in the blocklist service adds no
benefit, but does add a lot of overhead and maintenance burden.

MozReview-Commit-ID: Lf1mDK0b0B0
2018-04-19 16:01:24 -07:00
Peter Van der Beken
75d03ab497 Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz. 2018-03-01 20:19:56 +01:00
Kris Maglione
9d5b9190a5 Bug 1443964: Part 3 - Remove no-cpows-in-tests rule. r=mconley
The shims that this rule tests for no longer exist.

MozReview-Commit-ID: DMgP7Hczavc
2018-03-07 19:31:28 -08:00
Mark Banner
29e56bce9b Bug 1434869 - Automatically mark EXPORTED_SYMBOLS as used, so that we don't need to ignore it in ESLint's no-unused-vars rule. r=florian.
MozReview-Commit-ID: IVMeZHGdVBk
2018-03-06 12:01:59 +00:00
Sebastian Hengst
500c4f7ad2 Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout
Backed out changeset 83c87140dc3d (bug 888600)
Backed out changeset 2efb9b1753f6 (bug 888600)
Backed out changeset af5303781961 (bug 888600)
Backed out changeset 79ef59047e63 (bug 888600)
Backed out changeset 30d568d628dd (bug 888600)
Backed out changeset c7bd4c6c9741 (bug 888600)
2018-03-01 11:51:09 +02:00
Andreea Pavel
d547a32cb0 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-02-28 00:25:43 +02:00
Mark Banner
94214ba814 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
2018-02-23 20:42:17 +00:00
Peter Van der Beken
972562411b Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz. 2018-02-22 20:22:29 +01:00
Jared Wein
b3f5a6a1cb Bug 1436575 - Remove autofix from rule since it is not reliable in all cases. r=standard8
MozReview-Commit-ID: AYrOuQ95fD6
2018-02-08 15:37:40 -05:00
Jared Wein
909ea36b5b Bug 1436575 - Prevent ==/!= comparisons with booleans as they aren't necessary. r=standard8
MozReview-Commit-ID: 25oVDVNzDyF
2018-02-08 11:51:17 -05:00
Mark Banner
307562af6b 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
2018-02-06 22:40:12 +00:00
Florian Quèze
daad0a6f39 Bug 1339461 - add an eslint rule to detect when indexOf should be replaced with includes, r=Standard8. 2018-02-01 20:47:23 +01:00
Kris Maglione
7fe74fc136 Bug 1431533: Part 4 - Add ESLint support for ChromeUtils import methods. r=florian
This adds support for detecting globals created by these helpers, as well as a
rule to enforce their use over the older XPConnect variants.

The latter rule also supports fixing code to use the newer variants, and will
be used in the next part to rewrite in-tree ESLint-enabled code that fails it.

MozReview-Commit-ID: 6Bgo6ohQA5j
2018-01-18 12:53:01 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
882744bade Bug 1431533: Part 4 - Add ESLint support for ChromeUtils import methods. r=florian
This adds support for detecting globals created by these helpers, as well as a
rule to enforce their use over the older XPConnect variants.

The latter rule also supports fixing code to use the newer variants, and will
be used in the next part to rewrite in-tree ESLint-enabled code that fails it.

MozReview-Commit-ID: 6Bgo6ohQA5j
2018-01-18 12:53:01 -08:00
Brindusan Cristian
55e424b668 Backed out changeset 8e4dcdb0f429 (bug 1431533) for ESlint failure on test-no-single-arg-cu-import.js on a CLOSED TREE 2018-01-30 02:05:25 +02:00
Kris Maglione
3878cc8147 Bug 1431533: Part 4 - Add ESLint support for ChromeUtils import methods. r=florian
This adds support for detecting globals created by these helpers, as well as a
rule to enforce their use over the older XPConnect variants.

The latter rule also supports fixing code to use the newer variants, and will
be used in the next part to rewrite in-tree ESLint-enabled code that fails it.

MozReview-Commit-ID: 6Bgo6ohQA5j
2018-01-18 12:53:01 -08:00
Kris Maglione
1046270983 Backed out 3 changesets (bug 1431533) for Android mochitest bustage. CLOSED TREE
MozReview-Commit-ID: 5ubE9EMQpZ9
2018-01-24 22:04:59 -08:00
Kris Maglione
803dafd2f6 Bug 1431533: Follow-up: Fix no-single-arg-cu-import exemption to allow ChromeUtils. r=bustage CLOSED TREE
MozReview-Commit-ID: 8BmInGGSnU2
2018-01-24 21:23:56 -08:00
Kris Maglione
7cfe750516 Bug 1431533: Part 4 - Add ESLint support for ChromeUtils import methods. r=florian
This adds support for detecting globals created by these helpers, as well as a
rule to enforce their use over the older XPConnect variants.

The latter rule also supports fixing code to use the newer variants, and will
be used in the next part to rewrite in-tree ESLint-enabled code that fails it.

MozReview-Commit-ID: 6Bgo6ohQA5j
2018-01-18 12:53:01 -08:00
Gijs Kruitbosch
3ecf428d60 Bug 1431069 - allow eslint to deal with ChromeUtils imports, r=standard8
MozReview-Commit-ID: KHVewE1Rrov
2018-01-17 13:20:59 +00:00
Mark Banner
2739b5baae 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
2018-01-16 23:07:25 +00:00
Mark Banner
6f514325ac Bug 1417944 - Enable ESLint rule mozilla/use-services for toolkit/. r=mossop
MozReview-Commit-ID: JhHXYma5Adp
2017-11-22 13:36:34 +00:00
Ed Lee
546ee3d2bf Bug 1417017 - Check for content. usage at global and within add_task for no-cpows-in-tests. r=standard8
MozReview-Commit-ID: Asz6dM29uRJ
2017-11-14 02:17:57 -08:00
Geoff Brown
022ef4adff Bug 1407679 - Merge nsIIOService and nsIIOService2; r=nwgh 2017-11-10 07:03:36 -07:00
Nicholas Nethercote
2c805ac89f Bug 1414096 (attempt 2) - Remove support for nsISupportsString values in nsPrefBranch::{get,set}ComplexValue(). r=florian.
Bug 1345294 introduced nsPrefBranch::{get,set}StringPref(), which allowed the
getting of utf8 strings from prefs, which previously required using
nsISupportsString with {get,set}ComplexValue. That bug also converted most
uses.

This patch finishes the job.

- It removes the nsISupportsString support.

- It converts existing code that relied on the nsISupportsString.

- It removes the lint that was set up to detect such uses of nsISupportsString.
2017-11-10 09:07:48 +11:00
Narcis Beleuzu
2d99ba07ef Backed out 1 changesets (bug 1414096) for dt1 failures "devtools/client/commandline/test/browser_cmd_pref3.js" r=backout on a CLOSED TREE
Backed out changeset e843de356b7e (bug 1414096)
2017-11-08 18:04:01 +02:00
Nicholas Nethercote
44eb7f0274 Bug 1414096 - Remove support for nsISupportsString values in nsPrefBranch::{get,set}ComplexValue(). r=florian.
Bug 1345294 introduced nsPrefBranch::{get,set}StringPref(), which allowed the
getting of utf8 strings from prefs, which previously required using
nsISupportsString with {get,set}ComplexValue. That bug also converted most
uses.

This patch finishes the job.

- It removes the nsISupportsString support.

- It converts existing code that relied on the nsISupportsString.

- It removes the lint that was set up to detect such uses of nsISupportsString.
2017-10-31 16:34:35 +11:00
Mark Banner
cd86a5dbc2 Bug 1412890 - Enable ESLint rule mozilla/use-services for toolkit/components/passwordmgr. r=MattN
MozReview-Commit-ID: BNojtj1cAji
2017-10-30 16:28:39 +00:00
Attila Craciun
6bcd8772eb Backed out 1 changesets (bug 1412890) possible ESlint failure r=backout on a CLOSED TREE.
Backed out changeset cac71ff2481c (bug 1412890)
2017-11-01 10:32:50 +02:00
Mark Banner
7ae0ef6905 Bug 1412890 - Enable ESLint rule mozilla/use-services for toolkit/components/passwordmgr. r=MattN
MozReview-Commit-ID: BNojtj1cAji
2017-10-30 16:28:39 +00:00
Valentin Gosu
01fa9dd0ad Bug 1407720 - Merge nsICookieManager and nsICookieManager2 r=nwgh
MozReview-Commit-ID: HuzeeB43YZZ
2017-10-31 13:02:28 +01:00
Mark Banner
f80b8ceb6b Bug 1246896 - Improve detection for mozilla/no-cpows-in-tests.js 'content' - only notify when content is used as an identifier. r=florian
MozReview-Commit-ID: 1X38Wq4hUmZ
2017-10-13 17:04:48 +01:00
Sebastian Hengst
5c152627a6 Backed out changeset dab1c5badddb (bug 1407679) for failing server startup in mochitests on Android. r=backout on a CLOSED TREE 2017-10-24 21:18:26 +02:00
Valentin Gosu
eb16c9049c Bug 1407679 - Merge nsIIOService and nsIIOService2 r=nwgh
Removes deprecated nsIIOService2.newChannelFromURIWithProxyFlags

MozReview-Commit-ID: Gr3nA25kcre
2017-10-20 16:41:07 +02:00
Mark Banner
65c34bf3e9 Bug 1230373 - Add an ESLint rule to prefer using Services.jsm rather than getService. r=mossop
MozReview-Commit-ID: G9dp4PxcyT7
2017-10-06 17:03:38 +01:00
Mark Banner
cd2f4980f7 Bug 1392098 - Add an ESLint rule to avoid unnecessary run_test() functions. r=mossop
MozReview-Commit-ID: pbXjamX4bk
2017-08-18 21:49:44 +01:00
Andrew Halberstadt
1ecb0adc26 Bug 1385352 - Enable 'mozilla/no-arbitrary-setTimeout' eslint rule on browser-chrome tests, r=standard8
MozReview-Commit-ID: 5lO0uAjHMsw
2017-08-10 14:48:21 -04:00
Phil Ringnalda
5e91797776 Backed out changeset 6896f93a2327 (bug 1385352) for not making it to m-c before the next violation of its new linting rule merged to autoland
MozReview-Commit-ID: 3HDE2C3wSU0
2017-08-10 20:21:19 -07:00
Andrew Halberstadt
6c60ffa524 Bug 1385352 - Enable 'mozilla/no-arbitrary-setTimeout' eslint rule on browser-chrome tests, r=standard8
MozReview-Commit-ID: 5lO0uAjHMsw
2017-08-10 14:48:21 -04:00
Andrew Halberstadt
e31fc89321 Bug 1383120 - [eslint-plugin-mozilla] Add no-arbitrary-setTimeout eslint rule, r=mossop
MozReview-Commit-ID: D7y3uALzVQx
2017-07-21 12:42:05 -04:00
Mark Banner
a6a3398f4b Bug 1382647 - Improve eslint-plugin-mozilla's performance when searching for globals by avoiding rebuilding source when we don't need to. r=mossop
MozReview-Commit-ID: 84uHuepWhZR
2017-07-18 22:23:58 +01:00
Andrew Halberstadt
a26aba62a2 Bug 1380003 - Create avoid-Date-timing eslint rule, r=standard8
MozReview-Commit-ID: 6b6GtBUpZUZ
2017-07-11 12:34:20 -04:00
Florian Quèze
e5a39cc4f8 Bug 1353542 - Add an eslint rule deprecating usage of Task.jsm in browser/ and toolkit/, r=Mossop. 2017-05-12 14:54:42 +02:00
Mark Banner
2d4e9d72ca Bug 1358484 - Add an autofix option to ESLint's no-useless-parameters. r=florian
MozReview-Commit-ID: B8mQteJ1CzF
2017-04-21 14:34:37 +01:00
Mark Banner
5b0ca96cad Bug 1358418 - Be more informative about which file ESLint is failing on when getASTSource() hits a computed member expression. r=Mossop
MozReview-Commit-ID: GA4bEvJXH3O
2017-04-21 10:10:54 +01:00