| Left: | ||
| Right: | 
| LEFT | RIGHT | 
|---|---|
| 1 /* | 1 /* | 
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 
| 3 * Copyright (C) 2006-2017 Eyeo GmbH | 3 * Copyright (C) 2006-2017 Eyeo GmbH | 
| 4 * | 4 * | 
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify | 
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as | 
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. | 
| 8 * | 8 * | 
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, | 
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. | 
| 13 * | 13 * | 
| 14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License | 
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 
| 16 */ | 16 */ | 
| 17 | 17 | 
| 18 /* eslint-env commonjs */ | 18 /* eslint-env commonjs */ | 
| 19 /* eslint quote-props: ["error", "always"] */ | |
| 20 | 19 | 
| 21 "use strict"; | 20 "use strict"; | 
| 22 | 21 | 
| 23 module.exports = { | 22 module.exports = { | 
| 24 "extends": "eslint:recommended", | 23 extends: "eslint:recommended", | 
| 25 "env": { | 24 env: { | 
| 26 "es6": true | 25 es6: true | 
| 27 }, | 26 }, | 
| 28 "rules": { | 27 rules: { | 
| 29 "array-bracket-spacing": "error", | 28 "array-bracket-spacing": "error", | 
| 30 "arrow-spacing": "error", | 29 "arrow-spacing": "error", | 
| 31 "block-scoped-var": "error", | 30 "block-scoped-var": "error", | 
| 32 "block-spacing": "error", | 31 "block-spacing": "error", | 
| 33 "brace-style": ["error", "allman", {"allowSingleLine": true}], | 32 "brace-style": ["error", "allman", {allowSingleLine: true}], | 
| 34 "camelcase": ["error", {"properties": "never"}], | 33 "camelcase": ["error", {properties: "never"}], | 
| 35 "comma-dangle": "error", | 34 "comma-dangle": "error", | 
| 36 "comma-spacing": "error", | 35 "comma-spacing": "error", | 
| 37 "comma-style": "error", | 36 "comma-style": "error", | 
| 38 "computed-property-spacing": "error", | 37 "computed-property-spacing": "error", | 
| 39 "curly": ["error", "multi-or-nest", "consistent"], | 38 "curly": ["error", "multi-or-nest"], | 
| 40 "eol-last": "error", | 39 "eol-last": "error", | 
| 41 "func-call-spacing": "error", | 40 "func-call-spacing": "error", | 
| 42 "indent": ["error", 2, {"SwitchCase": 1, "ArrayExpression": "first"}], | 41 "indent": ["error", 2, {SwitchCase: 1, ArrayExpression: "first"}], | 
| 43 "key-spacing": "error", | 42 "key-spacing": "error", | 
| 44 "keyword-spacing": "error", | 43 "keyword-spacing": "error", | 
| 45 "linebreak-style": "error", | 44 "linebreak-style": "error", | 
| 46 "lines-around-directive": "error", | 45 "lines-around-directive": "error", | 
| 47 "max-len": ["error", 80, {"ignoreUrls": true}], | 46 "max-len": ["error", 80, {ignoreUrls: true}], | 
| 48 "new-parens": "error", | 47 "new-parens": "error", | 
| 49 "no-array-constructor": "error", | 48 "no-array-constructor": "error", | 
| 50 "no-caller": "error", | 49 "no-caller": "error", | 
| 51 "no-case-declarations": "off", | 50 "no-case-declarations": "off", | 
| 52 "no-catch-shadow": "error", | 51 "no-catch-shadow": "error", | 
| 53 "no-cond-assign": "off", | 52 "no-cond-assign": "off", | 
| 54 "no-console": ["error", {"allow": ["warn", "error", "trace"]}], | 53 "no-console": ["error", {allow: ["warn", "error", "trace"]}], | 
| 55 "no-control-regex": "off", | 54 "no-control-regex": "off", | 
| 56 "no-else-return": "error", | 55 "no-else-return": "error", | 
| 56 "no-empty": ["error", {allowEmptyCatch: true}], | |
| 57 "no-eval": "error", | 57 "no-eval": "error", | 
| 58 "no-extra-bind": "error", | 58 "no-extra-bind": "error", | 
| 59 "no-extra-label": "error", | 59 "no-extra-label": "error", | 
| 60 "no-implied-eval": "error", | 60 "no-implied-eval": "error", | 
| 61 "no-labels": "error", | 61 "no-labels": ["error", {allowLoop: true}], | 
| 
 
Sebastian Noack
2017/02/12 20:53:12
I posted this rule by accident among the other rul
 
kzar
2017/02/13 06:02:58
Good point. How about we leave this rule enabled b
 
Sebastian Noack
2017/02/13 11:31:29
Yeah, at very least we should add the "allowLoop"
 
kzar
2017/02/13 13:02:21
I've never seen a use-case for labels which didn't
 
Sebastian Noack
2017/02/13 14:20:28
The same way, you could argue, because it is so ra
 
 | |
| 62 "no-lone-blocks": "error", | 62 "no-lone-blocks": "error", | 
| 63 "no-lonely-if": "error", | 63 "no-lonely-if": "error", | 
| 64 "no-multi-spaces": "error", | 64 "no-multi-spaces": "error", | 
| 65 "no-new-func": "error", | 65 "no-new-func": "error", | 
| 66 "no-new-object": "error", | 66 "no-new-object": "error", | 
| 67 "no-proto": "error", | 67 "no-proto": "error", | 
| 68 "no-self-compare": "error", | 68 "no-self-compare": "error", | 
| 69 "no-shadow": "error", | 69 "no-shadow": "error", | 
| 70 "no-trailing-spaces": "error", | 70 "no-trailing-spaces": "error", | 
| 71 "no-unneeded-ternary": "error", | 71 "no-unneeded-ternary": "error", | 
| 72 "no-unused-vars": "off", | 72 "no-unused-vars": "off", | 
| 73 "no-useless-computed-key": "error", | 73 "no-useless-computed-key": "error", | 
| 74 "no-useless-concat": "error", | 74 "no-useless-concat": "error", | 
| 75 "no-useless-escape": "error", | 75 "no-useless-escape": "error", | 
| 76 "no-useless-return": "error", | 76 "no-useless-return": "error", | 
| 77 "no-var": "error", | 77 "no-var": "error", | 
| 78 "no-warning-comments": "error", | 78 "no-warning-comments": "error", | 
| 79 "no-whitespace-before-property": "error", | 79 "no-whitespace-before-property": "error", | 
| 80 "no-with": "error", | 80 "no-with": "error", | 
| 81 "object-curly-spacing": "error", | 81 "object-curly-spacing": "error", | 
| 82 "object-shorthand": ["error", "always", { | 82 "object-shorthand": ["error", "always", { | 
| 83 "avoidExplicitReturnArrows": true | 83 avoidExplicitReturnArrows: true | 
| 84 }], | 84 }], | 
| 85 "one-var": ["error", "never"], | 85 "one-var": ["error", "never"], | 
| 86 "operator-assignment": "error", | 86 "operator-assignment": "error", | 
| 87 "operator-linebreak": "error", | 87 "operator-linebreak": "error", | 
| 88 "padded-blocks": ["error", "never"], | 88 "padded-blocks": ["error", "never"], | 
| 89 "prefer-arrow-callback": "error", | 89 "prefer-arrow-callback": "error", | 
| 90 "prefer-destructuring": ["error", {"array": false}], | 90 "prefer-destructuring": ["error", {array: false}], | 
| 91 "prefer-numeric-literals": "error", | 91 "prefer-numeric-literals": "error", | 
| 92 "prefer-rest-params": "error", | 92 "prefer-rest-params": "error", | 
| 93 "prefer-spread": "error", | 93 "prefer-spread": "error", | 
| 94 "quote-props": ["error", "as-needed"], | 94 "quote-props": ["error", "consistent-as-needed"], | 
| 95 "quotes": ["error", "double", {"avoidEscape": true}], | 95 "quotes": ["error", "double", {avoidEscape: true}], | 
| 96 "radix": "error", | 96 "radix": "error", | 
| 97 "rest-spread-spacing": "error", | 97 "rest-spread-spacing": "error", | 
| 98 "semi": "error", | 98 "semi": "error", | 
| 99 "semi-spacing": "error", | 99 "semi-spacing": "error", | 
| 100 "space-before-function-paren": ["error", "never"], | 100 "space-before-function-paren": ["error", "never"], | 
| 101 "space-in-parens": "error", | 101 "space-in-parens": "error", | 
| 102 "space-infix-ops": "error", | 102 "space-infix-ops": "error", | 
| 103 "space-unary-ops": "error", | 103 "space-unary-ops": "error", | 
| 104 "spaced-comment": "error", | 104 "spaced-comment": "error", | 
| 105 "strict": ["error", "global"], | 105 "strict": ["error", "global"], | 
| 106 "valid-jsdoc": ["error", { | 106 "valid-jsdoc": ["error", { | 
| 107 "requireParamDescription": false, | 107 requireParamDescription: false, | 
| 108 "requireReturn": false, | 108 requireReturn: false, | 
| 109 "requireReturnDescription": false | 109 requireReturnDescription: false | 
| 110 }], | 110 }], | 
| 111 "yield-star-spacing": "error", | 111 "yield-star-spacing": "error", | 
| 112 "yoda": "error" | 112 "yoda": "error" | 
| 113 } | 113 } | 
| 114 }; | 114 }; | 
| LEFT | RIGHT |