@whoj/eslint-config 2.4.1 → 2.5.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/dist/index.js CHANGED
@@ -2332,43 +2332,33 @@ async function typescript(options = {}) {
2332
2332
  }
2333
2333
 
2334
2334
  // src/configs/perfectionist.ts
2335
+ var LINE_LENGTH_REGEX = /.*(?<!classes|heritage-clauses|intersection-types|interfaces|modules|objects)$/;
2335
2336
  function perfectionist() {
2336
- const { name, rules, ...config } = default5.configs["recommended-line-length"];
2337
2337
  return [
2338
2338
  {
2339
- ...config,
2340
2339
  name: "whoj/perfectionist/setup",
2340
+ plugins: {
2341
+ perfectionist: default5
2342
+ },
2341
2343
  rules: {
2342
- // @ts-ignore
2343
- ...Object.entries(rules).reduce((_rules, [rule, [severity, options]]) => {
2344
- _rules[rule] = [severity, { ...options, order: "asc" }];
2345
- return _rules;
2346
- }, {})
2347
- // 'perfectionist/sort-exports': ['error', { order: 'asc', type: 'line-length' }],
2348
- // 'perfectionist/sort-objects': ['error', { order: 'asc', type: 'line-length' }],
2349
- // 'perfectionist/sort-interfaces': ['error', { order: 'asc', type: 'line-length' }],
2350
- // 'perfectionist/sort-object-types': ['error', { order: 'asc', type: 'line-length' }],
2351
- // 'perfectionist/sort-named-exports': ['error', { order: 'asc', type: 'line-length' }],
2352
- // 'perfectionist/sort-named-imports': ['error', { order: 'asc', type: 'line-length' }],
2353
- // 'perfectionist/sort-intersection-types': ['error', { order: 'asc', type: 'alphabetical' }],
2354
- // 'perfectionist/sort-imports': ['error', {
2355
- // order: 'asc',
2356
- // type: 'line-length',
2357
- // newlinesBetween: 'ignore',
2358
- // groups: [
2359
- // ['type', 'parent-type', 'sibling-type', 'index-type', 'internal-type'],
2360
- //
2361
- // ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
2362
- //
2363
- // 'side-effect',
2364
- // 'object',
2365
- // 'unknown'
2366
- // ]
2367
- // }]
2344
+ ...getRules({ order: "asc", type: "natural" }),
2345
+ ...getRules({ order: "asc", type: "line-length" })
2368
2346
  }
2369
2347
  }
2370
2348
  ];
2371
2349
  }
2350
+ function getRules(options) {
2351
+ return Object.fromEntries(
2352
+ Object.keys({ ...default5.rules }).filter(
2353
+ (ruleName) => options.type === "natural" ? !LINE_LENGTH_REGEX.test(ruleName) && !ruleName.endsWith("sort-modules") : LINE_LENGTH_REGEX.test(ruleName)
2354
+ ).map(
2355
+ (ruleName) => [
2356
+ `${default5.name}/${ruleName}`,
2357
+ ["error", options]
2358
+ ]
2359
+ )
2360
+ );
2361
+ }
2372
2362
 
2373
2363
  // src/factory.ts
2374
2364
  var flatConfigProps = [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@whoj/eslint-config",
3
3
  "type": "module",
4
- "version": "2.4.1",
4
+ "version": "2.5.0",
5
5
  "description": "ESLint config",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/who-jonson/eslint-config",
@@ -40,16 +40,16 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@antfu/install-pkg": "^1.0.0",
43
- "@clack/prompts": "^0.9.1",
43
+ "@clack/prompts": "^0.10.0",
44
44
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
45
45
  "@eslint/markdown": "^6.2.2",
46
- "@stylistic/eslint-plugin": "^3.0.1",
47
- "@typescript-eslint/eslint-plugin": "^8.22.0",
48
- "@typescript-eslint/parser": "^8.22.0",
49
- "@vitest/eslint-plugin": "^1.1.26",
46
+ "@stylistic/eslint-plugin": "^3.1.0",
47
+ "@typescript-eslint/eslint-plugin": "^8.24.0",
48
+ "@typescript-eslint/parser": "^8.24.0",
49
+ "@vitest/eslint-plugin": "^1.1.31",
50
50
  "eslint-config-flat-gitignore": "^2.0.0",
51
51
  "eslint-flat-config-utils": "^2.0.1",
52
- "eslint-merge-processors": "^1.0.0",
52
+ "eslint-merge-processors": "^2.0.0",
53
53
  "eslint-plugin-antfu": "^3.0.0",
54
54
  "eslint-plugin-command": "^3.0.0",
55
55
  "eslint-plugin-import-x": "^4.6.1",
@@ -57,16 +57,16 @@
57
57
  "eslint-plugin-jsonc": "^2.19.1",
58
58
  "eslint-plugin-n": "^17.15.1",
59
59
  "eslint-plugin-no-only-tests": "^3.3.0",
60
- "eslint-plugin-perfectionist": "^4.7.0",
60
+ "eslint-plugin-perfectionist": "^4.9.0",
61
61
  "eslint-plugin-regexp": "^2.7.0",
62
62
  "eslint-plugin-toml": "^0.12.0",
63
63
  "eslint-plugin-unicorn": "^56.0.1",
64
64
  "eslint-plugin-unused-imports": "^4.1.4",
65
65
  "eslint-plugin-vue": "^9.32.0",
66
66
  "eslint-plugin-yml": "^1.16.0",
67
- "eslint-processor-vue-blocks": "^1.0.0",
67
+ "eslint-processor-vue-blocks": "^2.0.0",
68
68
  "fast-xml-parser": "^4.5.1",
69
- "globals": "^15.14.0",
69
+ "globals": "^15.15.0",
70
70
  "jsonc-eslint-parser": "^2.4.0",
71
71
  "local-pkg": "^1.0.0",
72
72
  "parse-gitignore": "^2.0.0",
@@ -81,19 +81,19 @@
81
81
  "@eslint-react/eslint-plugin": "^1.26.2",
82
82
  "@eslint/config-inspector": "^1.0.0",
83
83
  "@prettier/plugin-xml": "^3.4.1",
84
- "@stylistic/eslint-plugin-migrate": "^3.0.1",
84
+ "@stylistic/eslint-plugin-migrate": "^3.1.0",
85
85
  "@types/fs-extra": "^11.0.4",
86
- "@types/node": "^22.13.1",
86
+ "@types/node": "^22.13.2",
87
87
  "@types/prompts": "^2.4.9",
88
88
  "@types/yargs": "^17.0.33",
89
89
  "@unocss/eslint-plugin": "^65.4.3",
90
90
  "astro-eslint-parser": "^1.2.1",
91
- "bumpp": "^10.0.2",
92
- "eslint": "^9.19.0",
91
+ "bumpp": "^10.0.3",
92
+ "eslint": "^9.20.1",
93
93
  "eslint-plugin-astro": "^1.3.1",
94
94
  "eslint-plugin-format": "^1.0.1",
95
95
  "eslint-plugin-react-hooks": "^5.1.0",
96
- "eslint-plugin-react-refresh": "^0.4.18",
96
+ "eslint-plugin-react-refresh": "^0.4.19",
97
97
  "eslint-plugin-solid": "^0.14.5",
98
98
  "eslint-plugin-svelte": "^2.46.1",
99
99
  "eslint-typegen": "^1.0.0",
@@ -106,14 +106,14 @@
106
106
  "prettier-plugin-slidev": "^1.0.5",
107
107
  "rimraf": "^6.0.1",
108
108
  "simple-git-hooks": "^2.11.1",
109
- "svelte": "^5.19.9",
109
+ "svelte": "^5.20.0",
110
110
  "svelte-eslint-parser": "^0.43.0",
111
111
  "tsup": "^8.3.6",
112
112
  "tsx": "^4.19.2",
113
113
  "typescript": "^5.7.3",
114
114
  "vitest": "^3.0.4",
115
115
  "vue": "^3.5.13",
116
- "@whoj/eslint-config": "2.4.1"
116
+ "@whoj/eslint-config": "2.5.0"
117
117
  },
118
118
  "resolutions": {
119
119
  "@eslint-community/eslint-utils": "^4.4.1",