@joshuaavalon/eslint-config-typescript 8.1.3 → 8.1.5

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joshuaavalon/eslint-config-typescript",
3
- "version": "8.1.3",
3
+ "version": "8.1.5",
4
4
  "description": "Shareable ESLint Typescript config.",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",
@@ -34,10 +34,10 @@
34
34
  "url": "https://github.com/joshuaavalon/eslint-config/issues"
35
35
  },
36
36
  "dependencies": {
37
- "@joshuaavalon/eslint-config-javascript": "^8.1.2",
38
- "typescript-eslint": "^8.0.0"
37
+ "@joshuaavalon/eslint-config-javascript": "^8.1.4",
38
+ "typescript-eslint": "^8.3.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "eslint": "^9.8.0"
41
+ "eslint": "^9.9.1"
42
42
  }
43
43
  }
package/dist/cjs/index.js DELETED
@@ -1,199 +0,0 @@
1
- 'use strict';
2
-
3
- var typescript = require('typescript-eslint');
4
- var jsConfig = require('@joshuaavalon/eslint-config-javascript');
5
-
6
- /** @type {import("eslint").Linter.RulesRecord} */
7
- const extensionRules = {
8
- "default-param-last": "off",
9
- "@typescript-eslint/default-param-last": "error",
10
- "dot-notation": "off",
11
- "@typescript-eslint/dot-notation": "error",
12
- "no-array-constructor": "off",
13
- "@typescript-eslint/no-array-constructor": "error",
14
- "no-dupe-class-members": "off",
15
- "@typescript-eslint/no-dupe-class-members": "error",
16
- "no-implied-eval": "off",
17
- "@typescript-eslint/no-implied-eval": "error",
18
- "no-loop-func": "off",
19
- "@typescript-eslint/no-loop-func": "error",
20
- "no-redeclare": "off",
21
- "@typescript-eslint/no-redeclare": "error",
22
- "no-throw-literal": "off",
23
- "@typescript-eslint/only-throw-error": "error",
24
- "no-unused-expressions": "off",
25
- "@typescript-eslint/no-unused-expressions": "error",
26
- "no-unused-vars": "off",
27
- "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
28
- "no-use-before-define": "off",
29
- "@typescript-eslint/no-use-before-define": "error",
30
- "no-useless-constructor": "off",
31
- "@typescript-eslint/no-useless-constructor": "error",
32
- "require-await": "off",
33
- "@typescript-eslint/require-await": "off",
34
- "no-return-await": "off",
35
- "@typescript-eslint/return-await": "error"
36
- };
37
-
38
- /** @type {import("eslint").Linter.RulesRecord} */
39
- const rules$1 = {
40
- "constructor-super": "off",
41
- "no-invalid-this": "off",
42
- "no-undef": "off",
43
- "no-const-assign": "off",
44
- "no-this-before-super": "off",
45
- "no-dupe-args": "off",
46
- "no-unreachable": "off",
47
- "getter-return": "off",
48
- "no-dupe-keys": "off",
49
- "no-func-assign": "off",
50
- "no-dupe-class-members": "off",
51
- "no-obj-calls": "off",
52
- "no-setter-return": "off",
53
- "no-unsafe-negation": "off",
54
- "no-import-assign": "off",
55
- "@typescript-eslint/adjacent-overload-signatures": "error",
56
- "@typescript-eslint/array-type": "error",
57
- "@typescript-eslint/await-thenable": "error",
58
- "@typescript-eslint/no-empty-object-type": ["error",
59
- {
60
- allowInterfaces: "always",
61
- allowObjectTypes: "always"
62
- }],
63
- "@typescript-eslint/no-unsafe-function-type": "error",
64
- "@typescript-eslint/no-wrapper-object-types": "error",
65
- "@typescript-eslint/consistent-generic-constructors": "error",
66
- "@typescript-eslint/consistent-type-exports": "error",
67
- "@typescript-eslint/consistent-type-imports": "error",
68
- "@typescript-eslint/explicit-function-return-type": [
69
- "error",
70
- {
71
- allowExpressions: true,
72
- allowTypedFunctionExpressions: true,
73
- allowHigherOrderFunctions: true,
74
- allowDirectConstAssertionInArrowFunctions: true
75
- }
76
- ],
77
- "@typescript-eslint/explicit-member-accessibility": "error",
78
- "@typescript-eslint/explicit-module-boundary-types": "error",
79
- "@typescript-eslint/naming-convention": [
80
- "error",
81
- {
82
- format: ["camelCase"],
83
- leadingUnderscore: "allow",
84
- selector: "default"
85
- },
86
- {
87
- format: [
88
- "camelCase",
89
- "UPPER_CASE",
90
- "PascalCase"
91
- ],
92
- leadingUnderscore: "allow",
93
- selector: "variable"
94
- },
95
- {
96
- selector: "typeLike",
97
- format: ["PascalCase"]
98
- },
99
- {
100
- selector: "import",
101
- format: ["camelCase", "PascalCase"]
102
- },
103
- {
104
- selector: "function",
105
- format: ["camelCase", "PascalCase"]
106
- },
107
- {
108
- format: null,
109
- modifiers: ["destructured"],
110
- selector: "variable"
111
- },
112
- {
113
- format: null,
114
- selector: "objectLiteralProperty"
115
- }
116
- ],
117
- camelcase: "off",
118
- "@typescript-eslint/no-base-to-string": "error",
119
- "@typescript-eslint/no-confusing-non-null-assertion": "error",
120
- "@typescript-eslint/no-confusing-void-expression": "error",
121
- "@typescript-eslint/no-duplicate-enum-values": "error",
122
- "@typescript-eslint/no-duplicate-type-constituents": "error",
123
- "@typescript-eslint/no-dynamic-delete": "error",
124
- "@typescript-eslint/no-extra-non-null-assertion": "error",
125
- "@typescript-eslint/no-extraneous-class": "error",
126
- // "@typescript-eslint/no-floating-promises": "error",
127
- "@typescript-eslint/no-for-in-array": "error",
128
- "@typescript-eslint/no-import-type-side-effects": "error",
129
- "@typescript-eslint/no-inferrable-types": "error",
130
- "@typescript-eslint/no-invalid-void-type": "error",
131
- "@typescript-eslint/no-meaningless-void-operator": "error",
132
- "@typescript-eslint/no-misused-new": "error",
133
- "@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
134
- "@typescript-eslint/no-mixed-enums": "error",
135
- "@typescript-eslint/no-namespace": "error",
136
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
137
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
138
- "@typescript-eslint/no-non-null-assertion": "error",
139
- "@typescript-eslint/no-redundant-type-constituents": "error",
140
- "@typescript-eslint/no-require-imports": "error",
141
- "@typescript-eslint/no-this-alias": "error",
142
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
143
- "@typescript-eslint/no-unnecessary-qualifier": "error",
144
- "@typescript-eslint/no-unnecessary-type-arguments": "error",
145
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
146
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
147
- "@typescript-eslint/no-unsafe-argument": "off",
148
- "@typescript-eslint/no-unsafe-assignment": "off",
149
- "@typescript-eslint/no-unsafe-call": "off",
150
- "@typescript-eslint/no-unsafe-declaration-merging": "off",
151
- "@typescript-eslint/no-unsafe-enum-comparison": "off",
152
- "@typescript-eslint/no-unsafe-member-access": "off",
153
- "@typescript-eslint/no-unsafe-return": "off",
154
- "@typescript-eslint/no-useless-empty-export": "error",
155
- "@typescript-eslint/non-nullable-type-assertion-style": "error",
156
- "@typescript-eslint/parameter-properties": "error",
157
- "@typescript-eslint/prefer-as-const": "error",
158
- "@typescript-eslint/prefer-enum-initializers": "error",
159
- "@typescript-eslint/prefer-for-of": "error",
160
- "@typescript-eslint/prefer-includes": "error",
161
- "@typescript-eslint/prefer-literal-enum-member": "error",
162
- "@typescript-eslint/prefer-namespace-keyword": "error",
163
- "@typescript-eslint/prefer-nullish-coalescing": "error",
164
- "@typescript-eslint/prefer-optional-chain": "error",
165
- "@typescript-eslint/prefer-readonly": "error",
166
- "@typescript-eslint/prefer-reduce-type-parameter": "error",
167
- "@typescript-eslint/prefer-regexp-exec": "error",
168
- "@typescript-eslint/prefer-return-this-type": "error",
169
- "@typescript-eslint/prefer-string-starts-ends-with": "error",
170
- "@typescript-eslint/promise-function-async": "off",
171
- "@typescript-eslint/restrict-plus-operands": "error",
172
- "@typescript-eslint/sort-type-constituents": "error",
173
- "@typescript-eslint/switch-exhaustiveness-check": "error",
174
- "@typescript-eslint/unbound-method": "error",
175
- ...extensionRules,
176
- "no-duplicate-imports": ["off"]
177
- };
178
-
179
- /** @type {import("@stylistic/eslint-plugin").RuleOptions} */
180
- const rules = {
181
- "@stylistic/type-annotation-spacing": "error",
182
- "@stylistic/type-generic-spacing": ["error"],
183
- "@stylistic/type-named-tuple-spacing": ["error"]
184
- };
185
-
186
- /** @type {import("eslint").Linter.Config} */
187
- const config = {
188
- plugins: {
189
- ...jsConfig.plugins,
190
- "@typescript-eslint": typescript.plugin
191
- },
192
- rules: {
193
- ...jsConfig.rules,
194
- ...rules$1,
195
- ...rules
196
- }
197
- };
198
-
199
- module.exports = config;
package/dist/esm/index.js DELETED
@@ -1,197 +0,0 @@
1
- import typescript from 'typescript-eslint';
2
- import jsConfig from '@joshuaavalon/eslint-config-javascript';
3
-
4
- /** @type {import("eslint").Linter.RulesRecord} */
5
- const extensionRules = {
6
- "default-param-last": "off",
7
- "@typescript-eslint/default-param-last": "error",
8
- "dot-notation": "off",
9
- "@typescript-eslint/dot-notation": "error",
10
- "no-array-constructor": "off",
11
- "@typescript-eslint/no-array-constructor": "error",
12
- "no-dupe-class-members": "off",
13
- "@typescript-eslint/no-dupe-class-members": "error",
14
- "no-implied-eval": "off",
15
- "@typescript-eslint/no-implied-eval": "error",
16
- "no-loop-func": "off",
17
- "@typescript-eslint/no-loop-func": "error",
18
- "no-redeclare": "off",
19
- "@typescript-eslint/no-redeclare": "error",
20
- "no-throw-literal": "off",
21
- "@typescript-eslint/only-throw-error": "error",
22
- "no-unused-expressions": "off",
23
- "@typescript-eslint/no-unused-expressions": "error",
24
- "no-unused-vars": "off",
25
- "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
26
- "no-use-before-define": "off",
27
- "@typescript-eslint/no-use-before-define": "error",
28
- "no-useless-constructor": "off",
29
- "@typescript-eslint/no-useless-constructor": "error",
30
- "require-await": "off",
31
- "@typescript-eslint/require-await": "off",
32
- "no-return-await": "off",
33
- "@typescript-eslint/return-await": "error"
34
- };
35
-
36
- /** @type {import("eslint").Linter.RulesRecord} */
37
- const rules$1 = {
38
- "constructor-super": "off",
39
- "no-invalid-this": "off",
40
- "no-undef": "off",
41
- "no-const-assign": "off",
42
- "no-this-before-super": "off",
43
- "no-dupe-args": "off",
44
- "no-unreachable": "off",
45
- "getter-return": "off",
46
- "no-dupe-keys": "off",
47
- "no-func-assign": "off",
48
- "no-dupe-class-members": "off",
49
- "no-obj-calls": "off",
50
- "no-setter-return": "off",
51
- "no-unsafe-negation": "off",
52
- "no-import-assign": "off",
53
- "@typescript-eslint/adjacent-overload-signatures": "error",
54
- "@typescript-eslint/array-type": "error",
55
- "@typescript-eslint/await-thenable": "error",
56
- "@typescript-eslint/no-empty-object-type": ["error",
57
- {
58
- allowInterfaces: "always",
59
- allowObjectTypes: "always"
60
- }],
61
- "@typescript-eslint/no-unsafe-function-type": "error",
62
- "@typescript-eslint/no-wrapper-object-types": "error",
63
- "@typescript-eslint/consistent-generic-constructors": "error",
64
- "@typescript-eslint/consistent-type-exports": "error",
65
- "@typescript-eslint/consistent-type-imports": "error",
66
- "@typescript-eslint/explicit-function-return-type": [
67
- "error",
68
- {
69
- allowExpressions: true,
70
- allowTypedFunctionExpressions: true,
71
- allowHigherOrderFunctions: true,
72
- allowDirectConstAssertionInArrowFunctions: true
73
- }
74
- ],
75
- "@typescript-eslint/explicit-member-accessibility": "error",
76
- "@typescript-eslint/explicit-module-boundary-types": "error",
77
- "@typescript-eslint/naming-convention": [
78
- "error",
79
- {
80
- format: ["camelCase"],
81
- leadingUnderscore: "allow",
82
- selector: "default"
83
- },
84
- {
85
- format: [
86
- "camelCase",
87
- "UPPER_CASE",
88
- "PascalCase"
89
- ],
90
- leadingUnderscore: "allow",
91
- selector: "variable"
92
- },
93
- {
94
- selector: "typeLike",
95
- format: ["PascalCase"]
96
- },
97
- {
98
- selector: "import",
99
- format: ["camelCase", "PascalCase"]
100
- },
101
- {
102
- selector: "function",
103
- format: ["camelCase", "PascalCase"]
104
- },
105
- {
106
- format: null,
107
- modifiers: ["destructured"],
108
- selector: "variable"
109
- },
110
- {
111
- format: null,
112
- selector: "objectLiteralProperty"
113
- }
114
- ],
115
- camelcase: "off",
116
- "@typescript-eslint/no-base-to-string": "error",
117
- "@typescript-eslint/no-confusing-non-null-assertion": "error",
118
- "@typescript-eslint/no-confusing-void-expression": "error",
119
- "@typescript-eslint/no-duplicate-enum-values": "error",
120
- "@typescript-eslint/no-duplicate-type-constituents": "error",
121
- "@typescript-eslint/no-dynamic-delete": "error",
122
- "@typescript-eslint/no-extra-non-null-assertion": "error",
123
- "@typescript-eslint/no-extraneous-class": "error",
124
- // "@typescript-eslint/no-floating-promises": "error",
125
- "@typescript-eslint/no-for-in-array": "error",
126
- "@typescript-eslint/no-import-type-side-effects": "error",
127
- "@typescript-eslint/no-inferrable-types": "error",
128
- "@typescript-eslint/no-invalid-void-type": "error",
129
- "@typescript-eslint/no-meaningless-void-operator": "error",
130
- "@typescript-eslint/no-misused-new": "error",
131
- "@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
132
- "@typescript-eslint/no-mixed-enums": "error",
133
- "@typescript-eslint/no-namespace": "error",
134
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
135
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
136
- "@typescript-eslint/no-non-null-assertion": "error",
137
- "@typescript-eslint/no-redundant-type-constituents": "error",
138
- "@typescript-eslint/no-require-imports": "error",
139
- "@typescript-eslint/no-this-alias": "error",
140
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
141
- "@typescript-eslint/no-unnecessary-qualifier": "error",
142
- "@typescript-eslint/no-unnecessary-type-arguments": "error",
143
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
144
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
145
- "@typescript-eslint/no-unsafe-argument": "off",
146
- "@typescript-eslint/no-unsafe-assignment": "off",
147
- "@typescript-eslint/no-unsafe-call": "off",
148
- "@typescript-eslint/no-unsafe-declaration-merging": "off",
149
- "@typescript-eslint/no-unsafe-enum-comparison": "off",
150
- "@typescript-eslint/no-unsafe-member-access": "off",
151
- "@typescript-eslint/no-unsafe-return": "off",
152
- "@typescript-eslint/no-useless-empty-export": "error",
153
- "@typescript-eslint/non-nullable-type-assertion-style": "error",
154
- "@typescript-eslint/parameter-properties": "error",
155
- "@typescript-eslint/prefer-as-const": "error",
156
- "@typescript-eslint/prefer-enum-initializers": "error",
157
- "@typescript-eslint/prefer-for-of": "error",
158
- "@typescript-eslint/prefer-includes": "error",
159
- "@typescript-eslint/prefer-literal-enum-member": "error",
160
- "@typescript-eslint/prefer-namespace-keyword": "error",
161
- "@typescript-eslint/prefer-nullish-coalescing": "error",
162
- "@typescript-eslint/prefer-optional-chain": "error",
163
- "@typescript-eslint/prefer-readonly": "error",
164
- "@typescript-eslint/prefer-reduce-type-parameter": "error",
165
- "@typescript-eslint/prefer-regexp-exec": "error",
166
- "@typescript-eslint/prefer-return-this-type": "error",
167
- "@typescript-eslint/prefer-string-starts-ends-with": "error",
168
- "@typescript-eslint/promise-function-async": "off",
169
- "@typescript-eslint/restrict-plus-operands": "error",
170
- "@typescript-eslint/sort-type-constituents": "error",
171
- "@typescript-eslint/switch-exhaustiveness-check": "error",
172
- "@typescript-eslint/unbound-method": "error",
173
- ...extensionRules,
174
- "no-duplicate-imports": ["off"]
175
- };
176
-
177
- /** @type {import("@stylistic/eslint-plugin").RuleOptions} */
178
- const rules = {
179
- "@stylistic/type-annotation-spacing": "error",
180
- "@stylistic/type-generic-spacing": ["error"],
181
- "@stylistic/type-named-tuple-spacing": ["error"]
182
- };
183
-
184
- /** @type {import("eslint").Linter.Config} */
185
- const config = {
186
- plugins: {
187
- ...jsConfig.plugins,
188
- "@typescript-eslint": typescript.plugin
189
- },
190
- rules: {
191
- ...jsConfig.rules,
192
- ...rules$1,
193
- ...rules
194
- }
195
- };
196
-
197
- export { config as default };