Commit graph

162 commits

Author SHA1 Message Date
Gijs Kruitbosch
51a4c7d0e9 Bug 1880899 - add lint rule that prevents adding more browser.js globals, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D202804
2024-03-16 15:14:07 +00:00
Gijs Kruitbosch
ac554f095a Bug 1856535 - allow linters to work by excluding extensions instead of including them, r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D202635
2024-03-13 09:40:27 +00:00
Mark Banner
43d2964f1b 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
Tooru Fujisawa
1c0b4e73a1 Bug 1879254 - Verify .gitignore and .hgignore consistency. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D201072
2024-02-22 04:48:27 +00:00
Mark Banner
cf22056919 Bug 1878848 - Remove ESLint support for .jsm.js extensions. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D200771
2024-02-06 13:32:52 +00:00
Tom Marble
3c78905f47 Bug 1868866 - adds ManifestParser TOML linter r=jmaher,linter-reviewers,ahal,webdriver-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,fxview-reviewers,cookie-reviewers,sessionstore-reviewers,places-reviewers,dom-storage-reviewers,translations-reviewers,valentin,whimboo,Standard8,sclements,jesup
Differential Revision: https://phabricator.services.mozilla.com/D199054
2024-01-29 17:30:48 +00:00
Sandor Molnar
51bb77759a Backed out changeset 2be67d91cf16 (bug 1868866) for causing Mn failures at toolkit/xre/test/marionette/test_exitcode.py CLOSED TREE 2024-01-27 00:15:22 +02:00
Tom Marble
2434015dc5 Bug 1868866 - adds ManifestParser TOML linter r=jmaher,linter-reviewers,ahal,webdriver-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,fxview-reviewers,cookie-reviewers,sessionstore-reviewers,places-reviewers,dom-storage-reviewers,translations-reviewers,valentin,whimboo,Standard8,sclements,jesup
Differential Revision: https://phabricator.services.mozilla.com/D199054
2024-01-26 20:06:56 +00:00
Gregory Pappas
1ea1f154f9 Bug 1872922 - Replace last few uses of XPCOMUtils.defineLazyGetter with ChromeUtils.defineLazyGetter and add linter error for XPCOMUtils.defineLazyGetter r=extension-reviewers,credential-management-reviewers,devtools-reviewers,Standard8,arai,robwu,Gijs,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D198677
2024-01-17 15:54:00 +00:00
Gijs Kruitbosch
6e486d97d8 Bug 1780071 - add eslint rule for misuse of assignments or conditions inside ok(), r=linter-reviewers,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D198593
2024-01-17 15:04:34 +00:00
Luca Greco
398b822d42 Bug 1868144 - Introduce a new condprof-addons linter and condprof-addons-verify taskcluster task. r=sparky,jmaher,linter-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D195434
2024-01-17 14:07:53 +00:00
Cristian Tuns
6f633887ad Backed out 2 changesets (bug 1868144, bug 1874487) for causing mozlint-condprof-addons failures CLOSED TREE
Backed out changeset 7a65679aabcf (bug 1874487)
Backed out changeset cd38cf3f7807 (bug 1868144)
2024-01-16 16:34:11 -05:00
Luca Greco
95d082d369 Bug 1868144 - Introduce a new condprof-addons linter and condprof-addons-verify taskcluster task. r=sparky,jmaher,linter-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D195434
2024-01-16 21:11:33 +00:00
Mark Banner
c7947b6868 Bug 1872674 - Add an ESLint rule to reject new uses of Console.sys.mjs/Log.sys.mjs. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D197504
2024-01-16 13:37:07 +00:00
Joel Maher
23271e7f18 Bug 1859911 - migrate raptor .ini to .toml. r=sparky,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D197392
2024-01-09 20:43:41 +00:00
ogiorgis
3079434403 Bug 1749473 - fix quotes in js code-block r=sylvestre,firefox-source-docs-reviewers DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D196076
2023-12-11 17:42:34 +00:00
Mark Banner
922f753e7e Bug 1858148 - Change ESLint rule reject-importGlobalProperties to reject all imports in sjs files. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D190760
2023-11-04 09:29:27 +00:00
Gijs Kruitbosch
9f12bb6d1c Bug 1790354 - stop using individual inclusions for toctree by moving all eslint rules things to a subdir, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D192213
2023-10-30 15:29:47 +00:00
Gijs Kruitbosch
ffeedb34d2 Bug 1790354 - warn about using browser/ code from toolkit, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D191976
2023-10-30 15:29:47 +00:00
Cristian Tuns
7d2d3c884f Backed out changeset c66fc23f71d5 (bug 1790354) for causing doc-generate failures. CLOSED TREE 2023-10-27 13:06:04 -04:00
Gijs Kruitbosch
0825ad24e1 Bug 1790354 - warn about using browser/ code from toolkit, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D191976
2023-10-27 15:02:09 +00:00
Mark Banner
8679d01066 Bug 1860427 - Add a new environment to ESLint for testharness.js and automatically use it for html files including the harness. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D191581
2023-10-23 15:37:18 +00:00
Mark Banner
bed6c05a75 Bug 1774888 - Remove XPCOMUtils.defineLazyModuleGetter. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D189722
2023-10-02 09:48:01 +00:00
Mark Banner
c844efb4b1 Bug 1855948 - Fix link on enabling ESLint rules page. r=aminomancer DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D189641
2023-09-29 13:09:01 +00:00
Mark Banner
03c088d08d Bug 1851632 - Add ESLint documentation about adding rules and plugins. r=Gijs,mossop
Differential Revision: https://phabricator.services.mozilla.com/D187475
2023-09-26 21:27:40 +00:00
Mark Banner
785dd2b75e Bug 1851632 - Improve documentation on linting for running locally and within editors. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D187474
2023-09-26 21:27:40 +00:00
Mark Banner
c2782050e8 Bug 1854948 - Remove support for Cu.import and XPCOMUtils.defineLazyModuleGetter from most of ESLint. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D189132
2023-09-25 14:26:43 +00:00
Andrew Halberstadt
5983e78c51 Bug 1848533 - Update 'create linter' example to use ruff, r=linter-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D187133
2023-08-31 04:17:34 +00:00
Mark Banner
98a950aa76 Bug 1846758 - Automatically mark *.worker.?js files as belonging to the worker environment. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D185321
2023-08-04 09:51:15 +00:00
Tooru Fujisawa
aa900309a0 Bug 1843797 - Add ESLint rule to reject ChromeUtils.import. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D183696
2023-07-31 21:03:44 +00:00
Vincent Hilla
3f90cef3c9 Bug 1845550 - Docs on linting: clarify command to create git hook. r=ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D184600
2023-07-26 19:06:22 +00:00
Dave Townsend
60c7c71e2d Bug 1842620: Add overviews of the main applications to the docs. r=Gijs,geckoview-reviewers,owlish,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D183173
2023-07-26 18:22:32 +00:00
Arthur Carcano
640dd3d14e Bug 1831312 - Use the mach cargo machinery to lint using clippy. r=glandium,linter-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D177156
2023-05-17 11:07:47 +00:00
Barret Rennie
a645de723e Bug 1776480 - Remove OS.File et al. r=Gijs,webidl,smaug
This patch removes the vast majority of OS.File and support code. A few things remain:

- The nsIOSFileConstantsService still exists, but the path related constants
  (OS.Constants.Path.*) are no longer added to the OS object. The plan is to
  replace this with a proper service e.g. Services.osConstants or similar) in
  bug 1786885.
- There is still support for OS.File errors in ErrorSanitizer, which will be
  removed in bug 1775167.
- The OS.File to IOUtils migration guide will be rewritten as general IOUtils
  documentation in bug 1830097.
- dom/base/Document.cpp has a workaround for not loading osfile.jsm at startup,
  which may want to be reconsidered in bug 1830100.

So long, and thanks for all the I/O.

Differential Revision: https://phabricator.services.mozilla.com/D176543
2023-05-12 18:34:28 +00:00
Sandor Molnar
924826ccad Backed out changeset 987d013caf11 (bug 1776480) for causing xpc failures in toolkit/components/extensions/test/xpcshell/test_ext_downloads_download.js CLOSED TREE 2023-05-11 22:36:59 +03:00
Barret Rennie
6149948e68 Bug 1776480 - Remove OS.File et al. r=Gijs,webidl,smaug
This patch removes the vast majority of OS.File and support code. A few things remain:

- The nsIOSFileConstantsService still exists, but the path related constants
  (OS.Constants.Path.*) are no longer added to the OS object. The plan is to
  replace this with a proper service e.g. Services.osConstants or similar) in
  bug 1786885.
- There is still support for OS.File errors in ErrorSanitizer, which will be
  removed in bug 1775167.
- The OS.File to IOUtils migration guide will be rewritten as general IOUtils
  documentation in bug 1830097.
- dom/base/Document.cpp has a workaround for not loading osfile.jsm at startup,
  which may want to be reconsidered in bug 1830100.

So long, and thanks for all the I/O.

Differential Revision: https://phabricator.services.mozilla.com/D176543
2023-05-11 17:49:27 +00:00
Gijs Kruitbosch
f238fa0035 Bug 1508369 - add stylelint linter support to mach lint, r=Standard8,dao,linter-reviewers,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D177477
2023-05-11 16:06:38 +00:00
Norisz Fay
bf5ea8f459 Backed out changeset 3d766d94945d (bug 1776480) for causing multiple xpcshell and bc failures CLOSED TREE 2023-04-28 06:55:03 +03:00
Barret Rennie
7bae7d5d70 Bug 1776480 - Remove OS.File et al. r=Gijs
This patch removes the vast majority of OS.File and support code. A few things remain:

- The nsIOSFileConstantsService still exists, but the path related constants
  (OS.Constants.Path.*) are no longer added to the OS object. The plan is to
  replace this with a proper service e.g. Services.osConstants or similar) in
  bug 1786885.
- There is still support for OS.File errors in ErrorSanitizer, which will be
  removed in bug 1775167.
- The OS.File to IOUtils migration guide will be rewritten as general IOUtils
  documentation in bug 1830097.
- dom/base/Document.cpp has a workaround for not loading osfile.jsm at startup,
  which may want to be reconsidered in bug 1830100.

So long, and thanks for all the I/O.

Differential Revision: https://phabricator.services.mozilla.com/D176543
2023-04-28 02:35:13 +00:00
Butkovits Atila
608af74b62 Backed out changeset fc8a2b80e9f6 (bug 1776480) for causing Gecko Decision bustage. CLOSED TREE 2023-04-28 04:31:36 +03:00
Barret Rennie
b2b98d70e4 Bug 1776480 - Remove OS.File et al. r=Gijs
This patch removes the vast majority of OS.File and support code. A few things remain:

- The nsIOSFileConstantsService still exists, but the path related constants
  (OS.Constants.Path.*) are no longer added to the OS object. The plan is to
  replace this with a proper service e.g. Services.osConstants or similar) in
  bug 1786885.
- There is still support for OS.File errors in ErrorSanitizer, which will be
  removed in bug 1775167.
- The OS.File to IOUtils migration guide will be rewritten as general IOUtils
  documentation in bug 1830097.
- dom/base/Document.cpp has a workaround for not loading osfile.jsm at startup,
  which may want to be reconsidered in bug 1830100.

So long, and thanks for all the I/O.

Differential Revision: https://phabricator.services.mozilla.com/D176543
2023-04-28 01:10:56 +00:00
Tooru Fujisawa
042e8e9bff Bug 1827163 - Support ChromeUtils.defineLazyGetter in ESLint rules. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D175081
2023-04-14 00:18:11 +00:00
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