@joshuaavalon/eslint-config-typescript 6.1.5 → 6.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.
Files changed (2) hide show
  1. package/index.js +73 -62
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -3,68 +3,11 @@ module.exports = {
3
3
  extends: [
4
4
  "eslint:recommended",
5
5
  "plugin:@typescript-eslint/recommended",
6
+ "plugin:@typescript-eslint/strict",
6
7
  "plugin:prettier/recommended"
7
8
  ],
9
+ plugins: ["@typescript-eslint"],
8
10
  rules: {
9
- "@typescript-eslint/array-type": "error",
10
- "@typescript-eslint/explicit-function-return-type": [
11
- "error",
12
- {
13
- allowExpressions: true,
14
- allowHigherOrderFunctions: true,
15
- allowTypedFunctionExpressions: true
16
- }
17
- ],
18
- "@typescript-eslint/naming-convention": [
19
- "error",
20
- {
21
- format: ["camelCase"],
22
- leadingUnderscore: "allow",
23
- selector: "default"
24
- },
25
- {
26
- format: ["camelCase", "UPPER_CASE", "PascalCase"],
27
- leadingUnderscore: "allow",
28
- selector: "variable"
29
- },
30
- {
31
- format: ["PascalCase"],
32
- selector: "typeLike"
33
- },
34
- {
35
- format: null,
36
- modifiers: ["destructured"],
37
- selector: "variable"
38
- },
39
- {
40
- format: null,
41
- selector: "objectLiteralProperty"
42
- }
43
- ],
44
- "@typescript-eslint/no-empty-interface": "off",
45
- "@typescript-eslint/no-explicit-any": "off",
46
- "@typescript-eslint/no-unused-expressions": ["error"],
47
- "@typescript-eslint/no-unused-vars": [
48
- "error",
49
- {
50
- args: "after-used",
51
- argsIgnorePattern: "^_",
52
- ignoreRestSiblings: true
53
- }
54
- ],
55
- "@typescript-eslint/no-use-before-define": [
56
- "error",
57
- {
58
- typedefs: false
59
- }
60
- ],
61
- "@typescript-eslint/quotes": [
62
- "error",
63
- "double",
64
- {
65
- avoidEscape: true
66
- }
67
- ],
68
11
  "array-callback-return": "error",
69
12
  "arrow-body-style": ["error", "as-needed"],
70
13
  "arrow-parens": ["error", "as-needed"],
@@ -117,7 +60,7 @@ module.exports = {
117
60
  "no-param-reassign": "error",
118
61
  "no-promise-executor-return": "error",
119
62
  "no-proto": "error",
120
- "no-redeclare": "error",
63
+ "no-redeclare": "off",
121
64
  "no-return-assign": "error",
122
65
  "no-script-url": "error",
123
66
  "no-self-assign": "error",
@@ -168,9 +111,77 @@ module.exports = {
168
111
  }
169
112
  },
170
113
  {
171
- files: ["*.ts"],
114
+ files: ["*.ts", "*.mts", "*.cts", "*.tsx"],
172
115
  rules: {
173
- "no-dupe-class-members": "off"
116
+ "no-dupe-class-members": "off",
117
+ "@typescript-eslint/explicit-member-accessibility": "error",
118
+ "@typescript-eslint/array-type": "error",
119
+ "@typescript-eslint/explicit-function-return-type": [
120
+ "error",
121
+ {
122
+ allowExpressions: true,
123
+ allowHigherOrderFunctions: true,
124
+ allowTypedFunctionExpressions: true,
125
+ allowDirectConstAssertionInArrowFunctions: true
126
+ }
127
+ ],
128
+ "@typescript-eslint/naming-convention": [
129
+ "error",
130
+ {
131
+ format: ["camelCase"],
132
+ leadingUnderscore: "allow",
133
+ selector: "default"
134
+ },
135
+ {
136
+ format: ["camelCase", "UPPER_CASE", "PascalCase"],
137
+ leadingUnderscore: "allow",
138
+ selector: "variable"
139
+ },
140
+ {
141
+ format: ["PascalCase"],
142
+ selector: "typeLike"
143
+ },
144
+ {
145
+ format: null,
146
+ modifiers: ["destructured"],
147
+ selector: "variable"
148
+ },
149
+ {
150
+ format: null,
151
+ selector: "objectLiteralProperty"
152
+ }
153
+ ],
154
+ "@typescript-eslint/no-empty-interface": "off",
155
+ "@typescript-eslint/no-explicit-any": "off",
156
+ "@typescript-eslint/no-unused-expressions": ["error"],
157
+ "@typescript-eslint/no-unused-vars": [
158
+ "error",
159
+ {
160
+ args: "after-used",
161
+ argsIgnorePattern: "^_",
162
+ ignoreRestSiblings: true
163
+ }
164
+ ],
165
+ "@typescript-eslint/no-use-before-define": [
166
+ "error",
167
+ {
168
+ typedefs: false
169
+ }
170
+ ],
171
+ "@typescript-eslint/quotes": [
172
+ "error",
173
+ "double",
174
+ {
175
+ avoidEscape: true
176
+ }
177
+ ],
178
+ "@typescript-eslint/no-redeclare": [
179
+ "error",
180
+ { ignoreDeclarationMerge: true }
181
+ ],
182
+ "@typescript-eslint/consistent-type-imports": "error",
183
+ "@typescript-eslint/method-signature-style": "error",
184
+ "@typescript-eslint/no-useless-empty-export": "error"
174
185
  }
175
186
  }
176
187
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joshuaavalon/eslint-config-typescript",
3
- "version": "6.1.5",
3
+ "version": "6.2.2",
4
4
  "description": "Shareable ESLint Typescript config.",
5
5
  "publishConfig": {
6
6
  "access": "public"