Skip to content

Commit 7a3f48f

Browse files
committedNov 23, 2024··
refactor: types
1 parent 4dd8f0d commit 7a3f48f

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed
 

‎src/base.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ const tseslintRules = {
136136
],
137137
} satisfies TSESLint.FlatConfig.Rules;
138138

139-
const config: TSESLint.FlatConfig.Config[] = [
139+
const config: Linter.Config[] = [
140140
{
141-
...tseslint.configs.base,
141+
...(tseslint.configs.base as Linter.Config),
142142
name: "kripod/base/setup",
143143
},
144144
{
@@ -149,7 +149,7 @@ const config: TSESLint.FlatConfig.Config[] = [
149149
},
150150
},
151151
{
152-
...tseslint.configs.eslintRecommended,
152+
...(tseslint.configs.eslintRecommended as Linter.Config),
153153
name: "kripod/base/disables",
154154
files: ["**/*.ts", "**/*.mts", "**/*.cts", "**/*.tsx"],
155155
rules: Object.fromEntries(
@@ -174,4 +174,4 @@ const config: TSESLint.FlatConfig.Config[] = [
174174
},
175175
];
176176

177-
export default config as Linter.Config[];
177+
export default config;

‎src/type-checked.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import type { TSESLint } from "@typescript-eslint/utils";
21
import type { Linter } from "eslint";
32
import tseslint from "typescript-eslint";
43

54
import { coreRules } from "./common.js";
65

7-
const config: TSESLint.FlatConfig.Config[] = [
6+
const config: Linter.Config[] = [
87
{
9-
...tseslint.configs.base,
8+
...(tseslint.configs.base as Linter.Config),
109
name: "kripod/type-checked/setup",
1110
languageOptions: {
1211
parserOptions: {
@@ -144,4 +143,4 @@ const config: TSESLint.FlatConfig.Config[] = [
144143
},
145144
];
146145

147-
export default config as Linter.Config[];
146+
export default config;

0 commit comments

Comments
 (0)
Please sign in to comment.