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

Side by Side Diff: .eslintrc.json

Issue 29346539: Issue 3692 - Created global eslintrc (Closed)
Patch Set: Extended Palant's starter based on https://adblockplus.org/coding-style Created June 25, 2016, 6:34 p.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 | « no previous file | no next file » | 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 "extends": "eslint:recommended",
3 "rules": {
4 /* MDN General practices */
kzar 2016/09/16 10:33:51 (It surprised me to see comments in a JSON file bu
juliandoucette 2016/10/13 14:14:08 Acknowledged. Let me know if you think we should
5 "no-else-return": "warn",
6 "no-console": "warn",
7 "no-debugger": "warn",
8 "no-alert": "warn",
kzar 2016/09/16 10:33:50 There are some valid uses of alert in adblockplusc
Wladimir Palant 2016/09/16 11:37:06 Actually, using console.error() can be valid when
kzar 2016/09/16 12:12:57 Hmm good point. I guess I'm easy between options 2
juliandoucette 2016/10/13 14:14:10 Acknowledged. I changed this to rely on eslint:re
9 "linebreak-style": ["warn", "unix"],
kzar 2016/09/16 10:33:50 Shouldn't linebreak-style be an error too, or am I
juliandoucette 2016/10/13 14:14:09 Done.
10 "indent": ["warn", 2],
11 "valid-jsdoc": "warn",
12 "eol-last": "warn",
Wladimir Palant 2016/09/16 08:07:42 This is already part of eslint:recommended, we don
juliandoucette 2016/10/13 14:14:08 Done.
13 "vars-on-top": "off",
Wladimir Palant 2016/09/16 08:07:43 This isn't part of eslint:recommended, no point sw
juliandoucette 2016/10/13 14:14:08 Done.
14 /* MDN Naming and formatting code */
15 "no-irregular-whitespace": "warn",
Wladimir Palant 2016/09/16 08:07:43 Like above, this is already part of eslint:recomme
kzar 2016/09/16 10:33:51 Yea and it should really be an error. One time a z
juliandoucette 2016/10/13 14:14:10 Done.
16 "no-trailing-spaces": "warn",
17 "max-len": ["warn", 80],
18 "brace-style": ["warn", "allman"],
19 /* MDN JavaScript practices */
20 "no-eq-null": "off",
Wladimir Palant 2016/09/16 08:07:42 This isn't part of eslint:recommended, no point sw
juliandoucette 2016/10/13 14:14:09 Done.
21 "no-redeclare": "error",
Wladimir Palant 2016/09/16 08:07:43 This is already part of eslint:recommended.
kzar 2016/09/16 10:33:51 To play devil's advocate perhaps it's good to spec
Wladimir Palant 2016/09/16 11:37:06 I think that eslint:recommended usually changes wh
kzar 2016/09/16 12:12:57 Fair enough.
juliandoucette 2016/10/13 14:14:08 Done.
22 "consistent-return": "error",
kzar 2016/09/16 10:33:51 Does everyone agree with consistent-return? To me
Wladimir Palant 2016/09/16 11:37:06 Yes, consistent-return is important and actually s
juliandoucette 2016/10/13 14:14:08 Done.
kzar 2017/01/31 10:17:48 One example where I think consistent-return might
23 "no-undef": "error",
Wladimir Palant 2016/09/16 08:07:43 This is already part of eslint:recommended.
juliandoucette 2016/10/13 14:14:09 Done.
24 "no-unused-vars": "warn",
Wladimir Palant 2016/09/16 08:07:43 The reason I switched this rule off: it produces t
kzar 2016/09/16 10:33:51 Agreed, it's better to not use a parameter than si
juliandoucette 2016/10/13 14:14:09 Done.
25 "no-array-constructor": "warn",
26 "no-new-object": "warn",
27 /* ABP General */
28 "no-warning-comments": "warn",
29 /* Palant recommends */
kzar 2016/09/16 10:33:50 Nit: Mind adding a newline before each new section
juliandoucette 2016/10/13 14:14:09 Done.
30 "array-bracket-spacing": "warn",
31 "arrow-spacing": "warn",
32 "comma-spacing": "warn",
33 "comma-style": "warn",
34 "computed-property-spacing": "warn",
35 "key-spacing": "warn",
36 "keyword-spacing": "warn",
37 "new-parens": "warn",
38 "no-spaced-func": "warn",
39 "no-var": "warn",
kzar 2016/09/16 10:33:51 We need to use var in adblockpluschrome in some pl
Wladimir Palant 2016/09/16 11:37:06 This is an ES6 config, and we are already discussi
40 "no-whitespace-before-property": "warn",
41 "object-curly-spacing": "warn",
42 "operator-assignment": "warn",
43 "operator-linebreak": "warn",
44 "padded-blocks": ["warn", "never"],
45 "prefer-rest-params": "warn",
46 "prefer-spread": "warn",
kzar 2016/09/16 10:33:51 I don't mind using the spread operator instead of
Wladimir Palant 2016/09/16 11:37:06 We definitely could and should. Note that we are
kzar 2016/09/16 12:12:57 Perhaps I'll give it a go if I ever find time. I v
juliandoucette 2016/10/13 14:14:09 Acknowledged.
47 "require-yield": "warn",
48 "quotes": ["warn", "double", {"avoidEscape": true}],
49 "semi": "warn",
50 "semi-spacing": "warn",
51 "space-before-function-paren": ["warn", "never"],
52 "space-in-parens": "warn",
53 "space-infix-ops": "warn",
54 "space-unary-ops": "warn",
55 "spaced-comment": "warn",
56 "yield-star-spacing": "warn"
57 }
58 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld