dpapad | ff82d51 | 2017-05-25 18:40:15 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | module.exports = { |
| 6 | 'root': true, |
| 7 | 'env': { |
| 8 | 'browser': true, |
Christopher Lam | a5f2ad0 | 2018-12-05 10:05:58 | [diff] [blame^] | 9 | 'es6': true, |
| 10 | }, |
| 11 | 'parserOptions': { |
| 12 | 'ecmaVersion': 2017, |
dpapad | ff82d51 | 2017-05-25 18:40:15 | [diff] [blame] | 13 | }, |
| 14 | 'rules': { |
| 15 | // Enabled checks. |
| 16 | 'no-extra-semi': 'error', |
dpapad | 728cff0c | 2017-06-01 01:06:42 | [diff] [blame] | 17 | 'no-new-wrappers': 'error', |
Christopher Lam | a5f2ad0 | 2018-12-05 10:05:58 | [diff] [blame^] | 18 | 'no-restricted-properties': [ |
| 19 | 'error', |
| 20 | { |
| 21 | 'object': 'document', |
| 22 | 'property': 'getElementById', |
| 23 | 'message': 'Use $(\'id\') or getSVGElement(\'id\') ' + |
| 24 | 'from chrome://resources/js/util.js instead of ' + |
| 25 | 'document.getElementById(\'id\')', |
dpapad | 2674f928 | 2017-05-31 19:40:39 | [diff] [blame] | 26 | }, |
| 27 | ], |
dpapad | 1e511b1 | 2017-05-31 03:31:26 | [diff] [blame] | 28 | 'semi': ['error', 'always'], |
dpapad | 2674f928 | 2017-05-31 19:40:39 | [diff] [blame] | 29 | |
dpapad | ff82d51 | 2017-05-25 18:40:15 | [diff] [blame] | 30 | // TODO(dpapad): Add more checks according to our styleguide. |
| 31 | }, |
| 32 | }; |