Mark Banner
73db18ea40
Bug 1825715 - Add section about ignoring formatting to ESLint docs. r=Gijs
...
This also does a general clean-up of the ESLint doc.
Differential Revision: https://phabricator.services.mozilla.com/D174218
2023-04-01 16:40:02 +00:00
Cristian Tuns
8cca7e0d9f
Backed out 3 changesets (bug 1825715) for causing node failures with checkBundles CLOSED TREE
...
Backed out changeset 53faa883781a (bug 1825715)
Backed out changeset 5ce3ad6ce483 (bug 1825715)
Backed out changeset 7f0b08e89cd1 (bug 1825715)
2023-03-31 17:23:28 -04:00
Mark Banner
aa106431fe
Bug 1825715 - Add section about ignoring formatting to ESLint docs. r=Gijs
...
This also does a general clean-up of the ESLint doc.
Differential Revision: https://phabricator.services.mozilla.com/D174218
2023-03-31 20:32:20 +00:00
Andrew Halberstadt
82d9947901
Bug 1811850 - [lint] Replace pylint linter with ruff, r=linter-reviewers,marco
...
This is enabling the PLE and PLC rules across a much larger swatch of the code
base. The PLR and PLW are additionally enabled at the warning level (introduces
~2500 new warnings).
To avoid extraneous changes in people's patches, rules at the warning level are
excluded from --fix.
Differential Revision: https://phabricator.services.mozilla.com/D172358
2023-03-20 13:06:28 +00:00
Andrew Halberstadt
dd673c2fb2
Bug 1811850 - [lint] Replace flake8 linter with ruff, r=linter-reviewers,sylvestre
...
Ruff is a very fast linter implemented in Rust and it can act as a drop-in
replacement for flake8. When running the same set of rules across all files
in mozilla-central (without mozlint), flake8 takes 900 seconds whereas ruff
takes 0.9 seconds.
Ruff also implements rules from other popular Python linters such as pylint,
isort and pyupgrade. There are even plans to implement feature parity with
black in the future. Ultimately, it can become our one stop shop for all Python
linting and formatting.
This stack will swap out all our Python lint tools for ruff (excluding black
for now).
Differential Revision: https://phabricator.services.mozilla.com/D172313
2023-03-20 13:06:27 +00:00
Cristian Tuns
c1b52fd95e
Backed out 5 changesets (bug 1811850) for causing linting bustages(bugzilla) CLOSED TREE
...
Backed out changeset e8fcfc7f8108 (bug 1811850)
Backed out changeset f8950d716c9e (bug 1811850)
Backed out changeset f650123cc188 (bug 1811850)
Backed out changeset d96f90c2c58b (bug 1811850)
Backed out changeset c3b0f9666183 (bug 1811850)
2023-03-16 22:16:30 -04:00
Andrew Halberstadt
054d07c54f
Bug 1811850 - [lint] Replace pylint linter with ruff, r=linter-reviewers,marco
...
This is enabling the PLE and PLC rules across a much larger swatch of the code
base. The PLR and PLW are additionally enabled at the warning level (introduces
~2500 new warnings).
To avoid extraneous changes in people's patches, rules at the warning level are
excluded from --fix.
Differential Revision: https://phabricator.services.mozilla.com/D172358
2023-03-17 01:54:00 +00:00
Andrew Halberstadt
8a4d48a70d
Bug 1811850 - [lint] Replace flake8 linter with ruff, r=linter-reviewers,sylvestre
...
Ruff is a very fast linter implemented in Rust and it can act as a drop-in
replacement for flake8. When running the same set of rules across all files
in mozilla-central (without mozlint), flake8 takes 900 seconds whereas ruff
takes 0.9 seconds.
Ruff also implements rules from other popular Python linters such as pylint,
isort and pyupgrade. There are even plans to implement feature parity with
black in the future. Ultimately, it can become our one stop shop for all Python
linting and formatting.
This stack will swap out all our Python lint tools for ruff (excluding black
for now).
Differential Revision: https://phabricator.services.mozilla.com/D172313
2023-03-17 01:53:58 +00:00
ogiorgis
be61f74c7a
Bug 1820759 - add sphinx support to rstcheck r=firefox-source-docs-reviewers,linter-reviewers,sylvestre DONTBUILD
...
This suppresses rstcheck errors due to code-block and caption .
This also removes errors related to mermaid (Bug 1815454).
We also need to use anonymous references instead of explicit ones to
avoid another lint error.
Differential Revision: https://phabricator.services.mozilla.com/D171860
2023-03-08 09:48:56 +00:00
Sylvestre Ledru
f616c106ea
no bug - doc: fix some typos r=marco
...
Differential Revision: https://phabricator.services.mozilla.com/D171688
2023-03-06 11:53:54 +00:00
Gijs Kruitbosch
2defa4450d
Bug 1795255 - add no-redeclare-with-import-autofix eslint rule to deal with duplicate imports in tests, r=Standard8
...
Differential Revision: https://phabricator.services.mozilla.com/D166177
2023-01-31 11:48:40 +00:00
ogiorgis
5fa906d358
Bug 1749473 - fix all pygments warnings r=sylvestre
...
Differential Revision: https://phabricator.services.mozilla.com/D167915
2023-01-27 13:41:10 +00:00
Sylvestre Ledru
13ac309924
Bug 1806331 - doc: use ChromeUtils.importESM instead of ChromeUtils.importESModule r=Standard8 DONTBUILD
...
Differential Revision: https://phabricator.services.mozilla.com/D165815
2023-01-03 18:47:59 +00:00
Sylvestre Ledru
bb96d6b3a7
Bug 1802290 - Remove +x permissions on doc files r=linter-reviewers,marco DONTBUILD
...
Differential Revision: https://phabricator.services.mozilla.com/D165665
2022-12-29 16:01:38 +00:00
Eemeli Aro
f08c01b802
Bug 1804404 - Update l10n documentation due to DTD & .inc removal. r=flod
...
Differential Revision: https://phabricator.services.mozilla.com/D164047
2022-12-07 11:50:39 +00:00
Mark Banner
a6cdc10b5c
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
f9ee846608
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
e87d5936ff
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
Greg Stoll
4c4a846ade
no bug - fx doc: fix a few links to old pages r=sylvestre DONTBUILD
...
Differential Revision: https://phabricator.services.mozilla.com/D162421
2022-11-18 21:20:18 +00:00
Mark Banner
f13a3ea497
Bug 1800874 - Add docs for eslint-build tester. r=aryx
...
Differential Revision: https://phabricator.services.mozilla.com/D162389
2022-11-18 19:34:34 +00:00
Makoto Kato
1756e8266e
Bug 1740799 - Format Kotlin code using ktlint. r=geckoview-reviewers,owlish,linter-reviewers,sylvestre
...
Android-component and Fenix use ktlint, so mozilla-central should use same
tools via spotless.
This is from https://phabricator.services.mozilla.com/D131018
Differential Revision: https://phabricator.services.mozilla.com/D161557
2022-11-18 00:55:03 +00:00
Sylvestre Ledru
2f9f65bbc4
Bug 1799620 - mozlint/clippy: using nightly isn't necessary anymore r=linter-reviewers,marco DONTBUILD
...
Differential Revision: https://phabricator.services.mozilla.com/D161564
2022-11-08 15:05:31 +00:00
june wilde
9da4567aa7
Bug 1796723 - Remove docs about foxyeah Compiler Explorer; r=freddyb
...
Differential Revision: https://phabricator.services.mozilla.com/D159912
2022-10-31 12:28:58 +00:00
Mark Banner
9613c19f16
Bug 1795880 - Add an ESLint rule to enforce using static imports where possible. r=arai,geckoview-reviewers,m_kato
...
Differential Revision: https://phabricator.services.mozilla.com/D160131
2022-10-26 09:37:46 +00:00
Mark Banner
7f3cba09e8
Bug 1795322 - Update toolkit modules references in remaining places. r=mossop,zeid,geckoview-reviewers,calu
...
Differential Revision: https://phabricator.services.mozilla.com/D160036
2022-10-26 08:06:37 +00:00
Csoregi Natalia
5f9da7b301
Backed out 12 changesets (bug 1795322) for causing multiple failures e.g. test_deletion_request_ping.py. CLOSED TREE
...
Backed out changeset aba25cbcda51 (bug 1795322)
Backed out changeset a4a35005ada9 (bug 1795322)
Backed out changeset 8e8d790eb0f4 (bug 1795322)
Backed out changeset db8903454bd3 (bug 1795322)
Backed out changeset 60cc71c61cad (bug 1795322)
Backed out changeset bc6a674994ad (bug 1795322)
Backed out changeset 6ac8a611f8c7 (bug 1795322)
Backed out changeset 9fb873ecfb31 (bug 1795322)
Backed out changeset c8a7a40c2a2f (bug 1795322)
Backed out changeset f2c118b6c6ce (bug 1795322)
Backed out changeset 38df43b4a70f (bug 1795322)
Backed out changeset 89aea8373411 (bug 1795322)
2022-10-25 23:47:58 +03:00
Mark Banner
fc7befc08d
Bug 1795322 - Update toolkit modules references in remaining places. r=mossop,zeid,geckoview-reviewers,calu
...
Differential Revision: https://phabricator.services.mozilla.com/D160036
2022-10-25 19:49:28 +00:00
Greg Stoll
ae193de801
no bug - fx doc: fix link to moved string guide page r=sylvestre DONTBUILD
...
Differential Revision: https://phabricator.services.mozilla.com/D159705
2022-10-19 19:51:27 +00:00
Simon Friedberger
81ebfde770
Bug 1788671 - Document how to add Services to eslint. r=Standard8 DONTBUILD
...
Differential Revision: https://phabricator.services.mozilla.com/D158753
2022-10-07 18:11:17 +00:00
Mathew Hodson
929b2a7154
Bug 1776578 - Make no-addtask-setup eslint rule check for init tasks. r=mossop
...
Differential Revision: https://phabricator.services.mozilla.com/D150333
2022-09-26 13:58:49 +00:00
Alexandre Poirot
848e2b334e
Bug 1791828 - [devtools] Remove eslint support for DevTools's lazyImporter. r=jdescottes
...
Differential Revision: https://phabricator.services.mozilla.com/D158004
2022-09-26 10:48:05 +00:00
Mark Banner
186d63f202
Bug 1479515 - Add an ESLint rule to check for valid property accesses on Services. r=Gijs
...
This is manually run and requires a full build. MOZ_OBJDIR needs to be set to point to the object directory.
Differential Revision: https://phabricator.services.mozilla.com/D156426
2022-09-12 16:38:44 +00:00
Mark Banner
274f8662e6
Bug 1479515 - Extend the ESLint rule for checking Ci properties to check for unknown interfaces as well. r=Gijs,application-update-reviewers,nalexander
...
Differential Revision: https://phabricator.services.mozilla.com/D156425
2022-09-12 16:38:44 +00:00
Mark Banner
fd892006be
Bug 1479515 - Add an ESLint rule to check for unknown property accesses on Ci. r=Gijs
...
This is manually run and requires a full build. MOZ_OBJDIR needs to be set to point to the object directory.
Differential Revision: https://phabricator.services.mozilla.com/D156424
2022-09-12 16:38:43 +00:00
Sylvestre Ledru
213c96564a
Bug 1787590 - Doc: Remove a 404 link r=jandem DONTBUILD
...
Differential Revision: https://phabricator.services.mozilla.com/D157112
2022-09-12 12:37:43 +00:00
Kagami Sascha Rosylight
102bd338be
Bug 1695435 - Part 2: Add more words to the chrome script heuristic in use-isInstance r=preferences-reviewers,Gijs,webdriver-reviewers,whimboo,sgalich
...
Differential Revision: https://phabricator.services.mozilla.com/D110932
2022-08-24 22:47:42 +00:00
Kagami Sascha Rosylight
a41415cb68
Bug 1695435 - Part 1: Use isInstance in XUL files r=Standard8
...
Differential Revision: https://phabricator.services.mozilla.com/D154841
2022-08-22 18:34:44 +00:00
André Bargull
60863b7187
Bug 1783404: Support --fix option when eslint-plugin-spidermonkey-js is used. r=tcampbell
...
Differential Revision: https://phabricator.services.mozilla.com/D153843
2022-08-12 06:10:55 +00:00
Max Smolens
8596bc0440
Bug 1617103 - Add documentation for yamllint. r=sylvestre DONTBUILD
...
Differential Revision: https://phabricator.services.mozilla.com/D154108
2022-08-09 19:13:45 +00:00
André Bargull
96daf134a0
Bug 1782491 - Part 1: Add self-hosted code environment plugin. r=tcampbell
...
Adds a simple ESLint plugin for custom environments.
The plugin has a single exported value named `globals`, which is an object with
keys for all globally available self-hosted identifiers. All self-hosted values
are read-only, so we set all properties of `globals` to `"readonly"`.
BytecodeEmitter special identifiers are added to the `.eslintrc.js` file,
because that keeps them closer to the SpiderMonkey source tree when compared
to "tools/lint/eslint/eslint-plugin-spidermonkey-js".
Also see:
- tools/lint/eslint/eslint-plugin-mozilla/lib/environments/
- https://eslint.org/docs/latest/user-guide/configuring/language-options
Differential Revision: https://phabricator.services.mozilla.com/D153337
2022-08-05 09:58:58 +00:00
Mark Banner
4ed899ee38
Bug 1782008 - Add existing test directories to the ESLint test path definition file. r=mossop
...
Differential Revision: https://phabricator.services.mozilla.com/D152735
2022-08-03 11:16:19 +00:00
Tooru Fujisawa
de340512f3
Bug 1779988 - Part 2: Add ESLint rule that rejects multiple ChromeUtils.defineESModuleGetters call on the same object. r=Standard8
...
Differential Revision: https://phabricator.services.mozilla.com/D152880
2022-07-28 00:54:20 +00:00
Francesco Lodolo (:flod)
2d85581b2c
Bug 1781010: Fluent linter, add checks for hard-coded brand names,r=gregtatum,linter-reviewers,sylvestre
...
Differential Revision: https://phabricator.services.mozilla.com/D152718
2022-07-26 19:48:08 +00:00
Tooru Fujisawa
5cda6987cf
Bug 1780543 - Part 11: Update document for environment. r=Standard8
...
Depends on D152648
Differential Revision: https://phabricator.services.mozilla.com/D152649
2022-07-26 02:46:32 +00:00
Andrew Halberstadt
e818e28315
Bug 1780087 - Convert some searchfox links under 'docs/code-quality' to the new role, r=linter-reviewers,sylvestre
...
This is more to demonstrate the use of the role than anything else.
Differential Revision: https://phabricator.services.mozilla.com/D152125
2022-07-19 15:41:08 +00:00
Mark Banner
a869ce033b
Bug 1779989 - Explicitly disallow ES modules in ESLint import-globals-from statements. r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D152002
2022-07-19 05:57:15 +00:00
Tooru Fujisawa
c26c3f5551
Bug 1667455 - Part 14: Stop importing Services.jsm in documents. r=kmag,necko-reviewers,dragana
...
Differential Revision: https://phabricator.services.mozilla.com/D150903
2022-07-11 12:41:54 +00:00
Mark Banner
6cc792275f
Bug 1777451 - Add a rule to prevent/recommend against using globalThis or window in non-system modules for lazy getters. r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D151083
2022-07-06 08:35:59 +00:00
Mark Banner
e3f245f121
Bug 1764513 - Update ESLint docs for how to set up test configuration and how to use ES modules. r=arai
...
Differential Revision: https://phabricator.services.mozilla.com/D151039
2022-07-05 17:09:43 +00:00
Tooru Fujisawa
8cc73badc6
Bug 1776837 - Part 2: Reject defining lazy getter for module that is already loaded eagerly at top-level. r=mossop
...
Depends on D150935
Differential Revision: https://phabricator.services.mozilla.com/D150936
2022-07-05 01:01:35 +00:00