-
Notifications
You must be signed in to change notification settings - Fork 34
/
.eslintrc.cjs
64 lines (61 loc) · 2.85 KB
/
.eslintrc.cjs
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
57
58
59
60
61
62
63
64
module.exports = {
"extends": [
"airbnb-base"
],
env: {
node: true,
jest: true
},
rules: {
"no-trailing-spaces": ["error", {
skipBlankLines: true
}],
indent: ["error", 4, {
VariableDeclarator: 1,
MemberExpression: 1
}],
quotes: ["error", "double"],
"max-len": ["error", 500],
"comma-dangle": ["error", "never"],
"space-before-function-paren": ["error", "never"],
"no-unused-vars": ["error", {
args: "none"
}],
"arrow-parens": ["error", "always"],
"func-names": 0, // Do not enforce to use named functions
"operator-assignment": 0, // Do not enforce specific rule about operator assignment
"no-param-reassign": 0, // Allow reassigning params. We need this at least for map and reduce
yoda: 0, // Do not enforce yoda rules
"no-prototype-builtins": 0, // Allow calling Object.prototype methods directly on object instances
"dot-notation": ["error", { allowPattern: "^[a-z]+(_[a-z]+)+$" }],
"global-require": 0,
"no-new": 0,
"no-void": 0,
"no-bitwise": 0,
"no-plusplus": 0, // Allow unary operator '++'
camelcase: 0,
"no-mixed-operators": 0,
"newline-per-chained-call": 0, // Don't require a newline after each call in a method chain
"no-nested-ternary": 0,
"no-underscore-dangle": 0, // Allow _ dangle
"prefer-destructuring": 0,
"prefer-rest-params": 0, // Use the rest parameters instead of 'arguments'
"quote-props": ["error", "as-needed", { keywords: true, numbers: true }], // Unnecessarily quoted property found
"consistent-return": 1, // Expected to return a value at the end of this function
"no-cond-assign": 0,
"prefer-spread": 0, // Use the spread operator instead of '.apply()'
eqeqeq: 1, // Expected '===' and instead saw '=='
"guard-for-in": 0, // Temp: Wrap for-in loop into `if ({}.hasOwnProperty.call(initial, i)) {`
"no-restricted-syntax": 0, // Do not use iterators. Prefer JavaScript's higher-order functions instead of loops like for-in or for-of
"no-else-return": 1, // Disallow return before else,
"no-use-before-define": 0,
"semi-style": ["error", "last"], // Enforce location of semicolons
// Enforce consistent line breaks inside braces.
// Override base config to increase the number of minProperties in ObjectPattern (configuration for object patterns of destructuring assignments)
"object-curly-newline": ["error", {
ObjectExpression: { minProperties: 4, multiline: true, consistent: true },
ObjectPattern: { minProperties: 5, multiline: true, consistent: true }
}],
"import/prefer-default-export": 0
}
};