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

Side by Side Diff: .eslintrc.js

Issue 2907763004: js_checker.py: Replace custom GetElementByIdCheck with ESLint no-restricted-properties. (Closed)
Patch Set: Resolve conflicts. 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/js_checker.py » ('j') | no next file with comments »
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-restricted-properties': ['error', {
15 'object': 'document',
16 'property': 'getElementById',
17 'message': 'Use $(\'id\') or getSVGElement(\'id\') ' +
18 'from chrome://resources/js/util.js instead of ' +
19 'document.getElementById(\'id\')',
20 },
21 ],
14 'semi': ['error', 'always'], 22 'semi': ['error', 'always'],
23
15 // TODO(dpapad): Add more checks according to our styleguide. 24 // TODO(dpapad): Add more checks according to our styleguide.
16 }, 25 },
17 }; 26 };
OLDNEW
« no previous file with comments | « no previous file | tools/web_dev_style/js_checker.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698