Kasper Nilsson | 4a03e36 | 2017-04-27 10:01:37 +0200 | [diff] [blame] | 1 | { |
| 2 | "extends": ["eslint:recommended", "google"], |
Viktar Donich | 211f053 | 2018-08-14 10:59:10 -0700 | [diff] [blame] | 3 | "parserOptions": { |
| 4 | "ecmaVersion": 8 |
| 5 | }, |
Kasper Nilsson | 4a03e36 | 2017-04-27 10:01:37 +0200 | [diff] [blame] | 6 | "env": { |
| 7 | "browser": true, |
| 8 | "es6": true |
| 9 | }, |
| 10 | "globals": { |
| 11 | "__dirname": false, |
| 12 | "app": false, |
| 13 | "page": false, |
| 14 | "Polymer": false, |
| 15 | "process": false, |
| 16 | "require": false, |
| 17 | "Gerrit": false, |
| 18 | "Promise": false, |
| 19 | "assert": false, |
| 20 | "test": false, |
| 21 | "flushAsynchronousOperations": false |
| 22 | }, |
| 23 | "rules": { |
| 24 | "arrow-parens": ["error", "as-needed"], |
Kasper Nilsson | ac8bea9 | 2017-07-20 13:07:48 -0700 | [diff] [blame] | 25 | "block-spacing": ["error", "always"], |
Kasper Nilsson | 4a03e36 | 2017-04-27 10:01:37 +0200 | [diff] [blame] | 26 | "brace-style": ["error", "1tbs", { "allowSingleLine": true }], |
| 27 | "camelcase": "off", |
| 28 | "comma-dangle": ["error", "always-multiline"], |
| 29 | "eol-last": "off", |
Kasper Nilsson | 076adcd | 2017-07-05 11:17:26 -0700 | [diff] [blame] | 30 | "indent": "off", |
| 31 | "indent-legacy": ["error", 2, { |
Kasper Nilsson | 4a03e36 | 2017-04-27 10:01:37 +0200 | [diff] [blame] | 32 | "MemberExpression": 2, |
| 33 | "FunctionDeclaration": {"body": 1, "parameters": 2}, |
| 34 | "FunctionExpression": {"body": 1, "parameters": 2}, |
| 35 | "CallExpression": {"arguments": 2}, |
| 36 | "ArrayExpression": 1, |
| 37 | "ObjectExpression": 1, |
| 38 | "SwitchCase": 1 |
| 39 | }], |
Kasper Nilsson | 1b5d74b | 2017-06-02 11:12:50 -0700 | [diff] [blame] | 40 | "keyword-spacing": ["error", { "after": true, "before": true }], |
Kasper Nilsson | 4a03e36 | 2017-04-27 10:01:37 +0200 | [diff] [blame] | 41 | "max-len": [ |
| 42 | "error", |
| 43 | 80, |
| 44 | 2, |
| 45 | {"ignoreComments": true} |
| 46 | ], |
| 47 | "new-cap": ["error", { "capIsNewExceptions": ["Polymer"] }], |
| 48 | "no-console": "off", |
Kasper Nilsson | 0c04562 | 2017-08-18 15:53:43 -0700 | [diff] [blame] | 49 | "no-restricted-syntax": [ |
| 50 | "error", |
| 51 | { |
| 52 | "selector": "ExpressionStatement > CallExpression > MemberExpression[object.name='test'][property.name='only']", |
| 53 | "message": "Remove test.only." |
| 54 | }, |
| 55 | { |
| 56 | "selector": "ExpressionStatement > CallExpression > MemberExpression[object.name='suite'][property.name='only']", |
| 57 | "message": "Remove suite.only." |
| 58 | } |
| 59 | ], |
Kasper Nilsson | 4a03e36 | 2017-04-27 10:01:37 +0200 | [diff] [blame] | 60 | "no-undef": "off", |
Kasper Nilsson | 076adcd | 2017-07-05 11:17:26 -0700 | [diff] [blame] | 61 | "no-useless-escape": "off", |
Kasper Nilsson | 4a03e36 | 2017-04-27 10:01:37 +0200 | [diff] [blame] | 62 | "no-var": "error", |
| 63 | "object-shorthand": ["error", "always"], |
| 64 | "prefer-arrow-callback": "error", |
| 65 | "prefer-const": "error", |
| 66 | "prefer-spread": "error", |
Kasper Nilsson | 4a03e36 | 2017-04-27 10:01:37 +0200 | [diff] [blame] | 67 | "quote-props": ["error", "consistent-as-needed"], |
| 68 | "require-jsdoc": "off", |
| 69 | "semi": [2, "always"], |
| 70 | "template-curly-spacing": "error", |
| 71 | "valid-jsdoc": "off" |
| 72 | }, |
| 73 | "plugins": [ |
| 74 | "html" |
Kasper Nilsson | e71334e | 2017-05-25 15:20:09 -0700 | [diff] [blame] | 75 | ], |
| 76 | "settings": { |
| 77 | "html/report-bad-indent": "error" |
| 78 | } |
Kasper Nilsson | 4a03e36 | 2017-04-27 10:01:37 +0200 | [diff] [blame] | 79 | } |