Closed Bug 1725952 Opened 3 years ago Closed 3 years ago

Upgrade to ESLint v8.x

Categories

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

Tracking

(firefox101 fixed)

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: saschanaz, Assigned: standard8)

References

()

Details

Attachments

(2 files)

https://github.com/eslint/eslint/blob/master/docs/user-guide/migrating-to-8.0.0.md

Although the actual release is still in beta stage, the migration guide is now published. Probably a good chance to deal with breaking changes.

This release adds Top Level Await support and thus should allow:

<script type=module>
SimpleTest.waitForExplicitFinish();
await SimpleTest.promiseFocus(); // Currently ESLint v7 blocks this
</script>

Bug 1725934 is going to update Babel which will give us top level await support.

We do want to upgrade to ESLint 8 once it is ready. So I took a look at the current version and there's currently a couple of blockers:

  • eslint-plugin-import breaks with eslint v8. They have work in progress to help fix it.
  • The ESLint rule no-loss-of-precision is enabled by default in v8. There's a few cases where we fail, so we could fix those ahead of time as the rule is in the current ESLint versions.
  • There's a few cases where the new treatment of directives for in-line comments causes ESLint failures - namely where a comment line starts with "global".
Severity: -- → N/A
Depends on: 1725934
Priority: -- → P3
Depends on: 1730126

v8.1.0 has been released.

Summary: Upgrade to ESLint v8 → Upgrade to ESLint v8.1.0

At the moment there's no rush to update, in particular, Atom's linter-eslint is broken:

https://github.com/AtomLinter/linter-eslint/issues/1440

We also need updates from dependencies:

https://github.com/yannickcr/eslint-plugin-react/pull/3059
https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/809
https://github.com/mozilla/eslint-plugin-no-unsanitized (I'm told it will be worked on soon)
https://github.com/babel/babel/issues/13712 (not sure if needed or not)

Summary: Upgrade to ESLint v8.1.0 → Upgrade to ESLint v8.x
Depends on: 1760286

I think most of the blockers here have now been resolved, adding to my list to look at soon.

Assignee: nobody → standard8

Depends on D144001

Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c7e2ecdf4126 Drop .xul file support for eslint-plugin-mozilla. r=Mardak https://hg.mozilla.org/integration/autoland/rev/adef1e773e19 Upgrade ESLint to v8.x. r=Mardak
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
Regressions: 1766090
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: