-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
35 lines (34 loc) · 1017 Bytes
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";
import eslintPluginAstro from "eslint-plugin-astro";
import * as mdx from "eslint-plugin-mdx";
import markdown from "eslint-plugin-markdown";
export default [
eslint.configs.recommended,
eslintConfigPrettier,
...tseslint.configs.recommendedTypeChecked,
...eslintPluginAstro.configs.recommended,
{ ignores: ["node_modules/*", ".astro/*", "e2e/*", "dist/*"] },
{
files: ["**/*.{ts,tsx,js,jsx,mjs,cjs,astro}"],
languageOptions: {
parserOptions: {
parser: "@typescript-eslint/parser",
project: "./tsconfig.json",
tsconfigDirName: import.meta.dirname,
extraFileExtensions: [".astro"],
},
},
},
{
files: ["**/*.{js,astro,mdx}"],
...tseslint.configs.disableTypeChecked,
},
{
files: ["**/*.mdx"],
...mdx.flat,
},
// @ts-expect-error, types not yet updated
...markdown.configs.recommended,
];