Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: eslint-config-eyeo/index.js

Issue 29374555: Issue 3692 - Add base ESLint configuration (Closed)
Patch Set: Addressed Sebastian's further feedback Created Feb. 13, 2017, 5:59 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « eslint-config-eyeo/README.md ('k') | eslint-config-eyeo/package.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 Eyeo GmbH
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
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/>.
16 */
17
18 /* eslint-env commonjs */
19
20 "use strict";
21
22 module.exports = {
23 extends: "eslint:recommended",
24 env: {
25 es6: true
26 },
27 rules: {
28 "array-bracket-spacing": "error",
29 "arrow-spacing": "error",
30 "block-scoped-var": "error",
31 "block-spacing": "error",
32 "brace-style": ["error", "allman", {allowSingleLine: true}],
33 "camelcase": ["error", {properties: "never"}],
34 "comma-dangle": "error",
35 "comma-spacing": "error",
36 "comma-style": "error",
37 "computed-property-spacing": "error",
38 "curly": ["error", "multi-or-nest", "consistent"],
Felix Dahlke 2017/02/13 09:51:20 How I see it [0], this makes the following invalid
kzar 2017/02/13 10:07:50 I don't have any links to hand but IIRC both Thoma
Sebastian Noack 2017/02/13 11:31:29 Yeah, I remember as well, from past code reviews,
Felix Dahlke 2017/02/13 12:05:16 Yeah, that's the thing: If we deliberately decide
kzar 2017/02/13 13:02:21 Yea, good idea. I'm not trying to put words in any
Thomas Greiner 2017/02/13 13:06:13 I can only speak for myself but my objection was o
Felix Dahlke 2017/02/14 10:26:15 Quickly asked Wladimir about this: He feels the sa
39 "eol-last": "error",
40 "func-call-spacing": "error",
41 "indent": ["error", 2, {SwitchCase: 1, ArrayExpression: "first"}],
42 "key-spacing": "error",
43 "keyword-spacing": "error",
44 "linebreak-style": "error",
45 "lines-around-directive": "error",
46 "max-len": ["error", 80, {ignoreUrls: true}],
47 "new-parens": "error",
48 "no-array-constructor": "error",
49 "no-caller": "error",
50 "no-case-declarations": "off",
51 "no-catch-shadow": "error",
52 "no-cond-assign": "off",
53 "no-console": ["error", {allow: ["warn", "error", "trace"]}],
54 "no-control-regex": "off",
55 "no-else-return": "error",
56 "no-eval": "error",
57 "no-extra-bind": "error",
58 "no-extra-label": "error",
59 "no-implied-eval": "error",
60 "no-labels": ["error", {allowLoop: true}],
61 "no-lone-blocks": "error",
62 "no-lonely-if": "error",
63 "no-multi-spaces": "error",
64 "no-new-func": "error",
65 "no-new-object": "error",
66 "no-proto": "error",
67 "no-self-compare": "error",
68 "no-shadow": "error",
kzar 2017/02/13 08:37:25 I think the no-shadow rule might be a mistake. It
Sebastian Noack 2017/02/13 11:31:29 In this particular case I think the code will be e
kzar 2017/02/13 13:02:22 Yea, you're probably right. While the rule can be
Sebastian Noack 2017/02/13 14:20:28 Well, this is also an example, where shadowing mak
69 "no-trailing-spaces": "error",
70 "no-unneeded-ternary": "error",
71 "no-unused-vars": "off",
72 "no-useless-computed-key": "error",
73 "no-useless-concat": "error",
74 "no-useless-escape": "error",
75 "no-useless-return": "error",
76 "no-var": "error",
77 "no-warning-comments": "error",
78 "no-whitespace-before-property": "error",
79 "no-with": "error",
80 "object-curly-spacing": "error",
81 "object-shorthand": ["error", "always", {
82 avoidExplicitReturnArrows: true
83 }],
84 "one-var": ["error", "never"],
85 "operator-assignment": "error",
86 "operator-linebreak": "error",
87 "padded-blocks": ["error", "never"],
88 "prefer-arrow-callback": "error",
89 "prefer-destructuring": ["error", {array: false}],
90 "prefer-numeric-literals": "error",
91 "prefer-rest-params": "error",
92 "prefer-spread": "error",
93 "quote-props": ["error", "consistent-as-needed"],
94 "quotes": ["error", "double", {avoidEscape: true}],
95 "radix": "error",
96 "rest-spread-spacing": "error",
97 "semi": "error",
98 "semi-spacing": "error",
99 "space-before-function-paren": ["error", "never"],
100 "space-in-parens": "error",
101 "space-infix-ops": "error",
102 "space-unary-ops": "error",
103 "spaced-comment": "error",
104 "strict": ["error", "global"],
105 "valid-jsdoc": ["error", {
106 requireParamDescription: false,
107 requireReturn: false,
108 requireReturnDescription: false
109 }],
110 "yield-star-spacing": "error",
111 "yoda": "error"
112 }
113 };
OLDNEW
« no previous file with comments | « eslint-config-eyeo/README.md ('k') | eslint-config-eyeo/package.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld