Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Issue 2834433002: MD Settings: ESLint --fix output, WIP. (Closed)

Created:
3 years, 8 months ago by dpapad
Modified:
3 years, 7 months ago
Reviewers:
CC:
arv+watch_chromium.org, chromium-reviews, dbeam+watch-settings_chromium.org, Dan Beam, dschuyler, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, stevenjb+watch-md-settings_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

MD Settings: ESLint --fix output, WIP. gulp lint --filter=settings --fix BUG=None CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Patch Set 1 #

Total comments: 27

Patch Set 2 : Relax #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -7 lines) Patch
M chrome/browser/resources/settings/about_page/update_warning_dialog.js View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/prefs/prefs.js View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/site_settings/cookie_tree_node.js View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/site_settings/website_usage_private_api.js View 1 1 chunk +2 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 13 (7 generated)
dpapad
Current ESLint configuration can be seen at https://codereview.chromium.org/2589333004. I had to turn off various checks ...
3 years, 8 months ago (2017-04-19 17:48:22 UTC) #3
dschuyler
Just some observations. Trying to help because I'd like to use the auto formatting :) ...
3 years, 8 months ago (2017-04-19 18:58:41 UTC) #4
Dan Beam
https://codereview.chromium.org/2834433002/diff/1/chrome/browser/resources/settings/about_page/update_warning_dialog.js File chrome/browser/resources/settings/about_page/update_warning_dialog.js (right): https://codereview.chromium.org/2834433002/diff/1/chrome/browser/resources/settings/about_page/update_warning_dialog.js#newcode42 chrome/browser/resources/settings/about_page/update_warning_dialog.js:42: this.$$('#update-warning-message').innerHTML = On 2017/04/19 17:48:22, dpapad wrote: > Single ...
3 years, 8 months ago (2017-04-19 19:04:40 UTC) #6
Dan Beam
https://codereview.chromium.org/2834433002/diff/1/chrome/browser/resources/settings/internet_page/internet_page.js File chrome/browser/resources/settings/internet_page/internet_page.js (right): https://codereview.chromium.org/2834433002/diff/1/chrome/browser/resources/settings/internet_page/internet_page.js#newcode283 chrome/browser/resources/settings/internet_page/internet_page.js:283: })) { On 2017/04/19 18:58:41, dschuyler wrote: > The ...
3 years, 8 months ago (2017-04-19 19:07:03 UTC) #7
dpapad
Thanks for the initial comments. Posted some responses. I think most of the comments are ...
3 years, 8 months ago (2017-04-19 19:19:55 UTC) #8
dpapad
3 years, 7 months ago (2017-05-05 18:20:46 UTC) #13
I have relaxed the checks quite a bit for now (see config at
https://codereview.chromium.org/2589333004/diff/140001/chrome/browser/resourc...).


Turning off 'indent' checks basically reduced the amount of errors dramatically.
As discussed previously, I'll let clang-format handle indenting for now, and let
ESLint check other stuff (stuff that is not checked by clang-format).

If this output looks reasonable, I'll look onto
 1) Add ESLint to our NPM deps.
 2) Add PRESUBMIT magic so that it only runs on affected files.

Slowly roll it out from MD Settings, to other UI pages.

https://codereview.chromium.org/2834433002/diff/1/chrome/browser/resources/se...
File chrome/browser/resources/settings/prefs/prefs.js (right):

https://codereview.chromium.org/2834433002/diff/1/chrome/browser/resources/se...
chrome/browser/resources/settings/prefs/prefs.js:91: }
On 2017/04/19 at 19:19:55, dpapad wrote:
> On 2017/04/19 at 19:04:40, Dan Beam wrote:
> > did you do this or did eslint --fix do this?
> 
> I didn't do any manual text editing in this CL. This is the output of --fix.

So this was done because of http://eslint.org/docs/rules/no-extra-semi, which is
included in the default "eslint:recommended" configuration.

https://codereview.chromium.org/2834433002/diff/1/chrome/browser/resources/se...
File chrome/browser/resources/settings/route.js (left):

https://codereview.chromium.org/2834433002/diff/1/chrome/browser/resources/se...
chrome/browser/resources/settings/route.js:292: return !!matchingKey ?
Route[matchingKey] : null;
On 2017/04/19 at 19:04:40, Dan Beam wrote:
> On 2017/04/19 17:48:22, dpapad wrote:
> > http://eslint.org/docs/rules/no-extra-boolean-cast fix. We can turn that off
if
> > not desired.
> 
> compiler will whine in some cases

Done, turned this off for now.

Powered by Google App Engine
This is Rietveld 408576698