-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mts
More file actions
36 lines (35 loc) · 1.03 KB
/
eslint.config.mts
File metadata and controls
36 lines (35 loc) · 1.03 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
34
35
36
import type { Linter } from "eslint";
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import ReactEslintPlugin from "eslint-plugin-react";
import PrettierEslint from "eslint-plugin-prettier/recommended";
export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommended,
PrettierEslint,
...[ReactEslintPlugin.configs.flat.recommended ?? []],
...[ReactEslintPlugin.configs.flat["jsx-runtime"] ?? []],
{
ignores: ["node_modules", "dist", "__snapshots__"],
settings: {
react: {
version: "detect",
},
},
rules: {
"prettier/prettier": "error",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": [
"error",
{
args: "none",
caughtErrors: "none",
},
],
"react/jsx-uses-vars": "error",
"react/jsx-uses-react": "error",
},
},
) as Linter.Config;