Bug 221402 - Web Inspector: Update .eslintrc to account for ECMAScript 2020
Summary: Web Inspector: Update .eslintrc to account for ECMAScript 2020
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Enhancement
Assignee: Razvan Caliman
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-04 04:35 PST by Razvan Caliman
Modified: 2021-02-04 09:36 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.90 KB, patch)
2021-02-04 04:41 PST, Razvan Caliman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Razvan Caliman 2021-02-04 04:35:06 PST
The current .eslintrc file uses the ECMAScript 2018 parser option which yells for newer features of JavaScript such as Optional Chaining Operator (?.) which are used in WebInspectorUI.

Updating the config makes linters stop throwing ESLint errors for new JS language features.

**NOTE** 

To understand ECMAScript, the linter package in your editor must support ESLint v6.2.0 or newer [1], or it must provide an option to use a custom ESLint install available on your $PATH.

[1] https://eslint.org/blog/2019/08/eslint-v6.2.0-released
Comment 1 Razvan Caliman 2021-02-04 04:41:25 PST
Created attachment 419272 [details]
Patch
Comment 2 Devin Rousso 2021-02-04 09:20:53 PST
Comment on attachment 419272 [details]
Patch

rs=me
Comment 3 EWS 2021-02-04 09:35:03 PST
Committed r272372: <https://trac.webkit.org/changeset/272372>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 419272 [details].
Comment 4 Radar WebKit Bug Importer 2021-02-04 09:36:14 PST
<rdar://problem/73984933>