Skip to content

Commit c08ede8

Browse files
committed
fix: fix the types for astro-eslint-parser
1 parent 32389f9 commit c08ede8

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

src/index-react.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Linter } from "eslint"
22
import base from "./index.cjs"
33
import { tsConfig } from "./typescript.cjs"
44

5-
const nonStrictConfig: Linter.FlatConfig = {
5+
const nonStrictConfig: Linter.Config = {
66
...base,
77
plugins: ["react", ...(base.plugins ?? [])],
88
extends: ["plugin:react/recommended", ...(base.extends ?? [])],

src/index-solid.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Linter } from "eslint"
22
import base from "./index.cjs"
33
import { tsConfig } from "./typescript.cjs"
44

5-
const nonStrictConfig: Linter.FlatConfig[] = [
5+
const nonStrictConfig: Linter.Config[] = [
66
...base,
77
// JavaScript:
88
{

src/index.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function maybeAddCoffeeScript() {
2828
return []
2929
}
3030

31-
const config: Linter.FlatConfig[] = [
31+
const config: Linter.Config[] = [
3232
...jsConfig,
3333
pluginOptmizeRegex.configs.all,
3434
...tsConfig,

src/javascript.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as onlyWarnPlugin from "eslint-plugin-only-warn"
99

1010
import js from "@eslint/js"
1111

12-
export const jsConfig: Linter.FlatConfig[] = [
12+
export const jsConfig: Linter.Config[] = [
1313
{
1414
...js.configs.recommended,
1515
files: ["*.js", "*.mjs", "*.cjs", "*.jsx", "*.flow"],

src/types.d.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ declare module "eslint-plugin-json" {
5555

5656
declare module "@babel/eslint-parser" {
5757
import type { Linter } from "eslint"
58-
const parser: Linter.FlatConfigParserModule
58+
const parser: Linter.Parser
5959
export = parser
6060
}
6161

6262
declare module "eslint-plugin-coffee/parser" {
6363
import type { Linter } from "eslint"
64-
const parser: Linter.FlatConfigParserModule
64+
const parser: Linter.Parser
6565
export = parser
6666
}
6767

@@ -82,6 +82,12 @@ declare module "@babel/plugin-syntax-jsx" {
8282
declare module "typescript-eslint" {
8383
import type { Linter } from "eslint"
8484
export const configs: {
85-
recommended: Linter.FlatConfig[]
85+
recommended: Linter.Config[]
8686
}
8787
}
88+
89+
declare module "astro-eslint-parser" {
90+
import type { Linter } from "eslint"
91+
const parser: Linter.Parser
92+
export = parser
93+
}

0 commit comments

Comments
 (0)