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