Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/.eslintrc.js

Issue 1908863002: DevTools: Introduce eslint configuration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better inline docs. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 module.exports = {
2 "root": true,
3
4 "env": {
5 "browser": true,
6 "es6": true
7 },
8
9 /**
10 * ESLint rules
11 *
12 * All available rules: http://eslint.org/docs/rules/
13 *
14 * Rules take the following form:
15 * "rule-name", [severity, { opts }]
16 * Severity: 2 == error, 1 == warning, 0 == off.
17 */
18 "rules": {
19
20 /**
21 * Enforced rules
22 */
23
24 // syntax preferences
25 "quotes": [2, "double", {
26 "avoidEscape": true,
27 "allowTemplateLiterals": true
28 }],
29 "comma-style": [2, "last"],
30 "wrap-iife": [2, "inside"],
31 "yoda": [2, "never"],
32 "spaced-comment": [2, "always", {
33 "markers": ["*"]
34 }],
35 "arrow-body-style": [2, "as-needed"],
36 "accessor-pairs": [2, {
37 "getWithoutSet": false,
38 "setWithoutGet": false
39 }],
40 "handle-callback-err": 2,
41 "id-blacklist": 2,
42 "id-match": 2,
43 "max-nested-callbacks": 2,
44
45 // anti-patterns
46 "no-with": 2,
47 "no-multi-str": 2,
48 "no-caller": 2,
49 "no-implicit-coercion": [2, {
50 "boolean": false,
51 "number": false,
52 "string": false
53 }],
54 "no-implied-eval": 2,
55 "no-label-var": 2,
56 "no-new-object": 2,
57 "no-octal-escape": 2,
58 "no-self-compare": 2,
59 "no-shadow-restricted-names": 2,
60
61 // es2015 features
62 "no-useless-constructor": 2,
63 "require-yield": 2,
64 "yield-star-spacing": 2,
65 "sort-imports": 2,
66 "template-curly-spacing": [2, "never"],
67
68 // spacing details
69 "space-infix-ops": 2,
70 "space-in-parens": [2, "never"],
71 "space-before-function-paren": [ 2, "never" ],
72 "no-whitespace-before-property": 2,
73 "space-unary-ops": [2, {
74 "words": false,
75 "nonwords": false
76 }],
77 "keyword-spacing": [2,{
78 "overrides": {
79 "if": {"after": true},
80 "else": {"after": true},
81 "for": {"after": true},
82 "while": {"after": true},
83 "do": {"after": true},
84 "switch": {"after": true},
85 "return": {"after": true}
86 }
87 }],
88 "arrow-spacing": [
89 2,
90 {
91 "after": true,
92 "before": true
93 }
94 ],
95
96 // file whitespace
97 "no-multiple-empty-lines": 2,
98 "no-mixed-spaces-and-tabs": 2,
99 "no-trailing-spaces": 2,
100 "eol-last": 2,
101 "linebreak-style": [ 2, "unix" ],
102
103
104 /**
105 * Disabled, aspirational rules
106 */
107
108 // brace-style is disabled, as eslint cannot enforce 1tbs as default, bu t allman for functions
109 "brace-style": [0, "allman", { "allowSingleLine": true }],
110
111 // key-spacing is disabled, as some objects use value-aligned spacing, s ome not.
112 "key-spacing": [0, {
113 "beforeColon": false,
114 "afterColon": true,
115 "align": "value"
116 }],
117 // quote-props is diabled, as property quoting styles are too varied to enforce.
118 "quote-props": [0, "as-needed"],
119
120 // no-implicit-globals will prevent accidental globals
121 "no-implicit-globals": [0]
122
123 }
124 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/.eslintignore ('k') | third_party/WebKit/Source/devtools/front_end/.jscsrc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698