blob: 36dc6d489f5cfbdea94ee0184028d0fe40895610 [file] [log] [blame]
dpapadff82d512017-05-25 18:40:151// 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
5module.exports = {
6 'root': true,
7 'env': {
8 'browser': true,
Christopher Lama5f2ad02018-12-05 10:05:589 'es6': true,
10 },
11 'parserOptions': {
12 'ecmaVersion': 2017,
dpapadff82d512017-05-25 18:40:1513 },
14 'rules': {
15 // Enabled checks.
Dan Beam1a0d9dcb2019-01-08 09:05:3516 'brace-style': ['error', '1tbs'],
17 'curly': ['error', 'multi-line', 'consistent'],
Dan Beamb1536652019-02-26 07:36:2518 'no-extra-boolean-cast': 'error',
dpapadff82d512017-05-25 18:40:1519 'no-extra-semi': 'error',
dpapad728cff0c2017-06-01 01:06:4220 'no-new-wrappers': 'error',
Christopher Lama5f2ad02018-12-05 10:05:5821 'no-restricted-properties': [
22 'error',
23 {
24 'object': 'document',
25 'property': 'getElementById',
26 'message': 'Use $(\'id\') or getSVGElement(\'id\') ' +
27 'from chrome://resources/js/util.js instead of ' +
28 'document.getElementById(\'id\')',
dpapad2674f9282017-05-31 19:40:3929 },
30 ],
dpapad1e511b12017-05-31 03:31:2631 'semi': ['error', 'always'],
dpapad2674f9282017-05-31 19:40:3932
dpapadff82d512017-05-25 18:40:1533 // TODO(dpapad): Add more checks according to our styleguide.
34 },
35};