@cenk1cenk2/eslint-config 2.3.1 → 2.4.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/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ # [2.4.0](https://github.com/cenk1cenk2/eslint-config/compare/v2.3.4...v2.4.0) (2022-01-31)
2
+
3
+
4
+ ### Features
5
+
6
+ * adds the import helper ([7d8e040](https://github.com/cenk1cenk2/eslint-config/commit/7d8e040e2d60d8f2d33d09cd5058de6077d3b1da))
7
+
8
+ ## [2.3.4](https://github.com/cenk1cenk2/eslint-config/compare/v2.3.3...v2.3.4) (2022-01-31)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * update rule ([63addc7](https://github.com/cenk1cenk2/eslint-config/commit/63addc71495f563d50748aacb4f0dac229b4e902))
14
+
15
+ ## [2.3.3](https://github.com/cenk1cenk2/eslint-config/compare/v2.3.2...v2.3.3) (2022-01-31)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * update rule ([20abc5c](https://github.com/cenk1cenk2/eslint-config/commit/20abc5c2af9f051dbb944b2f7fc8d9a2dcfcee44))
21
+
22
+ ## [2.3.2](https://github.com/cenk1cenk2/eslint-config/compare/v2.3.1...v2.3.2) (2022-01-31)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * move to typed rules ([40b224a](https://github.com/cenk1cenk2/eslint-config/commit/40b224a4cfc710c3e2429be068cc618c96fc62e3))
28
+
1
29
  ## [2.3.1](https://github.com/cenk1cenk2/eslint-config/compare/v2.3.0...v2.3.1) (2022-01-31)
2
30
 
3
31
 
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @param {string[]} cases
3
+ * @returns {import("eslint").Linter.Config['rules']}
4
+ */
5
+ function generateImportPluginGroupCases (cases) {
6
+ return {
7
+ 'import/order': [
8
+ 'error',
9
+ {
10
+ pathGroups: [
11
+ {
12
+ pattern: `@{${cases.join(',')}}/**`,
13
+ group: 'index'
14
+ },
15
+
16
+ {
17
+ pattern: `@{${cases.join(',')}}`,
18
+ group: 'index'
19
+ }
20
+ ],
21
+ pathGroupsExcludedImportTypes: [ 'builtin' ],
22
+ groups: [
23
+ [ 'builtin', 'external' ],
24
+ [ 'index', 'parent', 'sibling' ]
25
+ ],
26
+ 'newlines-between': 'always',
27
+ alphabetize: {
28
+ order: 'asc',
29
+ caseInsensitive: true
30
+ }
31
+ }
32
+ ]
33
+ }
34
+ }
35
+
36
+ module.exports = generateImportPluginGroupCases
package/index.js CHANGED
@@ -65,7 +65,8 @@ module.exports = {
65
65
  arraysInArrays: true
66
66
  }
67
67
  ],
68
- complexity: [ 'error', 20 ],
68
+ curly: [ 'error', 'all' ],
69
+ complexity: [ 'error', 25 ],
69
70
  'constructor-super': 'error',
70
71
  'dot-notation': 'error',
71
72
  eqeqeq: [ 'error', 'smart' ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cenk1cenk2/eslint-config",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Eslint configuration for my taste.",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/cenk1cenk2/eslint-config",
@@ -16,6 +16,13 @@ module.exports = {
16
16
  'no-throw-literal': 'off',
17
17
  '@typescript-eslint/no-throw-literal': [ 'error' ],
18
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
+ ],
19
26
  '@typescript-eslint/consistent-type-exports': [ 'error', { fixMixedExportsWithInlineTypeSpecifier: false } ]
20
27
  }
21
28
  }
package/typescript.js CHANGED
@@ -213,7 +213,14 @@ module.exports = {
213
213
  {
214
214
  selector: 'parameter',
215
215
  format: [ 'camelCase', 'PascalCase' ],
216
- leadingUnderscore: 'allow'
216
+ modifiers: [ 'unused' ],
217
+ leadingUnderscore: 'require'
218
+ },
219
+
220
+ {
221
+ selector: 'parameter',
222
+ format: [ 'camelCase', 'PascalCase' ],
223
+ leadingUnderscore: 'forbid'
217
224
  },
218
225
 
219
226
  {
@@ -236,13 +243,6 @@ module.exports = {
236
243
  {
237
244
  selector: 'typeLike',
238
245
  format: [ 'PascalCase' ]
239
- },
240
-
241
- {
242
- selector: 'parameter',
243
- format: [ 'camelCase', 'PascalCase' ],
244
- modifiers: [ 'unused' ],
245
- leadingUnderscore: 'require'
246
246
  }
247
247
  ],
248
248
  '@typescript-eslint/no-parameter-properties': 'off',
@@ -276,13 +276,6 @@ module.exports = {
276
276
  '@typescript-eslint/consistent-indexed-object-style': [ 'error', 'record' ],
277
277
  '@typescript-eslint/consistent-type-assertions': [ 'error', { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow' } ],
278
278
  '@typescript-eslint/consistent-type-definitions': [ 'error', 'interface' ],
279
- '@typescript-eslint/consistent-type-imports': [
280
- 'error',
281
- {
282
- prefer: 'type-imports',
283
- disallowTypeAnnotations: true
284
- }
285
- ],
286
279
  '@typescript-eslint/method-signature-style': [ 'error', 'property' ],
287
280
  '@typescript-eslint/no-empty-interface': [
288
281
  'error',