@d-zero/eslint-config 5.0.0-alpha.11 → 5.0.0-alpha.12
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/base.js +121 -6
- package/index.js +2 -38
- package/package.json +2 -2
package/base.js
CHANGED
|
@@ -62,22 +62,137 @@ module.exports = {
|
|
|
62
62
|
},
|
|
63
63
|
],
|
|
64
64
|
|
|
65
|
-
//
|
|
65
|
+
// Sort Class members
|
|
66
66
|
'sort-class-members/sort-class-members': [
|
|
67
67
|
1,
|
|
68
68
|
{
|
|
69
69
|
order: [
|
|
70
|
+
'[public-properties]',
|
|
71
|
+
'[public-readonly-properties]',
|
|
72
|
+
'[public-properties-function]',
|
|
73
|
+
'[private-properties]',
|
|
74
|
+
'[private-properties-function]',
|
|
75
|
+
'[accessor-pairs]',
|
|
76
|
+
'constructor',
|
|
77
|
+
'[public-methods]',
|
|
78
|
+
'[private-methods]',
|
|
79
|
+
'[protedted-methods]',
|
|
70
80
|
'[static-properties]',
|
|
71
81
|
'[static-methods]',
|
|
72
|
-
'[
|
|
73
|
-
'[conventional-private-properties]',
|
|
74
|
-
'constructor',
|
|
75
|
-
'[methods]',
|
|
76
|
-
'[conventional-private-methods]',
|
|
82
|
+
'[everything-else]',
|
|
77
83
|
],
|
|
84
|
+
groups: {
|
|
85
|
+
'public-properties': [
|
|
86
|
+
{
|
|
87
|
+
type: 'property',
|
|
88
|
+
kind: 'nonAccessor',
|
|
89
|
+
static: false,
|
|
90
|
+
private: false,
|
|
91
|
+
override: false,
|
|
92
|
+
readonly: false,
|
|
93
|
+
sort: 'alphabetical',
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
'public-readonly-properties': [
|
|
97
|
+
{
|
|
98
|
+
type: 'property',
|
|
99
|
+
kind: 'nonAccessor',
|
|
100
|
+
static: false,
|
|
101
|
+
private: false,
|
|
102
|
+
override: false,
|
|
103
|
+
readonly: true,
|
|
104
|
+
sort: 'alphabetical',
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
'public-properties-function': [
|
|
108
|
+
{
|
|
109
|
+
type: 'property',
|
|
110
|
+
propertyType: 'ArrowFunctionExpression',
|
|
111
|
+
kind: 'nonAccessor',
|
|
112
|
+
static: false,
|
|
113
|
+
private: false,
|
|
114
|
+
accessibility: 'public',
|
|
115
|
+
override: false,
|
|
116
|
+
sort: 'alphabetical',
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
'private-properties': [
|
|
120
|
+
{
|
|
121
|
+
type: 'property',
|
|
122
|
+
kind: 'nonAccessor',
|
|
123
|
+
static: false,
|
|
124
|
+
private: true,
|
|
125
|
+
override: false,
|
|
126
|
+
sort: 'alphabetical',
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
'private-properties-function': [
|
|
130
|
+
{
|
|
131
|
+
type: 'property',
|
|
132
|
+
propertyType: 'ArrowFunctionExpression',
|
|
133
|
+
kind: 'nonAccessor',
|
|
134
|
+
static: false,
|
|
135
|
+
private: true,
|
|
136
|
+
accessibility: 'public',
|
|
137
|
+
override: false,
|
|
138
|
+
sort: 'alphabetical',
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
'public-methods': [
|
|
142
|
+
{
|
|
143
|
+
type: 'method',
|
|
144
|
+
kind: 'nonAccessor',
|
|
145
|
+
static: false,
|
|
146
|
+
private: false,
|
|
147
|
+
override: false,
|
|
148
|
+
sort: 'alphabetical',
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
'private-methods': [
|
|
152
|
+
{
|
|
153
|
+
name: '/#.+/',
|
|
154
|
+
type: 'method',
|
|
155
|
+
kind: 'nonAccessor',
|
|
156
|
+
static: false,
|
|
157
|
+
private: true,
|
|
158
|
+
override: false,
|
|
159
|
+
sort: 'alphabetical',
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
'protedted-methods': [
|
|
163
|
+
{
|
|
164
|
+
name: '/_.+/',
|
|
165
|
+
type: 'method',
|
|
166
|
+
static: false,
|
|
167
|
+
sort: 'alphabetical',
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
},
|
|
78
171
|
accessorPairPositioning: 'getThenSet',
|
|
79
172
|
},
|
|
80
173
|
],
|
|
174
|
+
|
|
175
|
+
'no-restricted-syntax': [
|
|
176
|
+
2,
|
|
177
|
+
{
|
|
178
|
+
selector:
|
|
179
|
+
':matches(PropertyDefinition, MethodDefinition)[accessibility="private"]',
|
|
180
|
+
message: 'Use #private instead',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
selector:
|
|
184
|
+
':matches(PropertyDefinition, MethodDefinition)[accessibility="public"]',
|
|
185
|
+
message: 'Remove public keyword',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
selector: 'MethodDefinition[key.name=/^_/]:not([accessibility="protected"])',
|
|
189
|
+
message: 'Add protected keyword',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
selector: 'MethodDefinition:not([key.name=/^_/])[accessibility="protected"]',
|
|
193
|
+
message: 'Start with `_` if you want to use protected',
|
|
194
|
+
},
|
|
195
|
+
],
|
|
81
196
|
},
|
|
82
197
|
settings: {
|
|
83
198
|
jsdoc: {
|
package/index.js
CHANGED
|
@@ -33,47 +33,11 @@ module.exports = {
|
|
|
33
33
|
'@typescript-eslint/no-var-requires': 2,
|
|
34
34
|
'@typescript-eslint/no-unnecessary-type-assertion': 2,
|
|
35
35
|
'@typescript-eslint/restrict-plus-operands': 0,
|
|
36
|
+
'@typescript-eslint/no-explicit-any': [1, { fixToUnknown: true }],
|
|
36
37
|
'@typescript-eslint/consistent-type-imports': 1,
|
|
37
38
|
'@typescript-eslint/require-await': 2,
|
|
38
39
|
'@typescript-eslint/no-floating-promises': 2,
|
|
39
|
-
'@typescript-eslint/member-ordering':
|
|
40
|
-
'warn',
|
|
41
|
-
{
|
|
42
|
-
default: 'never',
|
|
43
|
-
classes: {
|
|
44
|
-
memberTypes: [
|
|
45
|
-
'public-static-field',
|
|
46
|
-
'protected-static-field',
|
|
47
|
-
'private-static-field',
|
|
48
|
-
'public-static-method',
|
|
49
|
-
'protected-static-method',
|
|
50
|
-
'public-static-get',
|
|
51
|
-
'protected-static-get',
|
|
52
|
-
'private-static-get',
|
|
53
|
-
'public-instance-field',
|
|
54
|
-
'protected-instance-field',
|
|
55
|
-
'private-instance-field',
|
|
56
|
-
'public-abstract-field',
|
|
57
|
-
'protected-abstract-field',
|
|
58
|
-
'public-constructor',
|
|
59
|
-
'protected-constructor',
|
|
60
|
-
'private-constructor',
|
|
61
|
-
['public-abstract-get', 'public-abstract-set'],
|
|
62
|
-
['protected-abstract-get', 'protected-abstract-set'],
|
|
63
|
-
['public-instance-get', 'public-instance-set'],
|
|
64
|
-
['protected-instance-get', 'protected-instance-set'],
|
|
65
|
-
['private-instance-get', 'private-instance-set'],
|
|
66
|
-
'public-abstract-method',
|
|
67
|
-
'protected-abstract-method',
|
|
68
|
-
'public-instance-method',
|
|
69
|
-
'protected-instance-method',
|
|
70
|
-
'private-instance-method',
|
|
71
|
-
'private-static-method',
|
|
72
|
-
],
|
|
73
|
-
order: 'alphabetically',
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
],
|
|
40
|
+
'@typescript-eslint/member-ordering': 0,
|
|
77
41
|
},
|
|
78
42
|
},
|
|
79
43
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-zero/eslint-config",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.12",
|
|
4
4
|
"description": "Configurations of ESLint",
|
|
5
5
|
"repository": "https://github.com/d-zero-dev/linters.git",
|
|
6
6
|
"author": "D-ZERO Co., Ltd.",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"eslint-plugin-sort-class-members": "1.20.0",
|
|
35
35
|
"eslint-plugin-unicorn": "51.0.1"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "61145d5dfd13cff6630f882c5e11e3c5e3fb8d39"
|
|
38
38
|
}
|