forked from hildjj/node-cbor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
56 lines (53 loc) · 1.56 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"use strict";
/**
* Based on npm coding standards at https://docs.npmjs.com/misc/coding-style.
*
* The places we differ from the npm coding style:
* - Commas should be at the end of a line.
* - Always use semicolons.
* - Functions should not have whitespace before params.
*/
module.exports = {
"env": {
"node": true,
"es6": true
},
parserOptions: {
ecmaVersion: 6,
},
"rules": {
"arrow-spacing": "error",
"brace-style": ["error", "1tbs"],
"comma-dangle": ["error", "never"],
"comma-spacing": "error",
"comma-style": ["error", "last"],
"curly": ["error", "multi-line"],
"generator-star-spacing": "error",
"handle-callback-err": ["error", "er"],
"indent": ["error", 2, {"SwitchCase": 1}],
"keyword-spacing": "error",
"max-len": ["error", 80],
"no-const-assign": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-duplicate-case": "error",
"no-fallthrough": "error",
"no-multiple-empty-lines": ["error", {"max": 1}],
"no-new-symbol": "error",
"no-undef-init": "error",
"no-undef": "error",
"no-unexpected-multiline": "error",
"no-var": "error",
"object-curly-spacing": "off",
"one-var": ["error", "never"],
"operator-linebreak": ["error", "after"],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"semi": ["error", "never"],
"space-before-blocks": "error",
"space-before-function-paren": ["error", "never"],
"strict": ["error", "global"],
// more from hildjj:
"quotes": ["error", "single"],
},
};