Commit Graph

106 Commits

Author SHA1 Message Date
Mark Banner
fe5b823483 Bug 1917530 - Enable ESLint rule no-shadow by default across the tree, disabling where it currently fails. r=frontend-codestyle-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D221445
2024-09-12 21:08:44 +00:00
Sandor Molnar
b59809ee6a Backed out 8 changesets (bug 1917532, bug 1575506, bug 1917530) for causing node newtab failures CLOSED TREE
Backed out changeset 8d6f7bc74d08 (bug 1917532)
Backed out changeset 7c963e72cf06 (bug 1575506)
Backed out changeset d5e110187781 (bug 1917530)
Backed out changeset 1d2325ffded6 (bug 1917530)
Backed out changeset 8a361e37e32c (bug 1917530)
Backed out changeset c4011d92c7f7 (bug 1917530)
Backed out changeset 1a45047dfb3c (bug 1917530)
Backed out changeset ed6b35444c45 (bug 1917530)
2024-09-12 20:45:28 +03:00
Mark Banner
4b68d25082 Bug 1917530 - Enable ESLint rule no-shadow by default across the tree, disabling where it currently fails. r=frontend-codestyle-reviewers,mossop
Differential Revision: https://phabricator.services.mozilla.com/D221445
2024-09-12 16:41:59 +00:00
Nathan Barrett
cb1f62c3b5 Bug 1904656 - Create modal for topic selection r=home-newtab-reviewers,frontend-codestyle-reviewers,amy
Differential Revision: https://phabricator.services.mozilla.com/D215700
2024-07-15 13:42:05 +00:00
scottdowne
5977993543 Bug 1902109 - Home and newtab wallpapers v2 fixing lint rule for fluent dom r=home-newtab-reviewers,frontend-codestyle-reviewers,nbarrett
Differential Revision: https://phabricator.services.mozilla.com/D214290
2024-06-20 14:50:54 +00:00
Shane Hughes
17ca553f9d Bug 1899030 - Part 5: Remove miscellaneous unused asrouter code from newtab. r=mconley,omc-reviewers,frontend-codestyle-reviewers,pdahiya
Also update nimbus rollout message provider.

Differential Revision: https://phabricator.services.mozilla.com/D211673
2024-06-19 19:45:02 +00:00
Mark Banner
4eac7c7090 Bug 1557040 - Remove eslint-plugin-fetch-options from the tree. r=Gijs,omc-reviewers,aminomancer,home-newtab-reviewers,frontend-codestyle-reviewers,thecount
Differential Revision: https://phabricator.services.mozilla.com/D202628
2024-04-09 08:11:10 +00:00
Mark Banner
05cf6da65d Bug 1881816 - Move all newtab/content-src/*.js files which are modules to use .mjs extensions. r=amy
Differential Revision: https://phabricator.services.mozilla.com/D202623
2024-03-19 17:01:38 +00:00
Mark Banner
0a0c3c6972 Bug 1884623 - Cleanup jsm references in ESLint files. r=mossop,devtools-reviewers,omc-reviewers,ochameau,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D204180
2024-03-11 15:26:27 +00:00
Mark Banner
383e208b95 Bug 1883371 - Enable ESLint rule no-console on production code. r=mossop,webcompat-reviewers,devtools-reviewers,omc-reviewers,twisniewski,nchevobbe,aminomancer
Allow for console.error, console.warn and console.createInstance, but fail for everything else.

Differential Revision: https://phabricator.services.mozilla.com/D203456
2024-03-05 16:56:57 +00:00
Mark Banner
aefd647018 Bug 1881265 - Enable ESLint recommended rule getter-return. r=mossop,extension-reviewers,devtools-reviewers,omc-reviewers,nchevobbe,aminomancer,robwu
Differential Revision: https://phabricator.services.mozilla.com/D202318
2024-02-26 11:35:40 +00:00
Mark Banner
d1f4ef701d Bug 1881573 - Drop use of ESLint rule max-depth from newtab/asrouter/aboutwelcome. r=pdahiya,thecount,Gijs,devtools-reviewers,omc-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D202474
2024-02-24 10:04:46 +00:00
Mark Banner
cd218db908 Bug 1878554 - Remove deprecated ESLint rules from aboutwelcome/asrouter/newtab configs. r=aminomancer,omc-reviewers
These rules are node specific and not really useful in mozilla central:
handle-callback-err, no-buffer-constructor, no-path-concat, no-process-exit
These rules are not useful as require is only used in configurations:
no-new-require, no-mixed-requires
Prettier already enforces max-statements-per-line
lines-between-class-members isn't handled separately, but if we want to do that we should decide on it globally.

Differential Revision: https://phabricator.services.mozilla.com/D200588
2024-02-07 08:55:31 +00:00
Mark Banner
8ce0ecbf74 Bug 1878554 - Remove ESLint rule require-await for aboutwelcome/asrouter/newtab code. r=aminomancer,omc-reviewers
We decided not to use the rule in bug 1381030.

Differential Revision: https://phabricator.services.mozilla.com/D200587
2024-02-07 08:55:31 +00:00
Mark Banner
97359cbfd0 Bug 1878554 - Remove ESLint rule for-direction reference from aboutwelcome/asrouter/newtab configs. r=aminomancer,omc-reviewers
It is already enabled as a recommended rule.

Differential Revision: https://phabricator.services.mozilla.com/D200586
2024-02-07 08:55:31 +00:00
Mark Banner
257b6d2dc7 Bug 1878554 - Simplify react/jsx-no-bind definition for aboutwelcome/asrouter/newtab code. r=aminomancer,omc-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D200585
2024-02-07 08:55:30 +00:00
Mark Banner
120bc96610 Bug 1878554 - Remove now unnecessary jsx features setting for ESLint for aboutwelcome/asrouter/newtab. r=aminomancer,omc-reviewers
The parser option was added globally for jsx files in bug 1878009.

Differential Revision: https://phabricator.services.mozilla.com/D200584
2024-02-07 08:55:30 +00:00
Mark Banner
c4f2b2d3ac Bug 1878553 - Define *.config.(m)js files as node based for ESLint. r=mossop,devtools-reviewers,omc-reviewers,nchevobbe,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D200582
2024-02-07 08:55:29 +00:00
Mark Banner
b516bcb516 Bug 1878553 - For ESLint, expect all jsx files to be ES modules. r=mossop,omc-reviewers,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D200581
2024-02-07 08:55:29 +00:00
Cristian Tuns
8829a8d6c5 Backed out 11 changesets (bug 1878554, bug 1878553, bug 1878556) for causing node failures in aboutwelcome CLOSED TREE
Backed out changeset 425f70fa7e5a (bug 1878556)
Backed out changeset 2ab3a28f5c04 (bug 1878556)
Backed out changeset fb2e02682c8c (bug 1878556)
Backed out changeset 2fc5e630568e (bug 1878554)
Backed out changeset 78839d5841b4 (bug 1878554)
Backed out changeset e0ab31d2de1b (bug 1878554)
Backed out changeset 4eb59e4ebafa (bug 1878554)
Backed out changeset ab1e077d3f84 (bug 1878554)
Backed out changeset ef999f293e3e (bug 1878553)
Backed out changeset cf49920cb1ad (bug 1878553)
Backed out changeset 95f0fce63726 (bug 1878553)
2024-02-07 01:26:39 -05:00
Mark Banner
c19488bd61 Bug 1878554 - Remove deprecated ESLint rules from aboutwelcome/asrouter/newtab configs. r=aminomancer,omc-reviewers
These rules are node specific and not really useful in mozilla central:
handle-callback-err, no-buffer-constructor, no-path-concat, no-process-exit
These rules are not useful as require is only used in configurations:
no-new-require, no-mixed-requires
Prettier already enforces max-statements-per-line
lines-between-class-members isn't handled separately, but if we want to do that we should decide on it globally.

Differential Revision: https://phabricator.services.mozilla.com/D200588
2024-02-06 22:32:53 +00:00
Mark Banner
41bdb28228 Bug 1878554 - Remove ESLint rule require-await for aboutwelcome/asrouter/newtab code. r=aminomancer,omc-reviewers
We decided not to use the rule in bug 1381030.

Differential Revision: https://phabricator.services.mozilla.com/D200587
2024-02-06 22:32:53 +00:00
Mark Banner
f68e745450 Bug 1878554 - Remove ESLint rule for-direction reference from aboutwelcome/asrouter/newtab configs. r=aminomancer,omc-reviewers
It is already enabled as a recommended rule.

Differential Revision: https://phabricator.services.mozilla.com/D200586
2024-02-06 22:32:52 +00:00
Mark Banner
617d0bb8f5 Bug 1878554 - Simplify react/jsx-no-bind definition for aboutwelcome/asrouter/newtab code. r=aminomancer,omc-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D200585
2024-02-06 22:32:52 +00:00
Mark Banner
b5d681b88e Bug 1878554 - Remove now unnecessary jsx features setting for ESLint for aboutwelcome/asrouter/newtab. r=aminomancer,omc-reviewers
The parser option was added globally for jsx files in bug 1878009.

Differential Revision: https://phabricator.services.mozilla.com/D200584
2024-02-06 22:32:52 +00:00
Mark Banner
7fdf48bc1f Bug 1878553 - Define *.config.(m)js files as node based for ESLint. r=mossop,devtools-reviewers,omc-reviewers,nchevobbe,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D200582
2024-02-06 22:32:51 +00:00
Mark Banner
832805759a Bug 1878553 - For ESLint, expect all jsx files to be ES modules. r=mossop,omc-reviewers,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D200581
2024-02-06 22:32:50 +00:00
Mike Conley
9bf8e2e138 Bug 1863400 - Part 5: Move bundled about:welcome components into browser/components/aboutwelcome folder. r=pdahiya,aminomancer
Depends on D193119

Differential Revision: https://phabricator.services.mozilla.com/D193120
2023-11-28 01:37:37 +00:00
Mark Banner
d9335a918b Bug 1860453 - Rename workers to use the .worker.(m)js pattern for ESLint (browser/). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D191592
2023-10-24 09:46:51 +00:00
Mark Banner
2eda629a6d Bug 1842869 - Simplify and fix newtab's ESLint configuration. r=aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D183285
2023-07-11 20:29:19 +00:00
Mark Banner
1a15e7c71e Bug 1677562 - Remove eslint-plugin-prettier now that Prettier and ESLint are separated. r=Gijs,devtools-reviewers,ochameau
Depends on D175769

Differential Revision: https://phabricator.services.mozilla.com/D175770
2023-04-19 08:52:38 +00:00
Mark Banner
32ebe2b93b Bug 1809497 - Separate running of Prettier from ESLint completely. r=linter-reviewers,devtools-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D174867
2023-04-17 13:33:56 +00:00
Mark Banner
781ac41b6a Bug 1825507 - Separate out prettier and ESLint to run as different processes. r=linter-reviewers,devtools-reviewers,ahal
This is enough to allow ESLint and Prettier to be run as different processes within the same lint command.
It does not fix all the failures with those two separate - that will be handled in follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D174133
2023-04-04 19:02:13 +00:00
Mark Banner
9b6109ea0f Bug 1808941 - Remove unnecessary/redundant rule specifications from newtab's ESLint configuration. r=aminomancer
no-catch-shadow has been replaced by no-shadow, which is already enabled.
no-label-var is unnecessary, as no-label is enabled everywhere already.
no-negated-in-lhs has been replaced by no-unsafe-negation which is an ESLint recommended rule and is enabled everywhere.

Depends on D166197

Differential Revision: https://phabricator.services.mozilla.com/D166198
2023-01-07 13:21:41 +00:00
Mark Banner
06e8ca3872 Bug 1808941 - Enable ESLint rules no-restricted-globals and strict for newtab. r=aminomancer
The 'strict' rule is only enabled for mjs files, as per Mozilla's recommended config.

Differential Revision: https://phabricator.services.mozilla.com/D166197
2023-01-07 13:21:41 +00:00
Mark Banner
3f297271e3 Bug 1808941 - Remove ESLint rules from newtab's ESLint setup where the rule is specified as turned off but it has no effects. r=aminomancer
These rules are not enabled by default in either the ESLint or Mozilla recommended configs. Some of the rules are deprecated.

Depends on D166195

Differential Revision: https://phabricator.services.mozilla.com/D166196
2023-01-07 13:21:41 +00:00
Mark Banner
f3354f811e Bug 1808941 - In newtab's ESLint setup, only specify node environment where it is actually used. r=aminomancer
Depends on D166194

Differential Revision: https://phabricator.services.mozilla.com/D166195
2023-01-07 13:21:40 +00:00
Mark Banner
570a1b2016 Bug 1808941 - In newtab's ESLint configuration, only specify test environments where they are actually used to get the correct globals and rules. r=aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D166194
2023-01-07 13:21:40 +00:00
Marian-Vasile Laza
2f82fe003a Backed out 5 changesets (bug 1808941) for causing newtab failures. CLOSED TREE
Backed out changeset 3df3536eabbb (bug 1808941)
Backed out changeset eee0bb5a4c96 (bug 1808941)
Backed out changeset 9adc7f9ee3c6 (bug 1808941)
Backed out changeset 44c2c13bd7d9 (bug 1808941)
Backed out changeset a20a5cde0fe5 (bug 1808941)
2023-01-07 13:41:13 +02:00
Mark Banner
d63eb52181 Bug 1808941 - Remove unnecessary/redundant rule specifications from newtab's ESLint configuration. r=aminomancer
no-catch-shadow has been replaced by no-shadow, which is already enabled.
no-label-var is unnecessary, as no-label is enabled everywhere already.
no-negated-in-lhs has been replaced by no-unsafe-negation which is an ESLint recommended rule and is enabled everywhere.

Depends on D166197

Differential Revision: https://phabricator.services.mozilla.com/D166198
2023-01-07 10:59:06 +00:00
Mark Banner
4294bb8c4f Bug 1808941 - Enable ESLint rules no-restricted-globals and strict for newtab. r=aminomancer
The 'strict' rule is only enabled for mjs files, as per Mozilla's recommended config.

Depends on D166196

Differential Revision: https://phabricator.services.mozilla.com/D166197
2023-01-07 10:59:06 +00:00
Mark Banner
9b485628b4 Bug 1808941 - Remove ESLint rules from newtab's ESLint setup where the rule is specified as turned off but it has no effects. r=aminomancer
These rules are not enabled by default in either the ESLint or Mozilla recommended configs. Some of the rules are deprecated.

Depends on D166195

Differential Revision: https://phabricator.services.mozilla.com/D166196
2023-01-07 10:59:05 +00:00
Mark Banner
ed8dd628b8 Bug 1808941 - In newtab's ESLint setup, only specify node environment where it is actually used. r=aminomancer
Depends on D166194

Differential Revision: https://phabricator.services.mozilla.com/D166195
2023-01-07 10:59:05 +00:00
Mark Banner
3ab74eaaee Bug 1808941 - In newtab's ESLint configuration, only specify test environments where they are actually used to get the correct globals and rules. r=aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D166194
2023-01-07 10:59:04 +00:00
Emily McMinn
7eb37658b5 Bug 1807181 - Make newtab Eslintrc more readable r=aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D166005
2023-01-05 18:54:56 +00:00
Mark Banner
5dad366a3e Bug 1803911 - Automatically replace Cu.reportError with console.error (newtab), and manually fix tests. r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D163770
2022-12-08 16:21:28 +00:00
Mark Banner
e4276619d3 Bug 1801092 - Add an ESLint rule to disllow use of Cu.reportError with a single argument. r=Gijs,cmkm
This enforces the bulk of the cases for Cu.reportError. A follow-up will extend this to the
two argument form.

Differential Revision: https://phabricator.services.mozilla.com/D162285
2022-11-29 23:07:42 +00:00
Iulian Moraru
e4cb785520 Backed out 3 changesets (bug 1801092) for causing newtab failures.
Backed out changeset 9153de956154
Backed out changeset 9df9c279c28d (bug 1801092)
Backed out changeset 7323c7444941 (bug 1801092)
2022-11-30 00:28:42 +02:00
Mark Banner
2f30acd85c Bug 1801092 - Add an ESLint rule to disllow use of Cu.reportError with a single argument. r=Gijs,cmkm
This enforces the bulk of the cases for Cu.reportError. A follow-up will extend this to the
two argument form.

Differential Revision: https://phabricator.services.mozilla.com/D162285
2022-11-29 21:21:28 +00:00
Mark Banner
9ecec1531f Bug 1800319 - Change newtab code so that the ESLint rule no-console is an error, except for console.error calls. r=Mardak
Differential Revision: https://phabricator.services.mozilla.com/D161942
2022-11-13 21:02:41 +00:00