summaryrefslogtreecommitdiff
path: root/chromium/.eslintrc.js
blob: 766d2114dacd272f87c3d35dd6ce4faa7fb6624a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module.exports = {
  'root': true,
  'env': {
    'browser': true,
    'es6': true
  },
  'rules': {
    // Enabled checks.
    'no-extra-semi': 'error',
    'no-new-wrappers': 'error',
    'no-restricted-properties': ['error', {
      'object': 'document',
      'property': 'getElementById',
      'message': 'Use $(\'id\') or getSVGElement(\'id\') ' +
          'from chrome://resources/js/util.js instead of ' +
          'document.getElementById(\'id\')',
      },
    ],
    'semi': ['error', 'always'],

    // TODO(dpapad): Add more checks according to our styleguide.
  },
};