tools: replace closure-linter with eslint
[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
11 rules:
12   # Possible Errors
13   # list: https://github.com/eslint/eslint/tree/master/docs/rules#possible-errors
14   ## check debugger sentence
15   no-debugger: 2
16   ## check duplicate arguments
17   no-dupe-args: 2
18   ## check duplicate object keys
19   no-dupe-keys: 2
20   ## check duplicate switch-case
21   no-duplicate-case: 2
22   ## disallow assignment of exceptional params
23   no-ex-assign: 2
24   ## disallow use of reserved words as keys like enum, class
25   no-reserved-keys: 2
26   ## disallow unreachable code
27   no-unreachable: 2
28   ## require valid typeof compared string like typeof foo === 'strnig'
29   valid-typeof: 2
30
31   # Best Practices
32   # list: https://github.com/eslint/eslint/tree/master/docs/rules#best-practices
33   ## require falls through comment on switch-case
34   no-fallthrough: 2
35
36   # Stylistic Issues
37   # list: https://github.com/eslint/eslint/tree/master/docs/rules#stylistic-issues
38   ## use single quote, we can use double quote when escape chars
39   quotes:
40     - 2
41     - "single"
42     - "avoid-escape"
43   ## 2 space indentation
44   indent:
45     - 2
46     - 2
47   ## add space after comma
48   comma-spacing: 2
49   ## put semi-colon
50   semi: 2
51   ## require spaces operator like var sum = 1 + 1;
52   space-infix-ops: 2
53   ## require spaces return, throw, case
54   space-return-throw-case: 2
55   ## require parens for Constructor
56   new-parens: 2
57   ## max 80 length
58   max-len: 
59     - 2
60     - 80
61     - 2
62
63
64   # Strict Mode
65   # list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode
66   ## 'use strict' on top
67   strict: 
68     - 2
69     - "global"
70
71 # Global scoped method and vars
72 globals: 
73   DTRACE_HTTP_CLIENT_REQUEST: true
74   LTTNG_HTTP_CLIENT_REQUEST: true
75   COUNTER_HTTP_CLIENT_REQUEST: true
76   DTRACE_HTTP_CLIENT_RESPONSE: true
77   LTTNG_HTTP_CLIENT_RESPONSE: true
78   COUNTER_HTTP_CLIENT_RESPONSE: true
79   DTRACE_HTTP_SERVER_REQUEST: true
80   LTTNG_HTTP_SERVER_REQUEST: true
81   COUNTER_HTTP_SERVER_REQUEST: true
82   DTRACE_HTTP_SERVER_RESPONSE: true
83   LTTNG_HTTP_SERVER_RESPONSE: true
84   COUNTER_HTTP_SERVER_RESPONSE: true
85   DTRACE_NET_STREAM_END: true
86   LTTNG_NET_STREAM_END: true
87   COUNTER_NET_SERVER_CONNECTION_CLOSE: true
88   DTRACE_NET_SERVER_CONNECTION: true
89   LTTNG_NET_SERVER_CONNECTION: true
90   COUNTER_NET_SERVER_CONNECTION: true
91