@slashnephy/eslint-config 0.2.0 → 0.2.2
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/dist/javascript.js +0 -2
- package/dist/typescript.js +21 -19
- package/package.json +4 -4
package/dist/javascript.js
CHANGED
|
@@ -71,14 +71,12 @@ const javascript = {
|
|
|
71
71
|
'no-await-in-loop': 'error',
|
|
72
72
|
'no-constant-binary-expression': 'error',
|
|
73
73
|
'no-constructor-return': 'error',
|
|
74
|
-
'no-duplicate-imports': ['error', { includeExports: true }],
|
|
75
74
|
'no-promise-executor-return': 'error',
|
|
76
75
|
'no-self-compare': 'error',
|
|
77
76
|
'no-template-curly-in-string': 'error',
|
|
78
77
|
'no-unmodified-loop-condition': 'error',
|
|
79
78
|
'no-unreachable-loop': 'error',
|
|
80
79
|
'no-unused-private-class-members': 'error',
|
|
81
|
-
'no-use-before-define': 'error',
|
|
82
80
|
'require-atomic-updates': 'error',
|
|
83
81
|
'func-call-spacing': ['error', 'never'],
|
|
84
82
|
'accessor-pairs': 'error',
|
package/dist/typescript.js
CHANGED
|
@@ -17,6 +17,7 @@ const typescript = {
|
|
|
17
17
|
warnOnUnsupportedTypeScriptVersion: true,
|
|
18
18
|
},
|
|
19
19
|
rules: {
|
|
20
|
+
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
|
|
20
21
|
'@typescript-eslint/consistent-type-exports': [
|
|
21
22
|
'error',
|
|
22
23
|
{
|
|
@@ -24,12 +25,11 @@ const typescript = {
|
|
|
24
25
|
},
|
|
25
26
|
],
|
|
26
27
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
27
|
-
'@typescript-eslint/explicit-function-return-type': 'warn',
|
|
28
28
|
'@typescript-eslint/explicit-member-accessibility': 'error',
|
|
29
29
|
'@typescript-eslint/explicit-module-boundary-types': 'warn',
|
|
30
30
|
'@typescript-eslint/member-delimiter-style': 'error',
|
|
31
31
|
'@typescript-eslint/member-ordering': 'warn',
|
|
32
|
-
'@typescript-eslint/method-signature-style': 'warn',
|
|
32
|
+
'@typescript-eslint/method-signature-style': ['warn', 'method'],
|
|
33
33
|
'@typescript-eslint/naming-convention': [
|
|
34
34
|
'warn',
|
|
35
35
|
{
|
|
@@ -38,19 +38,29 @@ const typescript = {
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
selector: ['variableLike'],
|
|
41
|
-
format: ['camelCase'],
|
|
41
|
+
format: ['camelCase', 'UPPER_CASE'],
|
|
42
42
|
leadingUnderscore: 'allow',
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
selector: ['
|
|
46
|
-
|
|
47
|
-
format: ['UPPER_CASE'],
|
|
45
|
+
selector: ['property'],
|
|
46
|
+
format: ['camelCase', 'snake_case'],
|
|
48
47
|
},
|
|
49
48
|
{
|
|
50
49
|
selector: ['variableLike'],
|
|
51
50
|
types: ['boolean'],
|
|
52
51
|
format: ['PascalCase'],
|
|
53
|
-
prefix: [
|
|
52
|
+
prefix: [
|
|
53
|
+
'is',
|
|
54
|
+
'are',
|
|
55
|
+
'was',
|
|
56
|
+
'were',
|
|
57
|
+
'should',
|
|
58
|
+
'has',
|
|
59
|
+
'can',
|
|
60
|
+
'did',
|
|
61
|
+
'will',
|
|
62
|
+
'contains',
|
|
63
|
+
],
|
|
54
64
|
},
|
|
55
65
|
{
|
|
56
66
|
selector: ['typeLike'],
|
|
@@ -63,13 +73,13 @@ const typescript = {
|
|
|
63
73
|
leadingUnderscore: 'require',
|
|
64
74
|
},
|
|
65
75
|
{
|
|
66
|
-
selector: ['
|
|
67
|
-
modifiers: ['
|
|
76
|
+
selector: ['variableLike'],
|
|
77
|
+
modifiers: ['destructured'],
|
|
68
78
|
format: null,
|
|
69
79
|
},
|
|
70
80
|
{
|
|
71
|
-
selector: ['
|
|
72
|
-
modifiers: ['
|
|
81
|
+
selector: ['memberLike', 'property'],
|
|
82
|
+
modifiers: ['requiresQuotes'],
|
|
73
83
|
format: null,
|
|
74
84
|
},
|
|
75
85
|
],
|
|
@@ -77,7 +87,6 @@ const typescript = {
|
|
|
77
87
|
'@typescript-eslint/no-implicit-any-catch': 'error',
|
|
78
88
|
'@typescript-eslint/no-redundant-type-constituents': 'warn',
|
|
79
89
|
'@typescript-eslint/no-require-imports': 'warn',
|
|
80
|
-
'@typescript-eslint/no-type-alias': 'warn',
|
|
81
90
|
'@typescript-eslint/no-unnecessary-qualifier': 'error',
|
|
82
91
|
'@typescript-eslint/no-useless-empty-export': 'error',
|
|
83
92
|
'@typescript-eslint/parameter-properties': [
|
|
@@ -97,11 +106,9 @@ const typescript = {
|
|
|
97
106
|
],
|
|
98
107
|
'@typescript-eslint/prefer-enum-initializers': 'warn',
|
|
99
108
|
'@typescript-eslint/prefer-readonly': 'error',
|
|
100
|
-
'@typescript-eslint/prefer-readonly-parameter-types': 'warn',
|
|
101
109
|
'@typescript-eslint/prefer-regexp-exec': 'error',
|
|
102
110
|
'@typescript-eslint/promise-function-async': 'error',
|
|
103
111
|
'@typescript-eslint/require-array-sort-compare': 'off',
|
|
104
|
-
'@typescript-eslint/sort-type-union-intersection-members': 'error',
|
|
105
112
|
'@typescript-eslint/strict-boolean-expressions': 'error',
|
|
106
113
|
'@typescript-eslint/switch-exhaustiveness-check': 'error',
|
|
107
114
|
'@typescript-eslint/type-annotation-spacing': 'error',
|
|
@@ -113,11 +120,6 @@ const typescript = {
|
|
|
113
120
|
allowNullish: true,
|
|
114
121
|
},
|
|
115
122
|
],
|
|
116
|
-
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
117
|
-
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
118
|
-
'@typescript-eslint/no-unsafe-call': 'off',
|
|
119
|
-
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
120
|
-
'@typescript-eslint/no-unsafe-return': 'off',
|
|
121
123
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
122
124
|
'unused-imports/no-unused-vars': [
|
|
123
125
|
'warn',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slashnephy/eslint-config",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"author": "SlashNephy <spica@starry.blue> (https://spica.starry.blue/)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsc",
|
|
21
|
-
"clean": "rm -rf dist
|
|
21
|
+
"clean": "rm -rf dist/",
|
|
22
22
|
"format": "concurrently -n format: 'yarn:format:*'",
|
|
23
23
|
"format:eslint": "yarn build && yarn lint:eslint --fix",
|
|
24
24
|
"format:prettier": "yarn lint:prettier --write",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"publish": "yarn clean && yarn build && yarn npm publish"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
32
|
-
"@typescript-eslint/parser": "5.
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "5.37.0",
|
|
32
|
+
"@typescript-eslint/parser": "5.37.0",
|
|
33
33
|
"eslint-config-next": "12.2.5",
|
|
34
34
|
"eslint-config-prettier": "8.5.0",
|
|
35
35
|
"eslint-import-resolver-typescript": "3.5.0",
|