-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy patheslint.config.ts
More file actions
33 lines (31 loc) · 1.42 KB
/
eslint.config.ts
File metadata and controls
33 lines (31 loc) · 1.42 KB
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
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import markdown from "@eslint/markdown";
import css from "@eslint/css";
import reactHooks from "eslint-plugin-react-hooks";
import { defineConfig } from "eslint/config";
import eslint from "@eslint/js";
export default defineConfig([
{ ignores: ["**/node_modules/**", "**/dist/**", ".output/**", ".wxt/**", ".github/agents/**", ".github/prompts/**", ".specify/**", "specs/**"] },
{
files: ["**/*.{ts,tsx,mts,cts}"],
extends: [tseslint.configs.recommendedTypeChecked, tseslint.configs.stylisticTypeChecked, pluginReact.configs.flat["jsx-runtime"], eslint.configs.recommended, 'react-hooks/recommended'],
languageOptions: {
parserOptions: { projectService: true, tsconfigRootDir: import.meta.dirname },
},
rules: {
"no-undef": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
},
plugins: {
'react-hooks': reactHooks,
},
},
// @ts-expect-error - type of css is wrong, but it works
{ files: ["**/*.css"], plugins: { css }, language: "css/css", extends: ["css/recommended"] },
// @ts-expect-error - type of markdown is wrong, but it works
{ files: ["**/*.md"], plugins: { markdown }, language: "markdown/gfm", extends: ["markdown/recommended"] },
]);