@ntnyq/eslint-config 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +89 -0
- package/package.json +7 -4
package/lib/index.js
CHANGED
|
@@ -37,5 +37,94 @@ module.exports = {
|
|
|
37
37
|
* @see https://eslint.org/docs/rules/comma-dangle
|
|
38
38
|
*/
|
|
39
39
|
'comma-dangle': ['error', 'always-multiline'],
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Enforce a maximum file length
|
|
43
|
+
*
|
|
44
|
+
* @see https://eslint.org/docs/rules/max-lines
|
|
45
|
+
*/
|
|
46
|
+
'max-lines': [
|
|
47
|
+
'error',
|
|
48
|
+
{
|
|
49
|
+
max: 1000,
|
|
50
|
+
skipComments: true,
|
|
51
|
+
skipBlankLines: true,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Limit Cyclomatic Complexity
|
|
57
|
+
*
|
|
58
|
+
* @see https://eslint.org/docs/rules/complexity
|
|
59
|
+
*/
|
|
60
|
+
complexity: ['error', { max: 30 }],
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Enforce a maximum number of parameters in function definitions
|
|
64
|
+
*
|
|
65
|
+
* @see https://eslint.org/docs/rules/max-params
|
|
66
|
+
*/
|
|
67
|
+
'max-params': ['error', { max: 5 }],
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Enforce a maximum line length
|
|
71
|
+
*
|
|
72
|
+
* @see https://eslint.org/docs/rules/max-len
|
|
73
|
+
*/
|
|
74
|
+
'max-len': [
|
|
75
|
+
'error',
|
|
76
|
+
{
|
|
77
|
+
code: 200,
|
|
78
|
+
tabWidth: 2,
|
|
79
|
+
comments: 200,
|
|
80
|
+
ignoreUrls: true,
|
|
81
|
+
ignoreStrings: true,
|
|
82
|
+
ignoreRegExpLiterals: true,
|
|
83
|
+
ignoreTemplateLiterals: true,
|
|
84
|
+
ignoreTrailingComments: true,
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Enforce a maximum depth that callbacks can be nested
|
|
90
|
+
*
|
|
91
|
+
* @see https://eslint.org/docs/rules/max-nested-callbacks
|
|
92
|
+
*/
|
|
93
|
+
'max-nested-callbacks': ['error', { max: 10 }],
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Enforce a maximum function length
|
|
97
|
+
*
|
|
98
|
+
* @see https://eslint.org/docs/rules/max-lines-per-function
|
|
99
|
+
*/
|
|
100
|
+
'max-lines-per-function': [
|
|
101
|
+
'error',
|
|
102
|
+
{
|
|
103
|
+
max: 100,
|
|
104
|
+
skipBlankLines: true,
|
|
105
|
+
skipComments: true,
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Enforce a maximum number of statements allowed per line
|
|
111
|
+
*
|
|
112
|
+
* @see https://eslint.org/docs/rules/max-statements-per-line
|
|
113
|
+
*/
|
|
114
|
+
'max-statements-per-line': ['error', { max: 2 }],
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Enforce a maximum depth that blocks can be nested
|
|
118
|
+
*
|
|
119
|
+
* @see https://eslint.org/docs/rules/max-depth
|
|
120
|
+
*/
|
|
121
|
+
'max-depth': ['error', { max: 5 }],
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Enforces having one empty lines after the last top-level import statement or require call
|
|
125
|
+
*
|
|
126
|
+
* @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md
|
|
127
|
+
*/
|
|
128
|
+
'import/newline-after-import': ['error'],
|
|
40
129
|
},
|
|
41
130
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "ntnyq eslint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config",
|
|
7
7
|
"ntnyq"
|
|
8
8
|
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "jest"
|
|
11
|
+
},
|
|
9
12
|
"homepage": "https://github.com/ntnyq/configs#readme",
|
|
10
13
|
"repository": {
|
|
11
14
|
"type": "git",
|
|
@@ -23,12 +26,12 @@
|
|
|
23
26
|
],
|
|
24
27
|
"dependencies": {
|
|
25
28
|
"eslint-config-standard": "^16.0.3",
|
|
26
|
-
"eslint-plugin-import": "^2.
|
|
29
|
+
"eslint-plugin-import": "^2.25.4",
|
|
27
30
|
"eslint-plugin-node": "^11.1.0",
|
|
28
|
-
"eslint-plugin-promise": "^
|
|
31
|
+
"eslint-plugin-promise": "^6.0.0"
|
|
29
32
|
},
|
|
30
33
|
"publishConfig": {
|
|
31
34
|
"access": "public"
|
|
32
35
|
},
|
|
33
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "9a1352e301fdf0faa9714e3a5fc99eb8db19ec1b"
|
|
34
37
|
}
|