Skip to content

Commit

Permalink
refine flat config types
Browse files Browse the repository at this point in the history
  • Loading branch information
Logicer16 committed Apr 1, 2024
1 parent d7d9666 commit 6f98fb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/configs/flat/base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ESLint } from "eslint";
import type { ESLint, Linter } from "eslint";
import * as jsoncParser from "jsonc-eslint-parser";
import * as yamlParser from "yaml-eslint-parser";
import * as tomlParser from "toml-eslint-parser";
Expand Down Expand Up @@ -54,4 +54,4 @@ export default [
"spaced-comment": "off",
},
},
];
] satisfies Linter.FlatConfig[] as Linter.FlatConfig[];
3 changes: 2 additions & 1 deletion src/configs/flat/recommended.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Linter } from "eslint";
import base from "./base";
export default [
...base,
Expand All @@ -7,4 +8,4 @@ export default [
"json-schema-validator/no-invalid": "warn",
},
},
];
] satisfies Linter.FlatConfig[];
3 changes: 2 additions & 1 deletion tools/update-rulesets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export = {

for (const rec of ["recommended"] as const) {
let content = `
import type { Linter } from "eslint";
import base from './base';
export default [
...base,
Expand All @@ -76,7 +77,7 @@ export default [
.join(",\n")}
},
}
]
] satisfies Linter.FlatConfig[]
`;

const filePath = path.resolve(__dirname, FLAT_RULESET_NAME[rec]);
Expand Down

0 comments on commit 6f98fb2

Please sign in to comment.