test: add tests for persistent repl history
[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   objectLiteralShorthandMethods: true
14   classes: true
15
16 rules:
17   # Possible Errors
18   # list: https://github.com/eslint/eslint/tree/master/docs/rules#possible-errors
19   ## check debugger sentence
20   no-debugger: 2
21   ## check duplicate arguments
22   no-dupe-args: 2
23   ## check duplicate object keys
24   no-dupe-keys: 2
25   ## check duplicate switch-case
26   no-duplicate-case: 2
27   ## disallow assignment of exceptional params
28   no-ex-assign: 2
29   ## disallow use of reserved words as keys like enum, class
30   no-reserved-keys: 2
31   ## disallow unreachable code
32   no-unreachable: 2
33   ## require valid typeof compared string like typeof foo === 'strnig'
34   valid-typeof: 2
35
36   # Best Practices
37   # list: https://github.com/eslint/eslint/tree/master/docs/rules#best-practices
38   ## require falls through comment on switch-case
39   no-fallthrough: 2
40
41   # Stylistic Issues
42   # list: https://github.com/eslint/eslint/tree/master/docs/rules#stylistic-issues
43   ## use single quote, we can use double quote when escape chars
44   quotes: [2, "single", "avoid-escape"]
45   ## 2 space indentation
46   indent: [2, 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   ## no space before function, eg. 'function()'
56   space-before-function-paren: [2, "never"]
57   ## require space before blocks, eg 'function() {'
58   space-before-blocks: [2, "always"]
59   ## require parens for Constructor
60   new-parens: 2
61   ## max 80 length
62   max-len: [2, 80, 2]
63   ## max 2 consecutive empty lines
64   no-multiple-empty-lines: [2, {max: 2}]
65   ## require newline at end of files
66   eol-last: 2
67   ## no trailing spaces
68   no-trailing-spaces: 2
69
70   # Strict Mode
71   # list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode
72   ## 'use strict' on top
73   strict: [2, "global"]
74
75   # Variables
76   # list: https://github.com/eslint/eslint/tree/master/docs/rules#variables
77   ## disallow use of undefined variables (globals)
78   no-undef: 2
79
80   # Custom rules in tools/eslint-rules
81   require-buffer: 2
82
83 # Global scoped method and vars
84 globals:
85   DTRACE_HTTP_CLIENT_REQUEST           : false
86   LTTNG_HTTP_CLIENT_REQUEST            : false
87   COUNTER_HTTP_CLIENT_REQUEST          : false
88   DTRACE_HTTP_CLIENT_RESPONSE          : false
89   LTTNG_HTTP_CLIENT_RESPONSE           : false
90   COUNTER_HTTP_CLIENT_RESPONSE         : false
91   DTRACE_HTTP_SERVER_REQUEST           : false
92   LTTNG_HTTP_SERVER_REQUEST            : false
93   COUNTER_HTTP_SERVER_REQUEST          : false
94   DTRACE_HTTP_SERVER_RESPONSE          : false
95   LTTNG_HTTP_SERVER_RESPONSE           : false
96   COUNTER_HTTP_SERVER_RESPONSE         : false
97   DTRACE_NET_STREAM_END                : false
98   LTTNG_NET_STREAM_END                 : false
99   COUNTER_NET_SERVER_CONNECTION_CLOSE  : false
100   DTRACE_NET_SERVER_CONNECTION         : false
101   LTTNG_NET_SERVER_CONNECTION          : false
102   COUNTER_NET_SERVER_CONNECTION        : false
103   escape                               : false
104   unescape                             : false