Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 { | |
2 "extends": "eslint:recommended", | |
3 "env": { | |
4 "es6": true | |
5 }, | |
6 "rules": { | |
7 "array-bracket-spacing": "error", | |
8 "arrow-spacing": "error", | |
9 "block-scoped-var": "error", | |
10 "block-spacing": "error", | |
11 "brace-style": ["error", "allman", {"allowSingleLine": true}], | |
12 "camelcase": ["error", {"properties": "never"}], | |
13 "comma-dangle": "error", | |
14 "comma-spacing": "error", | |
15 "comma-style": "error", | |
16 "computed-property-spacing": "error", | |
Wladimir Palant
2017/02/03 10:24:13
It's a pity that the consensus was apparently to r
Sebastian Noack
2017/02/03 12:49:32
I generally agree that it makes the code flow more
kzar
2017/02/04 03:18:55
I don't want to use the consistent-return rule for
| |
17 "curly": ["error", "multi-or-nest", "consistent"], | |
18 "eol-last": "error", | |
19 "func-call-spacing": "error", | |
20 "indent": ["error", 2, {"SwitchCase": 1, "ArrayExpression": "first"}], | |
21 "key-spacing": "error", | |
22 "keyword-spacing": "error", | |
23 "linebreak-style": "error", | |
24 "lines-around-directive": "error", | |
25 "max-len": ["error", 80, {"ignoreUrls": true}], | |
26 "new-parens": "error", | |
27 "no-array-constructor": "error", | |
28 "no-caller": "error", | |
29 "no-case-declarations": "off", | |
Wladimir Palant
2017/02/03 10:24:13
Is this a good idea? Lexical declarations inside c
Sebastian Noack
2017/02/03 12:49:32
There is no difference (or potential footgun) in t
Wladimir Palant
2017/02/03 13:01:34
Try it ;)
This code will actually error out at co
kzar
2017/02/04 03:18:55
I don't mind too much either way about this rule,
Sebastian Noack
2017/02/04 16:43:37
Wladimir is right that in his example omitting the
Wladimir Palant
2017/02/04 21:13:13
The point of a linter is catching errors before yo
Sebastian Noack
2017/02/05 18:22:39
I completely agree, having code that might fall th
Wladimir Palant
2017/02/06 09:55:19
That's not what I meant. Here is the actual code:
Sebastian Noack
2017/02/06 13:54:43
Regardless whether you put a redundant block aroun
kzar
2017/02/06 16:26:13
Well honestly I don't mind too much either way. Ho
Sebastian Noack
2017/02/06 17:26:00
Honestly, I cannot see how this is still a controv
| |
30 "no-catch-shadow": "error", | |
31 "no-cond-assign": "off", | |
Wladimir Palant
2017/02/03 10:24:13
Frankly, I'd rather not disable this. An assignmen
Sebastian Noack
2017/02/03 12:49:32
From the earlier discussion: While I might agree t
kzar
2017/02/04 03:18:55
I agree with Sebastian here, it's sometimes a usef
| |
32 "no-console": ["error", {"allow": ["warn", "error", "trace"]}], | |
33 "no-control-regex": "off", | |
34 "no-else-return": "error", | |
35 "no-eval": "error", | |
36 "no-extra-bind": "error", | |
37 "no-extra-label": "error", | |
38 "no-implied-eval": "error", | |
39 "no-labels": "error", | |
40 "no-lone-blocks": "error", | |
41 "no-lonely-if": "error", | |
42 "no-multi-spaces": "error", | |
43 "no-new-func": "error", | |
44 "no-new-object": "error", | |
45 "no-proto": "error", | |
46 "no-self-compare": "error", | |
47 "no-shadow": "error", | |
48 "no-trailing-spaces": "error", | |
49 "no-undef": "off", | |
Wladimir Palant
2017/02/03 10:24:13
Why is this rule turned off? Flagging undeclared v
Sebastian Noack
2017/02/03 12:49:31
While we tested that rule on our code base, we not
Wladimir Palant
2017/02/03 13:01:34
This indicates an issue. Built-in browser APIs and
kzar
2017/02/04 03:18:55
I can see arguments either way for this rule and w
Sebastian Noack
2017/02/04 16:43:37
IMO, the job of a linter is to ensure good coding
Wladimir Palant
2017/02/04 21:13:13
I see, that's the main reason for our disagreement
Sebastian Noack
2017/02/05 18:22:39
If we can catch some errors early, that is a nice
kzar
2017/02/06 06:21:01
I've added the boilerplate required for no-undef i
Sebastian Noack
2017/02/06 17:26:00
Thanks. Indeed, the configuration for environment-
kzar
2017/02/07 06:37:58
Sure, we can improve on the work in adblockpluschr
Sebastian Noack
2017/02/07 11:57:15
The linter configuration defines our coding practi
kzar
2017/02/07 17:07:51
It's a WIP but here you go https://codereview.adbl
kzar
2017/02/09 04:55:27
Since you've now gone through and reviewed the adb
| |
50 "no-unneeded-ternary": "error", | |
51 "no-unused-vars": "off", | |
52 "no-useless-computed-key": "error", | |
53 "no-useless-concat": "error", | |
54 "no-useless-escape": "error", | |
55 "no-useless-return": "error", | |
56 "no-var": "error", | |
57 "no-warning-comments": "error", | |
58 "no-whitespace-before-property": "error", | |
59 "no-with": "error", | |
60 "object-curly-spacing": "error", | |
61 "object-shorthand": ["error", "always", { | |
62 "avoidExplicitReturnArrows": true | |
63 }], | |
64 "one-var": ["error", "never"], | |
65 "operator-assignment": "error", | |
66 "operator-linebreak": "error", | |
67 "padded-blocks": ["error", "never"], | |
68 "prefer-arrow-callback": "error", | |
69 "prefer-destructuring": ["error", {"array": false}], | |
70 "prefer-numeric-literals": "error", | |
71 "prefer-spread": "error", | |
Wladimir Palant
2017/02/03 10:24:13
What about prefer-rest-params?
Sebastian Noack
2017/02/03 12:49:32
Well spotted. We had it in there before, and I don
kzar
2017/02/04 03:18:55
I omitted this rule since I assumed rest parameter
| |
72 "quote-props": ["error", "as-needed"], | |
73 "quotes": ["error", "double", {"avoidEscape": true}], | |
74 "radix": "error", | |
75 "rest-spread-spacing": "error", | |
76 "semi": "error", | |
77 "semi-spacing": "error", | |
78 "space-before-function-paren": ["error", "never"], | |
79 "space-in-parens": "error", | |
80 "space-infix-ops": "error", | |
81 "space-unary-ops": "error", | |
82 "spaced-comment": "error", | |
83 "strict": ["error", "global"], | |
84 "valid-jsdoc": ["error", { | |
85 "requireParamDescription": false, | |
86 "requireReturn": false, | |
87 "requireReturnDescription": false | |
88 }], | |
89 "yield-star-spacing": "error", | |
90 "yoda": "error" | |
91 } | |
92 } | |
OLD | NEW |