@kitschpatrol/eslint-config 5.0.0 → 5.0.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.
- package/bin/cli.js +59 -16
- package/dist/index.d.ts +20186 -12068
- package/dist/index.js +23 -2
- package/init/package.json +7 -0
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -2346,7 +2346,7 @@ var sharedScriptConfig = {
|
|
|
2346
2346
|
ignoreConsecutiveComments: true,
|
|
2347
2347
|
ignoreInlineComments: true,
|
|
2348
2348
|
// Forgive some additional common patterns arising from temporarily commenting out lines of code
|
|
2349
|
-
ignorePattern: String.raw`await|const|let|var|import|export|pragma|ignore|prettier-ignore|webpack\w+:|c8|type-coverage:`
|
|
2349
|
+
ignorePattern: String.raw`if|else|await|const|let|var|import|export|pragma|ignore|prettier-ignore|webpack\w+:|c8|type-coverage:`
|
|
2350
2350
|
}
|
|
2351
2351
|
],
|
|
2352
2352
|
"eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
|
|
@@ -3092,6 +3092,7 @@ async function js(options = {}) {
|
|
|
3092
3092
|
import { default as pluginJson } from "eslint-plugin-jsonc";
|
|
3093
3093
|
import pluginJsonPackage from "eslint-plugin-package-json";
|
|
3094
3094
|
import { default as parserJson } from "jsonc-eslint-parser";
|
|
3095
|
+
import { sortOrder as sortPackageJsonSortOrder } from "sort-package-json";
|
|
3095
3096
|
async function json(options = {}) {
|
|
3096
3097
|
const { overrides = {} } = options;
|
|
3097
3098
|
return [
|
|
@@ -3158,7 +3159,23 @@ async function json(options = {}) {
|
|
|
3158
3159
|
rules: {
|
|
3159
3160
|
...jsonPackageRecommendedRules,
|
|
3160
3161
|
"json-package/no-redundant-files": "error",
|
|
3161
|
-
"json-package/order-properties":
|
|
3162
|
+
"json-package/order-properties": [
|
|
3163
|
+
"error",
|
|
3164
|
+
{
|
|
3165
|
+
// Put shared-config keys at the end...
|
|
3166
|
+
// otherwise sortPackageJsonSortOrder scatters them in the
|
|
3167
|
+
// middle of package.json.
|
|
3168
|
+
// This must stay in sync with packages/prettier-config/src/index.ts
|
|
3169
|
+
order: customizeSortOrder(sortPackageJsonSortOrder, [
|
|
3170
|
+
"cspell",
|
|
3171
|
+
"knip",
|
|
3172
|
+
"mdat",
|
|
3173
|
+
"prettier",
|
|
3174
|
+
"remarkConfig",
|
|
3175
|
+
"stylelint"
|
|
3176
|
+
])
|
|
3177
|
+
}
|
|
3178
|
+
]
|
|
3162
3179
|
}
|
|
3163
3180
|
},
|
|
3164
3181
|
// Sort tsconfig
|
|
@@ -3293,6 +3310,10 @@ async function json(options = {}) {
|
|
|
3293
3310
|
}
|
|
3294
3311
|
];
|
|
3295
3312
|
}
|
|
3313
|
+
function customizeSortOrder(keys, newKeys) {
|
|
3314
|
+
const filteredKeys = keys.filter((key) => !newKeys.includes(key));
|
|
3315
|
+
return [...filteredKeys, ...newKeys];
|
|
3316
|
+
}
|
|
3296
3317
|
|
|
3297
3318
|
// src/configs/shared-jsx-tsx.ts
|
|
3298
3319
|
import { default as pluginJsxA11y } from "eslint-plugin-jsx-a11y";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/eslint-config",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "ESLint configuration for @kitschpatrol/shared-config.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shared-config",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"eslint-plugin-mdx": "^3.1.5",
|
|
65
65
|
"eslint-plugin-n": "^17.15.1",
|
|
66
66
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
67
|
-
"eslint-plugin-package-json": "^0.23.
|
|
67
|
+
"eslint-plugin-package-json": "^0.23.1",
|
|
68
68
|
"eslint-plugin-perfectionist": "^4.8.0",
|
|
69
69
|
"eslint-plugin-regexp": "^2.7.0",
|
|
70
70
|
"eslint-plugin-svelte": "^2.46.1",
|
|
@@ -72,10 +72,13 @@
|
|
|
72
72
|
"eslint-plugin-unicorn": "^56.0.1",
|
|
73
73
|
"eslint-plugin-yml": "^1.16.0",
|
|
74
74
|
"execa": "^9.5.2",
|
|
75
|
+
"find-workspaces": "^0.3.1",
|
|
75
76
|
"fs-extra": "^11.3.0",
|
|
76
77
|
"globals": "^15.14.0",
|
|
77
78
|
"jsonc-eslint-parser": "^2.4.0",
|
|
78
79
|
"local-pkg": "^1.0.0",
|
|
80
|
+
"prettier": "^3.4.2",
|
|
81
|
+
"sort-package-json": "^2.14.0",
|
|
79
82
|
"svelte-eslint-parser": "^0.43.0",
|
|
80
83
|
"toml-eslint-parser": "^0.10.0",
|
|
81
84
|
"yaml-eslint-parser": "^1.2.3"
|
|
@@ -87,7 +90,6 @@
|
|
|
87
90
|
"eslint-config-prettier": "^10.0.1",
|
|
88
91
|
"eslint-config-xo-typescript": "^7.0.0",
|
|
89
92
|
"eslint-typegen": "^1.0.0",
|
|
90
|
-
"prettier": "^3.4.2",
|
|
91
93
|
"svelte": "^5.19.9",
|
|
92
94
|
"tsup": "^8.3.6"
|
|
93
95
|
},
|
|
@@ -99,10 +101,9 @@
|
|
|
99
101
|
"access": "public"
|
|
100
102
|
},
|
|
101
103
|
"scripts": {
|
|
102
|
-
"build": "
|
|
104
|
+
"build": "tsup --format esm --clean --dts && ../../scripts/build.ts",
|
|
103
105
|
"cli": "node ./bin/cli.js",
|
|
104
106
|
"inspect": "npx @eslint/config-inspector --config ./init/eslint.config.ts",
|
|
105
|
-
"
|
|
106
|
-
"typegen": "tsx scripts/typegen.ts"
|
|
107
|
+
"update-rules": "tsx scripts/presetgen.ts && tsx scripts/typegen.ts && kpi-eslint fix && kpi-prettier fix"
|
|
107
108
|
}
|
|
108
109
|
}
|