Skip to content

Commit

Permalink
[WebUI] Add ecmaVersion: 2017 to the root .eslintrc.js.
Browse files Browse the repository at this point in the history
This CL adds a parser option to the root .eslintrc.js which is needed
for async/await. Since this is now allowed by the style guide, it makes
sense to enable the parser option everywhere.

Bug: 905927
Change-Id: I6a11032e38602a95c765709a3a998e5cd27c4875
Reviewed-on: https://chromium-review.googlesource.com/c/1343464
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: calamity <calamity@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613924}
  • Loading branch information
nik3daz authored and Commit Bot committed Dec 5, 2018
1 parent f4a5a40 commit a5f2ad0
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,23 @@ module.exports = {
'root': true,
'env': {
'browser': true,
'es6': true
'es6': true,
},
'parserOptions': {
'ecmaVersion': 2017,
},
'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\')',
'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'],
Expand Down

0 comments on commit a5f2ad0

Please sign in to comment.