-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
94 lines (94 loc) · 3.5 KB
/
.eslintrc
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
'env': {
'es6': true
},
'parserOptions': {
'ecmaVersion': 6,
'sourceType': 'module',
'ecmaFeatures': {
'jsx': true,
'generators': false,
'objectLiteralDuplicateProperties': false
}
},
'rules': {
// AIRBNB LEGACY MODIFIED
// disallow trailing commas in object literals
'comma-dangle': [2, 'never'],
// specify the maximum depth that blocks can be nested
'max-depth': [0, 4],
// limits the number of parameters that can be used in the function declaration.
'max-params': [0, 3],
// specify the maximum number of statement allowed in a function
'max-statements': [0, 10],
// disallow use of bitwise operators
'no-bitwise': 0,
// disallow use of unary operators, ++ and --
'no-plusplus': 0,
// ===============
// AIRBNB ES6 MODIFIED
// require parens in arrow function arguments
'arrow-parens': 0,
// require space before/after arrow function's arrow
// https://github.com/eslint/eslint/blob/master/docs/rules/arrow-spacing.md
'arrow-spacing': [2, {
'before': true,
'after': true
}],
// verify super() callings in constructors
'constructor-super': 0,
// enforce the spacing around the * in generator functions
'generator-star-spacing': 0,
// disallow modifying variables of class declarations
'no-class-assign': 0,
// disallow arrow functions where they could be confused with comparisons
// http://eslint.org/docs/rules/no-confusing-arrow
'no-confusing-arrow': [2, {
'allowParens': true,
}],
// disallow modifying variables that are declared using const
'no-const-assign': 2,
// disallow importing from the same path more than once
// http://eslint.org/docs/rules/no-duplicate-imports
'no-duplicate-imports': 2,
// disallow symbol constructor
// http://eslint.org/docs/rules/no-new-symbol
'no-new-symbol': 2,
// disallow specific globals
'no-restricted-globals': 0,
// disallow specific imports
// http://eslint.org/docs/rules/no-restricted-imports
'no-restricted-imports': 0,
// disallow to use this/super before super() calling in constructors.
'no-this-before-super': 0,
// require let or const instead of var
'no-var': 2,
// disallow unnecessary constructor
// http://eslint.org/docs/rules/no-useless-constructor
'no-useless-constructor': 2,
// require method and property shorthand syntax for object literals
// https://github.com/eslint/eslint/blob/master/docs/rules/object-shorthand.md
'object-shorthand': [2, 'properties'],
// suggest using of const declaration for variables that are never modified after declared
'prefer-const': 0,
// suggest using the spread operator instead of .apply()
'prefer-spread': 0,
// suggest using Reflect methods where applicable
'prefer-reflect': 0,
// use rest parameters instead of arguments
// http://eslint.org/docs/rules/prefer-rest-params
'prefer-rest-params': 2,
// suggest using template literals instead of string concatenation
// disallow generator functions that do not have yield
'require-yield': 0,
// import sorting
// http://eslint.org/docs/rules/sort-imports
'sort-imports': 0,
// enforce usage of spacing in template strings
// http://eslint.org/docs/rules/template-curly-spacing
'template-curly-spacing': 2,
// enforce spacing around the * in yield* expressions
// http://eslint.org/docs/rules/yield-star-spacing
'yield-star-spacing': [2, 'after']
}
}