OLD | NEW |
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 }; |
OLD | NEW |