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

Side by Side Diff: .eslintrc.js

Issue 2913453002: js_checker.py: Replace custom WrapperTypeCheck with ESLint's no-new-wrappers. (Closed)
Patch Set: Add smoke tests. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/web_dev_style/PRESUBMIT.py » ('j') | tools/web_dev_style/PRESUBMIT.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module.exports = { 5 module.exports = {
6 'root': true, 6 'root': true,
7 'env': { 7 'env': {
8 'browser': true, 8 'browser': true,
9 'es6': true 9 'es6': true
10 }, 10 },
11 'rules': { 11 'rules': {
12 // Enabled checks. 12 // Enabled checks.
13 'no-extra-semi': 'error', 13 'no-extra-semi': 'error',
14 'no-new-wrappers': 'error',
14 'no-restricted-properties': ['error', { 15 'no-restricted-properties': ['error', {
15 'object': 'document', 16 'object': 'document',
16 'property': 'getElementById', 17 'property': 'getElementById',
17 'message': 'Use $(\'id\') or getSVGElement(\'id\') ' + 18 'message': 'Use $(\'id\') or getSVGElement(\'id\') ' +
18 'from chrome://resources/js/util.js instead of ' + 19 'from chrome://resources/js/util.js instead of ' +
19 'document.getElementById(\'id\')', 20 'document.getElementById(\'id\')',
20 }, 21 },
21 ], 22 ],
22 'semi': ['error', 'always'], 23 'semi': ['error', 'always'],
23 24
24 // TODO(dpapad): Add more checks according to our styleguide. 25 // TODO(dpapad): Add more checks according to our styleguide.
25 }, 26 },
26 }; 27 };
OLDNEW
« no previous file with comments | « no previous file | tools/web_dev_style/PRESUBMIT.py » ('j') | tools/web_dev_style/PRESUBMIT.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698