@repodog/eslint-config 1.0.0-alpha.0 → 1.0.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/index.cjs +48 -10
- package/package.json +22 -24
package/index.cjs
CHANGED
|
@@ -16,9 +16,41 @@ module.exports = {
|
|
|
16
16
|
env: {
|
|
17
17
|
'jest/globals': true,
|
|
18
18
|
},
|
|
19
|
-
extends: ['plugin:jest/recommended'],
|
|
19
|
+
extends: ['plugin:jest/recommended', 'plugin:jest/style'],
|
|
20
20
|
files: ['**/*.{spec,test}.*'],
|
|
21
21
|
plugins: ['jest'],
|
|
22
|
+
rules: {
|
|
23
|
+
'jest/consistent-test-it': [
|
|
24
|
+
2,
|
|
25
|
+
{
|
|
26
|
+
fn: 'it',
|
|
27
|
+
withinDescribe: 'it',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
'jest/max-expects': [
|
|
31
|
+
2,
|
|
32
|
+
{
|
|
33
|
+
max: 1,
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
'jest/max-nested-describe': [
|
|
37
|
+
2,
|
|
38
|
+
{
|
|
39
|
+
max: 5,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
'jest/no-conditional-in-test': 2,
|
|
43
|
+
'jest/no-duplicate-hooks': 2,
|
|
44
|
+
'jest/no-test-return-statement': 2,
|
|
45
|
+
'jest/prefer-called-with': 2,
|
|
46
|
+
'jest/prefer-comparison-matcher': 2,
|
|
47
|
+
'jest/prefer-each': 2,
|
|
48
|
+
'jest/prefer-equality-matcher': 2,
|
|
49
|
+
'jest/prefer-expect-resolves': 2,
|
|
50
|
+
'jest/prefer-hooks-in-order': 2,
|
|
51
|
+
'jest/prefer-hooks-on-top': 2,
|
|
52
|
+
'jest/prefer-todo': 2,
|
|
53
|
+
},
|
|
22
54
|
},
|
|
23
55
|
{
|
|
24
56
|
extends: [
|
|
@@ -35,6 +67,14 @@ module.exports = {
|
|
|
35
67
|
},
|
|
36
68
|
plugins: ['@typescript-eslint', 'typescript-sort-keys'],
|
|
37
69
|
rules: {
|
|
70
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
71
|
+
2,
|
|
72
|
+
{
|
|
73
|
+
disallowTypeAnnotations: false,
|
|
74
|
+
fixStyle: 'inline-type-imports',
|
|
75
|
+
prefer: 'type-imports',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
38
78
|
'@typescript-eslint/naming-convention': [
|
|
39
79
|
2,
|
|
40
80
|
{
|
|
@@ -73,7 +113,7 @@ module.exports = {
|
|
|
73
113
|
],
|
|
74
114
|
'@typescript-eslint/no-use-before-define': [
|
|
75
115
|
2,
|
|
76
|
-
{ enums: true, functions: false, ignoreTypeReferences:
|
|
116
|
+
{ enums: true, functions: false, ignoreTypeReferences: true, typedefs: false },
|
|
77
117
|
],
|
|
78
118
|
'import/no-named-as-default': 0,
|
|
79
119
|
'import/no-named-as-default-member': 0,
|
|
@@ -92,9 +132,7 @@ module.exports = {
|
|
|
92
132
|
},
|
|
93
133
|
{
|
|
94
134
|
files: ['**/*.{mjs,cjs,js,jsx}'],
|
|
95
|
-
rules: {
|
|
96
|
-
'import/extensions': [2, 'always'],
|
|
97
|
-
},
|
|
135
|
+
rules: {},
|
|
98
136
|
},
|
|
99
137
|
],
|
|
100
138
|
parser: '@babel/eslint-parser',
|
|
@@ -115,8 +153,8 @@ module.exports = {
|
|
|
115
153
|
'prettier',
|
|
116
154
|
],
|
|
117
155
|
rules: {
|
|
118
|
-
|
|
119
|
-
'import/
|
|
156
|
+
'import/extensions': [2, 'ignorePackages'],
|
|
157
|
+
'import/namespace': 0,
|
|
120
158
|
'import/no-default-export': 2,
|
|
121
159
|
// Outstanding bug impacting this rule: https://github.com/import-js/eslint-plugin-import/issues/2168
|
|
122
160
|
'import/no-extraneous-dependencies': [
|
|
@@ -175,14 +213,14 @@ module.exports = {
|
|
|
175
213
|
{ blankLine: 'always', next: 'singleline-const', prev: 'cjs-import' },
|
|
176
214
|
{ blankLine: 'always', next: 'singleline-let', prev: 'cjs-import' },
|
|
177
215
|
{ blankLine: 'always', next: '*', prev: 'multiline-const' },
|
|
178
|
-
{ blankLine: 'always', next: 'multiline-const', prev: '
|
|
216
|
+
{ blankLine: 'always', next: 'multiline-const', prev: '*' },
|
|
179
217
|
{ blankLine: 'always', next: '*', prev: 'multiline-let' },
|
|
180
|
-
{ blankLine: 'always', next: 'multiline-
|
|
218
|
+
{ blankLine: 'always', next: 'multiline-let', prev: '*' },
|
|
181
219
|
{ blankLine: 'never', next: 'cjs-export', prev: 'cjs-export' },
|
|
182
220
|
{ blankLine: 'never', next: 'cjs-import', prev: 'cjs-import' },
|
|
183
221
|
{ blankLine: 'always', next: 'case', prev: '*' },
|
|
184
222
|
{ blankLine: 'always', next: 'default', prev: '*' },
|
|
185
|
-
{ blankLine: 'always', next: '
|
|
223
|
+
{ blankLine: 'always', next: '*', prev: 'break' },
|
|
186
224
|
],
|
|
187
225
|
'prettier/prettier': 2,
|
|
188
226
|
'react/jsx-filename-extension': [2, { extensions: ['.jsx', '.tsx'] }],
|
package/package.json
CHANGED
|
@@ -1,39 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repodog/eslint-config",
|
|
3
|
-
"version": "1.0.0-alpha.0",
|
|
4
3
|
"description": "The RepoDog ESLint config module.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"author": "Dylan Aubrey",
|
|
6
|
+
"license": "MIT",
|
|
5
7
|
"homepage": "https://github.com/badbatch/repodog",
|
|
6
|
-
"bugs": {
|
|
7
|
-
"url": "https://github.com/badbatch/repodog/issues"
|
|
8
|
-
},
|
|
9
8
|
"repository": {
|
|
10
9
|
"directory": "configs/eslint-config",
|
|
11
10
|
"type": "git",
|
|
12
11
|
"url": "https://github.com/badbatch/repodog/configs/eslint-config"
|
|
13
12
|
},
|
|
13
|
+
"bugs": "https://github.com/badbatch/repodog/issues",
|
|
14
|
+
"main": "index.cjs",
|
|
14
15
|
"publishConfig": {
|
|
15
16
|
"access": "public"
|
|
16
17
|
},
|
|
17
|
-
"main": "index.cjs",
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"author": "Dylan Aubrey",
|
|
20
18
|
"peerDependencies": {
|
|
21
|
-
"@babel/eslint-parser": "<
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "<
|
|
23
|
-
"@typescript-eslint/parser": "<
|
|
24
|
-
"eslint": "<
|
|
25
|
-
"eslint-config-prettier": "<
|
|
26
|
-
"eslint-import-resolver-typescript": "<
|
|
27
|
-
"eslint-plugin-import": "<
|
|
28
|
-
"eslint-plugin-jest": "<
|
|
29
|
-
"eslint-plugin-jsx-a11y": "<
|
|
30
|
-
"eslint-plugin-prettier": "<
|
|
31
|
-
"eslint-plugin-react": "<
|
|
32
|
-
"eslint-plugin-react-hooks": "<
|
|
33
|
-
"eslint-plugin-sort-class-members": "<
|
|
34
|
-
"eslint-plugin-sort-destructure-keys": "<
|
|
35
|
-
"eslint-plugin-sort-keys-fix": "<
|
|
36
|
-
"eslint-plugin-typescript-sort-keys": "<
|
|
37
|
-
"eslint-plugin-unicorn": "<
|
|
19
|
+
"@babel/eslint-parser": "<8",
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "<6",
|
|
21
|
+
"@typescript-eslint/parser": "<6",
|
|
22
|
+
"eslint": "<9",
|
|
23
|
+
"eslint-config-prettier": "<9",
|
|
24
|
+
"eslint-import-resolver-typescript": "<4",
|
|
25
|
+
"eslint-plugin-import": "<3",
|
|
26
|
+
"eslint-plugin-jest": "<28",
|
|
27
|
+
"eslint-plugin-jsx-a11y": "<7",
|
|
28
|
+
"eslint-plugin-prettier": "<5",
|
|
29
|
+
"eslint-plugin-react": "<8",
|
|
30
|
+
"eslint-plugin-react-hooks": "<5",
|
|
31
|
+
"eslint-plugin-sort-class-members": "<2",
|
|
32
|
+
"eslint-plugin-sort-destructure-keys": "<2",
|
|
33
|
+
"eslint-plugin-sort-keys-fix": "<2",
|
|
34
|
+
"eslint-plugin-typescript-sort-keys": "<3",
|
|
35
|
+
"eslint-plugin-unicorn": "<46"
|
|
38
36
|
}
|
|
39
37
|
}
|