tools: add objectLiteralShorthandProperties to .eslintrc
[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:
43     - 2
44     - "single"
45     - "avoid-escape"
46   ## 2 space indentation
47   indent:
48     - 2
49     - 2
50   ## add space after comma
51   ## set to 'warn' because of https://github.com/eslint/eslint/issues/2408
52   comma-spacing: 1
53   ## put semi-colon
54   semi: 2
55   ## require spaces operator like var sum = 1 + 1;
56   space-infix-ops: 2
57   ## require spaces return, throw, case
58   space-return-throw-case: 2
59   ## no space before function, eg. 'function()'
60   space-before-function-paren: [2, "never"]
61   ## require space before blocks, eg 'function() {'
62   space-before-blocks: [2, "always"]
63   ## require parens for Constructor
64   new-parens: 2
65   ## max 80 length
66   max-len:
67     - 2
68     - 80
69     - 2
70
71   # Strict Mode
72   # list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode
73   ## 'use strict' on top
74   strict:
75     - 2
76     - "global"
77
78 # Global scoped method and vars
79 globals:
80   DTRACE_HTTP_CLIENT_REQUEST: true
81   LTTNG_HTTP_CLIENT_REQUEST: true
82   COUNTER_HTTP_CLIENT_REQUEST: true
83   DTRACE_HTTP_CLIENT_RESPONSE: true
84   LTTNG_HTTP_CLIENT_RESPONSE: true
85   COUNTER_HTTP_CLIENT_RESPONSE: true
86   DTRACE_HTTP_SERVER_REQUEST: true
87   LTTNG_HTTP_SERVER_REQUEST: true
88   COUNTER_HTTP_SERVER_REQUEST: true
89   DTRACE_HTTP_SERVER_RESPONSE: true
90   LTTNG_HTTP_SERVER_RESPONSE: true
91   COUNTER_HTTP_SERVER_RESPONSE: true
92   DTRACE_NET_STREAM_END: true
93   LTTNG_NET_STREAM_END: true
94   COUNTER_NET_SERVER_CONNECTION_CLOSE: true
95   DTRACE_NET_SERVER_CONNECTION: true
96   LTTNG_NET_SERVER_CONNECTION: true
97   COUNTER_NET_SERVER_CONNECTION: true