@kazupon/eslint-config 0.43.0 → 0.44.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.d.mts +8 -0
- package/dist/index.mjs +14 -1
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -16906,6 +16906,14 @@ interface TypeScriptOptions {
|
|
|
16906
16906
|
* typescript-eslint parser options
|
|
16907
16907
|
*/
|
|
16908
16908
|
parserOptions?: TypeScriptParserOptions;
|
|
16909
|
+
/**
|
|
16910
|
+
* typescript-eslint base preset only
|
|
16911
|
+
*
|
|
16912
|
+
* if you want to use with oxlint, set `true`
|
|
16913
|
+
*
|
|
16914
|
+
* @default false
|
|
16915
|
+
*/
|
|
16916
|
+
baseOnly?: boolean;
|
|
16909
16917
|
}
|
|
16910
16918
|
/**
|
|
16911
16919
|
* TypeScript parser options
|
package/dist/index.mjs
CHANGED
|
@@ -1016,7 +1016,7 @@ async function toml(options = {}) {
|
|
|
1016
1016
|
* @returns {Promise<Linter.FlatConfig[]>} eslint flat configurations with `typescript-eslint` and overrides
|
|
1017
1017
|
*/
|
|
1018
1018
|
async function typescript(options = {}) {
|
|
1019
|
-
const { rules: overrideRules = {}, extraFileExtensions = [], parserOptions = { project: true } } = options;
|
|
1019
|
+
const { rules: overrideRules = {}, extraFileExtensions = [], parserOptions = { project: true }, baseOnly = false } = options;
|
|
1020
1020
|
const ts = await loadPlugin("typescript-eslint");
|
|
1021
1021
|
const baseFiles = [
|
|
1022
1022
|
GLOB_TS,
|
|
@@ -1024,6 +1024,19 @@ async function typescript(options = {}) {
|
|
|
1024
1024
|
...extraFileExtensions.map((ext) => `**/*.${ext}`)
|
|
1025
1025
|
];
|
|
1026
1026
|
const files = [...options.files ?? [], ...baseFiles];
|
|
1027
|
+
if (baseOnly) return [ts.configs.base, {
|
|
1028
|
+
name: "@kazupon/typescipt/typescript-eslint",
|
|
1029
|
+
files,
|
|
1030
|
+
languageOptions: {
|
|
1031
|
+
parser: ts.parser,
|
|
1032
|
+
parserOptions: {
|
|
1033
|
+
extraFileExtensions: extraFileExtensions.map((ext) => `.${ext}`),
|
|
1034
|
+
sourceType: "module",
|
|
1035
|
+
tsconfigRootDir: process.cwd(),
|
|
1036
|
+
...parserOptions
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
}];
|
|
1027
1040
|
return [
|
|
1028
1041
|
...ts.configs.recommendedTypeChecked.map((config) => {
|
|
1029
1042
|
const mapped = { ...config };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kazupon/eslint-config",
|
|
3
3
|
"description": "ESLint config for @kazupon",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.44.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "kawakazu80@gmail.com",
|
|
7
7
|
"name": "kazuya kawaguchi"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
53
53
|
"@eslint/js": "^9.39.2",
|
|
54
|
-
"@kazupon/eslint-plugin": "^0.7.
|
|
54
|
+
"@kazupon/eslint-plugin": "^0.7.1",
|
|
55
55
|
"@kazupon/jts-utils": "^0.7.1",
|
|
56
56
|
"@stylistic/eslint-plugin": "^4.4.1",
|
|
57
57
|
"eslint-flat-config-utils": "^2.1.4",
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"eslint-plugin-jsonc": "^2.21.0",
|
|
208
208
|
"eslint-plugin-markdown-preferences": "^0.40.2",
|
|
209
209
|
"eslint-plugin-module-interop": "^0.3.1",
|
|
210
|
-
"eslint-plugin-oxlint": "^1.
|
|
210
|
+
"eslint-plugin-oxlint": "^1.36.0",
|
|
211
211
|
"eslint-plugin-promise": "^7.2.1",
|
|
212
212
|
"eslint-plugin-react": "^7.37.5",
|
|
213
213
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
@@ -225,14 +225,14 @@
|
|
|
225
225
|
"eslint-typegen": "^2.3.0",
|
|
226
226
|
"gh-changelogen": "^0.2.8",
|
|
227
227
|
"jiti": "^2.6.1",
|
|
228
|
-
"knip": "^5.
|
|
228
|
+
"knip": "^5.78.0",
|
|
229
229
|
"lint-staged": "^16.2.7",
|
|
230
230
|
"prettier": "^3.7.4",
|
|
231
231
|
"svelte": "^5.46.1",
|
|
232
232
|
"tailwind-csstree": "^0.1.4",
|
|
233
|
-
"tsdown": "^0.18.
|
|
233
|
+
"tsdown": "^0.18.4",
|
|
234
234
|
"typescript": "^5.9.3",
|
|
235
|
-
"typescript-eslint": "^8.
|
|
235
|
+
"typescript-eslint": "^8.51.0",
|
|
236
236
|
"vitest": "^3.2.4"
|
|
237
237
|
},
|
|
238
238
|
"prettier": "@kazupon/prettier-config",
|