Bug 221402

Summary: Web Inspector: Update .eslintrc to account for ECMAScript 2020
Product: WebKit Reporter: Razvan Caliman <rcaliman>
Component: Web InspectorAssignee: Razvan Caliman <rcaliman>
Status: RESOLVED FIXED    
Severity: Enhancement CC: ews-watchlist, hi, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

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>