doc: improvements to console.markdown copy
[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   # ECMAScript 6
74   # list: http://eslint.org/docs/rules/#ecmascript-6
75   ## Suggest using 'const' wherever possible
76   prefer-const: 2
77
78   # Strict Mode
79   # list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode
80   ## 'use strict' on top
81   strict: [2, "global"]
82
83   # Variables
84   # list: https://github.com/eslint/eslint/tree/master/docs/rules#variables
85   ## disallow use of undefined variables (globals)
86   no-undef: 2
87
88   # Custom rules in tools/eslint-rules
89   require-buffer: 2
90   new-with-error: [2, "Error", "RangeError", "TypeError", "SyntaxError", "ReferenceError"]
91
92
93 # Global scoped method and vars
94 globals:
95   DTRACE_HTTP_CLIENT_REQUEST           : false
96   LTTNG_HTTP_CLIENT_REQUEST            : false
97   COUNTER_HTTP_CLIENT_REQUEST          : false
98   DTRACE_HTTP_CLIENT_RESPONSE          : false
99   LTTNG_HTTP_CLIENT_RESPONSE           : false
100   COUNTER_HTTP_CLIENT_RESPONSE         : false
101   DTRACE_HTTP_SERVER_REQUEST           : false
102   LTTNG_HTTP_SERVER_REQUEST            : false
103   COUNTER_HTTP_SERVER_REQUEST          : false
104   DTRACE_HTTP_SERVER_RESPONSE          : false
105   LTTNG_HTTP_SERVER_RESPONSE           : false
106   COUNTER_HTTP_SERVER_RESPONSE         : false
107   DTRACE_NET_STREAM_END                : false
108   LTTNG_NET_STREAM_END                 : false
109   COUNTER_NET_SERVER_CONNECTION_CLOSE  : false
110   DTRACE_NET_SERVER_CONNECTION         : false
111   LTTNG_NET_SERVER_CONNECTION          : false
112   COUNTER_NET_SERVER_CONNECTION        : false
113   escape                               : false
114   unescape                             : false