Summary: | Web Inspector: Add more ESLint rules that reflect the current state of the code base | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tobias Reiss <tobi+webkit> | ||||
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Tobias Reiss
2015-03-29 23:59:35 PDT
Created attachment 249712 [details]
patch
Comment on attachment 249712 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=249712&action=review > Source/WebInspectorUI/.eslintrc:83 > + "comma-dangle": 0, I don't like using a comma dangle. > Source/WebInspectorUI/UserInterface/Models/SourceCodeLocation.js:-214 > - var currentDisplay = undefined; This should be legal. > Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js:-360 > - var prototypeName = undefined; Ditto. > Source/WebInspectorUI/UserInterface/Views/TypeTokenView.js:-113 > - }.bind(this)); This looks like a bug. The function uses this. > Source/WebInspectorUI/UserInterface/Views/TypeTokenView.js:113 > + }); Never mind. I see it does not now. Comment on attachment 249712 [details] patch Clearing flags on attachment: 249712 Committed r182142: <http://trac.webkit.org/changeset/182142> All reviewed patches have been landed. Closing bug. Comment on attachment 249712 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=249712&action=review >> Source/WebInspectorUI/.eslintrc:83 >> + "comma-dangle": 0, > > I don't like using a comma dangle. The rule is turned off. If you don't want contributors to use trailing commas than we could set "comma-dangle" to "never". >> Source/WebInspectorUI/UserInterface/Models/SourceCodeLocation.js:-214 >> - var currentDisplay = undefined; > > This should be legal. If you want both to be legal, we could set "no-undef-init" to 0. But keep in mind that `currentDisplay` is undefined by default. There's no need to set it explicitly. (In reply to comment #3) > Comment on attachment 249712 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=249712&action=review > > > Source/WebInspectorUI/.eslintrc:83 > > + "comma-dangle": 0, > > I don't like using a comma dangle. I do! It makes diffs easier to read. Also, any good minifier can get rid of the extra commas. Comment on attachment 249712 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=249712&action=review >>>> Source/WebInspectorUI/.eslintrc:83 >>>> + "comma-dangle": 0, >>> >>> I don't like using a comma dangle. >> >> The rule is turned off. If you don't want contributors to use trailing commas than we could set "comma-dangle" to "never". > > I do! It makes diffs easier to read. Also, any good minifier can get rid of the extra commas. ESLint offers 3 variations. "never", "always" and "always-multiline". https://github.com/eslint/eslint/blob/master/docs/rules/comma-dangle.md. |