4 # enable ECMAScript features
12 objectLiteralShorthandMethods: true
13 objectLiteralShorthandProperties: true
19 # list: https://github.com/eslint/eslint/tree/master/docs/rules#possible-errors
20 ## disallow control characters in regular expressions
22 ## check debugger sentence
24 ## check duplicate arguments
26 ## check duplicate object keys
28 ## check duplicate switch-case
30 ## disallow the use of empty character classes in regular expressions
31 no-empty-character-class: 2
32 ## disallow assignment of exceptional params
34 ## disallow extra boolean casts
35 no-extra-boolean-cast : 2
36 ## disallow superfluous semicolons
38 ## validate regular expressions
40 ## forbid weird whitespace characters
41 no-irregular-whitespace: 2
42 ## avoid unexpected multiline expressions
43 no-unexpected-multiline: 2
44 ## disallow unreachable code
46 ## require valid typeof compared string like typeof foo === 'strnig'
50 # list: https://github.com/eslint/eslint/tree/master/docs/rules#best-practices
51 ## require falls through comment on switch-case
53 ## disallow declaring the same variable more than once
57 # list: https://github.com/eslint/eslint/tree/master/docs/rules#stylistic-issues
58 ## add space after comma
60 ## require newline at end of files
62 ## 2 space indentation
63 indent: [2, 2, {SwitchCase: 1}]
66 ## require parens for Constructor
68 ## max 2 consecutive empty lines
69 no-multiple-empty-lines: [2, {max: 2}]
72 ## use single quote, we can use double quote when escape chars
73 quotes: [2, "single", "avoid-escape"]
76 ## require space after keywords, eg 'for (..)'
77 space-after-keywords: 2
78 ## require space before blocks, eg 'function() {'
79 space-before-blocks: [2, "always"]
80 ## no space before function, eg. 'function()'
81 space-before-function-paren: [2, "never"]
82 ## no leading/trailing spaces in parens
83 space-in-parens: [2, "never"]
84 ## require spaces operator like var sum = 1 + 1;
86 ## require spaces return, throw, case
87 space-return-throw-case: 2
88 ## no spaces with non-word unary operators, require for word unary operators
92 # list: http://eslint.org/docs/rules/#ecmascript-6
93 ## Suggest using 'const' wherever possible
95 ## Enforce parens around arrow function arguments
96 arrow-parens: [2, "always"]
97 ## Require a space on each side of arrow operator
98 arrow-spacing: [2, {"before": true, "after": true}]
99 ## Prevent using => in a condition where <= is intended
100 no-arrow-condition: 2
103 # list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode
104 ## 'use strict' on top
105 strict: [2, "global"]
108 # list: https://github.com/eslint/eslint/tree/master/docs/rules#variables
109 ## disallow use of undefined variables (globals)
111 ## disallow declaration of variables that are not used in the code
112 no-unused-vars: [2, {"args": "none"}]
114 # Custom rules in tools/eslint-rules
116 new-with-error: [2, "Error", "RangeError", "TypeError", "SyntaxError", "ReferenceError"]
119 # Global scoped method and vars
121 DTRACE_HTTP_CLIENT_REQUEST : false
122 LTTNG_HTTP_CLIENT_REQUEST : false
123 COUNTER_HTTP_CLIENT_REQUEST : false
124 DTRACE_HTTP_CLIENT_RESPONSE : false
125 LTTNG_HTTP_CLIENT_RESPONSE : false
126 COUNTER_HTTP_CLIENT_RESPONSE : false
127 DTRACE_HTTP_SERVER_REQUEST : false
128 LTTNG_HTTP_SERVER_REQUEST : false
129 COUNTER_HTTP_SERVER_REQUEST : false
130 DTRACE_HTTP_SERVER_RESPONSE : false
131 LTTNG_HTTP_SERVER_RESPONSE : false
132 COUNTER_HTTP_SERVER_RESPONSE : false
133 DTRACE_NET_STREAM_END : false
134 LTTNG_NET_STREAM_END : false
135 COUNTER_NET_SERVER_CONNECTION_CLOSE : false
136 DTRACE_NET_SERVER_CONNECTION : false
137 LTTNG_NET_SERVER_CONNECTION : false
138 COUNTER_NET_SERVER_CONNECTION : false