@ntnyq/eslint-config 0.3.0 → 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/README.md +9 -9
- package/lib/index.js +89 -0
- package/package.json +8 -5
- package/CHANGELOG.md +0 -30
package/README.md
CHANGED
|
@@ -16,13 +16,13 @@ in `.eslintrc.js`
|
|
|
16
16
|
|
|
17
17
|
```js
|
|
18
18
|
module.exports = {
|
|
19
|
-
|
|
19
|
+
root: true,
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
extends: ['@ntnyq'],
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
rules: {
|
|
24
|
+
// Override rules
|
|
25
|
+
},
|
|
26
26
|
}
|
|
27
27
|
```
|
|
28
28
|
|
|
@@ -30,9 +30,9 @@ in `package.json`
|
|
|
30
30
|
|
|
31
31
|
```json
|
|
32
32
|
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
"eslintConfig": {
|
|
34
|
+
"root": true,
|
|
35
|
+
"extends": "@ntnyq"
|
|
36
|
+
}
|
|
37
37
|
}
|
|
38
38
|
```
|
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",
|
|
@@ -22,13 +25,13 @@
|
|
|
22
25
|
"lib"
|
|
23
26
|
],
|
|
24
27
|
"dependencies": {
|
|
25
|
-
"eslint-config-standard": "^16.0.
|
|
26
|
-
"eslint-plugin-import": "^2.
|
|
28
|
+
"eslint-config-standard": "^16.0.3",
|
|
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
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [0.3.0](https://github.com/ntnyq/configs/compare/@ntnyq/eslint-config@0.2.0...@ntnyq/eslint-config@0.3.0) (2020-12-10)
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
- deprecate eslint-plugin-standard ([66f0e1a](https://github.com/ntnyq/configs/commit/66f0e1a2ca5060a631477a69d6706a6a8fda2708))
|
|
11
|
-
|
|
12
|
-
# [0.2.0](https://github.com/ntnyq/configs/compare/@ntnyq/eslint-config@0.1.0...@ntnyq/eslint-config@0.2.0) (2020-11-19)
|
|
13
|
-
|
|
14
|
-
### Features
|
|
15
|
-
|
|
16
|
-
- prettier overrides config ([3185cbf](https://github.com/ntnyq/configs/commit/3185cbf4a167796c4a702e7bc76a8193e5596551))
|
|
17
|
-
|
|
18
|
-
# [0.1.0](https://github.com/ntnyq/configs/compare/@ntnyq/eslint-config@0.0.2...@ntnyq/eslint-config@0.1.0) (2020-11-07)
|
|
19
|
-
|
|
20
|
-
### Features
|
|
21
|
-
|
|
22
|
-
- extract babel-eslint ([a1f7446](https://github.com/ntnyq/configs/commit/a1f744685ff7038a72a94a0efe69b28eb27d0a7e))
|
|
23
|
-
|
|
24
|
-
## [0.0.2](https://github.com/ntnyq/configs/compare/@ntnyq/eslint-config@0.0.1...@ntnyq/eslint-config@0.0.2) (2020-10-10)
|
|
25
|
-
|
|
26
|
-
**Note:** Version bump only for package @ntnyq/eslint-config
|
|
27
|
-
|
|
28
|
-
## 0.0.1 (2020-09-09)
|
|
29
|
-
|
|
30
|
-
**Note:** Version bump only for package @ntnyq/eslint-config
|