@h1fra/eslint-config 1.0.6 → 1.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h1fra/eslint-config",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
5
  "private": false,
6
6
  "repository": {
@@ -36,6 +36,7 @@
36
36
  "eslint-config-prettier": "^9.1.0",
37
37
  "eslint-import-resolver-typescript": "^3.6.3",
38
38
  "eslint-plugin-import-x": "^4.3.0",
39
+ "eslint-plugin-perfectionist": "3.9.1",
39
40
  "eslint-plugin-prettier": "5.2.1",
40
41
  "eslint-plugin-unicorn": "^55.0.0",
41
42
  "globals": "^15.9.0",
@@ -44,5 +45,6 @@
44
45
  },
45
46
  "peerDependencies": {
46
47
  "typescript": ">=5.0.0"
47
- }
48
+ },
49
+ "devDependencies": {}
48
50
  }
@@ -1,3 +1,4 @@
1
+ import perfectionist from 'eslint-plugin-perfectionist';
1
2
  import eslintPluginUnicorn from 'eslint-plugin-unicorn';
2
3
  import * as tseslint from 'typescript-eslint';
3
4
 
@@ -7,7 +8,9 @@ export default [
7
8
  eslintPluginUnicorn.configs['flat/recommended'],
8
9
  {
9
10
  files: ['**/*.{ts,mts,cts,tsx,mtsx}'],
10
-
11
+ plugins: {
12
+ perfectionist,
13
+ },
11
14
  rules: {
12
15
  // --- Typescript
13
16
  // Recommended
@@ -62,6 +65,13 @@ export default [
62
65
  'unicorn/no-for-loop': 'off', // handled by ts
63
66
  'unicorn/no-null': 'off', // can produce partial json
64
67
  'unicorn/prefer-ternary': 'off', // produce subpar code
68
+
69
+ // Perfectionist
70
+ 'perfectionist/sort-enums': ['error', { type: 'alphabetical', order: 'asc' }],
71
+ 'perfectionist/sort-exports': ['error', { type: 'alphabetical', order: 'asc' }],
72
+ 'perfectionist/sort-intersection-types': ['error', { type: 'alphabetical', order: 'asc' }],
73
+ 'perfectionist/sort-named-exports': ['error', { type: 'alphabetical', order: 'asc' }],
74
+ 'perfectionist/sort-union-types': ['error', { type: 'alphabetical', order: 'asc' }],
65
75
  },
66
76
  },
67
77
  ];