Closed Bug 1878553 Opened 8 months ago Closed 8 months ago

Simplify ESLint configuration for jsx and .config.(m)js files

Categories

(Developer Infrastructure :: Lint and Formatting, task, P3)

Tracking

(firefox124 fixed)

RESOLVED FIXED
Tracking Status
firefox124 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(3 files)

All of the jsx files in-tree are ES module based, I think it is reasonable that ESLint to be set up to treat them all as ES modules automatically. This will also remove the need for these to be treated on a per-directory basis.

Similarly, we should treat *.config.(m)js files as being node based. These are typically Karma/Babel configuration files (and soon ESLint will be as well), so we should set up the configuration for those also.

I'm also going to slip in here a patch to add some documentation about rules that we've explicitly decided not to enable.

Blocks: 1878554
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/95f0fce63726 For ESLint, expect all jsx files to be ES modules. r=mossop,omc-reviewers,aminomancer https://hg.mozilla.org/integration/autoland/rev/cf49920cb1ad Define *.config.(m)js files as node based for ESLint. r=mossop,devtools-reviewers,omc-reviewers,nchevobbe,aminomancer https://hg.mozilla.org/integration/autoland/rev/ef999f293e3e Document a list of ESLint rules that we've decided not to enable. r=mossop

Backed out for causing node failures in aboutwelcome

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | karma /builds/worker/checkouts/gecko/browser/components/aboutwelcome | Coverage for statements (48.15%) in file /builds/worker/checkouts/gecko/browser/components/aboutwelcome/modules/AboutWelcomeDefaults.sys.mjs does not meet per file threshold (80%)
Flags: needinfo?(standard8)

Handling in bug 1878556

Flags: needinfo?(standard8)
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/223d169da6a8 For ESLint, expect all jsx files to be ES modules. r=mossop,omc-reviewers,aminomancer https://hg.mozilla.org/integration/autoland/rev/72758d9bbbf8 Define *.config.(m)js files as node based for ESLint. r=mossop,devtools-reviewers,omc-reviewers,nchevobbe,aminomancer https://hg.mozilla.org/integration/autoland/rev/b5a43ac53b86 Document a list of ESLint rules that we've decided not to enable. r=mossop
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: