benchmark: add remaining path benchmarks & optimize
[platform/upstream/nodejs.git] / .eslintrc
1 env:
2   node: true
3
4 # enable ECMAScript features
5 ecmaFeatures:
6   blockBindings: true
7   templateStrings: true
8   octalLiterals: true
9   binaryLiterals: true
10   generators: true
11   forOf: true
12   objectLiteralShorthandProperties: true
13
14 rules:
15   # Possible Errors
16   # list: https://github.com/eslint/eslint/tree/master/docs/rules#possible-errors
17   ## check debugger sentence
18   no-debugger: 2
19   ## check duplicate arguments
20   no-dupe-args: 2
21   ## check duplicate object keys
22   no-dupe-keys: 2
23   ## check duplicate switch-case
24   no-duplicate-case: 2
25   ## disallow assignment of exceptional params
26   no-ex-assign: 2
27   ## disallow use of reserved words as keys like enum, class
28   no-reserved-keys: 2
29   ## disallow unreachable code
30   no-unreachable: 2
31   ## require valid typeof compared string like typeof foo === 'strnig'
32   valid-typeof: 2
33
34   # Best Practices
35   # list: https://github.com/eslint/eslint/tree/master/docs/rules#best-practices
36   ## require falls through comment on switch-case
37   no-fallthrough: 2
38
39   # Stylistic Issues
40   # list: https://github.com/eslint/eslint/tree/master/docs/rules#stylistic-issues
41   ## use single quote, we can use double quote when escape chars
42   quotes: [2, "single", "avoid-escape"]
43   ## 2 space indentation
44   indent: [2, 2]
45   ## add space after comma
46   comma-spacing: 2
47   ## put semi-colon
48   semi: 2
49   ## require spaces operator like var sum = 1 + 1;
50   space-infix-ops: 2
51   ## require spaces return, throw, case
52   space-return-throw-case: 2
53   ## no space before function, eg. 'function()'
54   space-before-function-paren: [2, "never"]
55   ## require space before blocks, eg 'function() {'
56   space-before-blocks: [2, "always"]
57   ## require parens for Constructor
58   new-parens: 2
59   ## max 80 length
60   max-len: [2, 80, 2]
61   ## max 2 consecutive empty lines
62   no-multiple-empty-lines: [2, {max: 2}]
63   ## require newline at end of files
64   eol-last: 2
65   ## no trailing spaces
66   no-trailing-spaces: 2
67
68   # Strict Mode
69   # list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode
70   ## 'use strict' on top
71   strict: [2, "global"]
72
73   # Variables
74   # list: https://github.com/eslint/eslint/tree/master/docs/rules#variables
75   ## disallow use of undefined variables (globals)
76   no-undef: 2
77
78   # Custom rules in tools/eslint-rules
79   require-buffer: 2
80
81 # Global scoped method and vars
82 globals:
83   DTRACE_HTTP_CLIENT_REQUEST           : false
84   LTTNG_HTTP_CLIENT_REQUEST            : false
85   COUNTER_HTTP_CLIENT_REQUEST          : false
86   DTRACE_HTTP_CLIENT_RESPONSE          : false
87   LTTNG_HTTP_CLIENT_RESPONSE           : false
88   COUNTER_HTTP_CLIENT_RESPONSE         : false
89   DTRACE_HTTP_SERVER_REQUEST           : false
90   LTTNG_HTTP_SERVER_REQUEST            : false
91   COUNTER_HTTP_SERVER_REQUEST          : false
92   DTRACE_HTTP_SERVER_RESPONSE          : false
93   LTTNG_HTTP_SERVER_RESPONSE           : false
94   COUNTER_HTTP_SERVER_RESPONSE         : false
95   DTRACE_NET_STREAM_END                : false
96   LTTNG_NET_STREAM_END                 : false
97   COUNTER_NET_SERVER_CONNECTION_CLOSE  : false
98   DTRACE_NET_SERVER_CONNECTION         : false
99   LTTNG_NET_SERVER_CONNECTION          : false
100   COUNTER_NET_SERVER_CONNECTION        : false
101   escape                               : false
102   unescape                             : false