Closed Bug 1456078 Opened 2 years ago Closed 2 years ago

Investigate ESLint 5.0.x's compatibility

Categories

(Firefox Build System :: Lint and Formatting, enhancement, P2)

3 Branch
enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(2 files)

ESLint 5.0.0-alpha.1 has been released:

https://eslint.org/blog/2018/04/eslint-v5.0.0-alpha.1-released

There's a few breaking changes listed

https://eslint.org/docs/5.0.0/user-guide/migrating-to-5.0.0

We should check what needs fixing, and if there's any issues we pick up in ESLint 5 itself.
I've just experimented with upgrading to the alpha, and surprisingly, only one issue was found:

browser/base/content/tabbrowser.js
  590:27  error  'CSSAnimation' is not defined.  no-undef (eslint)

This is due to the removal of some browser/node globals that are apparently deprecated (we still seem to support it though).

The only other thing I've spotted is that the minimum node version is now 6.14.0, we're on 6.9.1, although 6.9.1 isn't broken for ESLint (and I guess it is unlikely), I think it makes it a good time to upgrade the requirement to 8.9.x as per the recent node thread.

I'll probably do that in a separate bug though, before this hits completely. First I'll send an intent to require.
Depends on: 1456076
Depends on: 1456085
I've just looked at 5.0.0-alpha.3, I've spotted a regression in how ESLint handles valid-jsdoc & return from async functions which I've filed as:

https://github.com/eslint/eslint/issues/10386

There's also an issue with a deprecation warning that appears in the json output as non-json, so I filed that as well:

https://github.com/eslint/eslint/issues/10387

though I'll also file a bug for getting the one remaining use of `experimentalObjectRestSpread` replaced.

Also, alpha 3 has changed no-self-assign's default to look at properties as well. That's picked up a few more issues, that I'll file bugs for.
Depends on: 1463085
Depends on: 1463088
Depends on: 1463089
Depends on: 1471540
Comment on attachment 8998130 [details]
Bug 1456078 - Upgrade ESLint to version 5.3.0, and eslint-plugin-html to 4.0.5.

Dave Townsend [:mossop] has approved the revision.

https://phabricator.services.mozilla.com/D2834
Attachment #8998130 - Flags: review+
Comment on attachment 8998125 [details]
Bug 1456078 - Enable eslint-plugin-mozilla's parsing of HTML files to understand script tags with type="module".

Dave Townsend [:mossop] has approved the revision.

https://phabricator.services.mozilla.com/D2833
Attachment #8998125 - Flags: review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d7e4ce95a34e
Enable eslint-plugin-mozilla's parsing of HTML files to understand script tags with type="module". r=mossop
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cbd1cebd5af9
Upgrade ESLint to version 5.3.0, and eslint-plugin-html to 4.0.5. r=mossop
https://hg.mozilla.org/mozilla-central/rev/d7e4ce95a34e
https://hg.mozilla.org/mozilla-central/rev/cbd1cebd5af9
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Note that this has broken ESLint in VS Code which uses an older node version than we target. I have created a patch for VS Code's ESLint plugin to correct the problem and am waiting for it to be merged: https://github.com/Microsoft/vscode-eslint/issues/345
Depends on: 1485793
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.