@cenk1cenk2/eslint-config 2.2.4 → 2.3.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## [2.3.3](https://github.com/cenk1cenk2/eslint-config/compare/v2.3.2...v2.3.3) (2022-01-31)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update rule ([20abc5c](https://github.com/cenk1cenk2/eslint-config/commit/20abc5c2af9f051dbb944b2f7fc8d9a2dcfcee44))
7
+
8
+ ## [2.3.2](https://github.com/cenk1cenk2/eslint-config/compare/v2.3.1...v2.3.2) (2022-01-31)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * move to typed rules ([40b224a](https://github.com/cenk1cenk2/eslint-config/commit/40b224a4cfc710c3e2429be068cc618c96fc62e3))
14
+
15
+ ## [2.3.1](https://github.com/cenk1cenk2/eslint-config/compare/v2.3.0...v2.3.1) (2022-01-31)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * update parser options ([9a93803](https://github.com/cenk1cenk2/eslint-config/commit/9a9380359b634cec4882c749cff16410afb91785))
21
+
22
+ # [2.3.0](https://github.com/cenk1cenk2/eslint-config/compare/v2.2.4...v2.3.0) (2022-01-31)
23
+
24
+
25
+ ### Features
26
+
27
+ * relax some rules ([c6243e7](https://github.com/cenk1cenk2/eslint-config/commit/c6243e72fd409b7c0d81c5111e166deb2e030c17))
28
+
1
29
  ## [2.2.4](https://github.com/cenk1cenk2/eslint-config/compare/v2.2.3...v2.2.4) (2022-01-30)
2
30
 
3
31
 
@@ -0,0 +1,7 @@
1
+ /** @type {import("eslint").Linter.Config} */
2
+ module.exports = {
3
+ rules: {
4
+ 'import/no-extraneous-dependencies': 'error',
5
+ 'import/exports-last': 'error'
6
+ }
7
+ }
package/import.js CHANGED
@@ -36,7 +36,6 @@ module.exports = {
36
36
  }
37
37
  ],
38
38
  'import/export': 'error',
39
- 'import/exports-last': 'error',
40
39
  'import/no-extraneous-dependencies': 'error',
41
40
  'import/no-self-import': 'error',
42
41
  'import/no-useless-path-segments': 'error'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cenk1cenk2/eslint-config",
3
- "version": "2.2.4",
3
+ "version": "2.3.3",
4
4
  "description": "Eslint configuration for my taste.",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/cenk1cenk2/eslint-config",
@@ -5,8 +5,6 @@ module.exports = {
5
5
  {
6
6
  files: [ '*.ts', '*.tsx' ],
7
7
  parserOptions: {
8
- ecmaVersion: 'latest',
9
- sourceType: 'module',
10
8
  project: 'tsconfig.json'
11
9
  },
12
10
  rules: {
@@ -18,6 +16,13 @@ module.exports = {
18
16
  'no-throw-literal': 'off',
19
17
  '@typescript-eslint/no-throw-literal': [ 'error' ],
20
18
  '@typescript-eslint/prefer-reduce-type-parameter': 'error',
19
+ '@typescript-eslint/consistent-type-imports': [
20
+ 'error',
21
+ {
22
+ prefer: 'type-imports',
23
+ disallowTypeAnnotations: true
24
+ }
25
+ ],
21
26
  '@typescript-eslint/consistent-type-exports': [ 'error', { fixMixedExportsWithInlineTypeSpecifier: false } ]
22
27
  }
23
28
  }
package/typescript.js CHANGED
@@ -6,10 +6,7 @@ module.exports = {
6
6
  files: [ '*.ts', '*.tsx' ],
7
7
  plugins: [ '@typescript-eslint' ],
8
8
  extends: [ 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended' ],
9
- parserOptions: {
10
- ecmaVersion: 'esnext',
11
- sourceType: 'module'
12
- },
9
+ parserOptions: {},
13
10
  rules: {
14
11
  // this is a bit buggy at the moment
15
12
  '@typescript-eslint/explicit-module-boundary-types': 'off',
@@ -160,28 +157,28 @@ module.exports = {
160
157
  // 'set',
161
158
 
162
159
  // Methods
163
- 'public-static-method',
164
- 'protected-static-method',
165
- 'private-static-method',
160
+ // 'public-static-method',
161
+ // 'protected-static-method',
162
+ // 'private-static-method',
163
+ //
164
+ // 'public-instance-method',
165
+ // 'protected-instance-method',
166
+ // 'private-instance-method',
167
+ 'static-method',
166
168
 
167
- 'public-instance-method',
168
- 'protected-instance-method',
169
- 'private-instance-method',
169
+ 'public-method',
170
+ // 'public-decorated-method',
171
+ 'protected-method',
172
+ // 'protected-decorated-method',
173
+ 'private-method',
174
+ // 'private-decorated-method',
170
175
 
171
176
  'public-abstract-method',
172
177
  'protected-abstract-method',
173
178
  'private-abstract-method',
174
179
 
175
- 'public-method',
176
- 'public-decorated-method',
177
- 'protected-method',
178
- 'protected-decorated-method',
179
- 'private-method',
180
- 'private-decorated-method',
181
-
182
- 'static-method',
183
- 'instance-method',
184
- 'decorated-method',
180
+ // 'instance-method',
181
+ // 'decorated-method',
185
182
  'abstract-method',
186
183
 
187
184
  'method'
@@ -216,12 +213,19 @@ module.exports = {
216
213
  {
217
214
  selector: 'parameter',
218
215
  format: [ 'camelCase', 'PascalCase' ],
219
- leadingUnderscore: 'allow'
216
+ modifiers: [ 'unused' ],
217
+ leadingUnderscore: 'require'
218
+ },
219
+
220
+ {
221
+ selector: 'parameter',
222
+ format: [ 'camelCase', 'PascalCase' ],
223
+ leadingUnderscore: 'forbid'
220
224
  },
221
225
 
222
226
  {
223
227
  selector: 'property',
224
- format: [ 'camelCase', 'UPPER_CASE' ]
228
+ format: [ 'camelCase', 'UPPER_CASE', 'snake_case' ]
225
229
  },
226
230
 
227
231
  {
@@ -233,19 +237,12 @@ module.exports = {
233
237
 
234
238
  {
235
239
  selector: 'enumMember',
236
- format: [ 'UPPER_CASE' ]
240
+ format: [ 'UPPER_CASE', 'camelCase' ]
237
241
  },
238
242
 
239
243
  {
240
244
  selector: 'typeLike',
241
245
  format: [ 'PascalCase' ]
242
- },
243
-
244
- {
245
- selector: 'parameter',
246
- format: [ 'camelCase', 'PascalCase' ],
247
- modifiers: [ 'unused' ],
248
- leadingUnderscore: 'require'
249
246
  }
250
247
  ],
251
248
  '@typescript-eslint/no-parameter-properties': 'off',
@@ -279,13 +276,6 @@ module.exports = {
279
276
  '@typescript-eslint/consistent-indexed-object-style': [ 'error', 'record' ],
280
277
  '@typescript-eslint/consistent-type-assertions': [ 'error', { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow' } ],
281
278
  '@typescript-eslint/consistent-type-definitions': [ 'error', 'interface' ],
282
- '@typescript-eslint/consistent-type-imports': [
283
- 'error',
284
- {
285
- prefer: 'type-imports',
286
- disallowTypeAnnotations: true
287
- }
288
- ],
289
279
  '@typescript-eslint/method-signature-style': [ 'error', 'property' ],
290
280
  '@typescript-eslint/no-empty-interface': [
291
281
  'error',
@@ -299,8 +289,8 @@ module.exports = {
299
289
  {
300
290
  allowConstructorOnly: true,
301
291
  allowEmpty: false,
302
- allowStaticOnly: false,
303
- allowWithDecorator: false
292
+ allowStaticOnly: true,
293
+ allowWithDecorator: true
304
294
  }
305
295
  ],
306
296
  '@typescript-eslint/no-inferrable-types': 'error',