返回 DeepSeek-Reasonix
eslint.config.js
根目录 / desktop / frontend / eslint.config.js
1 import tsParser from "@typescript-eslint/parser";
2 import { defineConfig } from "eslint/config";
3 import reactHooks from "eslint-plugin-react-hooks";
4
5 export default defineConfig([
6 {
7 files: ["src/**/*.{ts,tsx}"],
8 linterOptions: {
9 reportUnusedDisableDirectives: "off",
10 },
11 languageOptions: {
12 parser: tsParser,
13 parserOptions: {
14 ecmaFeatures: { jsx: true },
15 ecmaVersion: "latest",
16 sourceType: "module",
17 },
18 },
19 plugins: {
20 "react-hooks": reactHooks,
21 },
22 rules: {
23 "react-hooks/rules-of-hooks": "error",
24 },
25 },
26 {
27 files: ["src/app-runtime/**/*.{ts,tsx}", "src/app-shell/**/*.{ts,tsx}",
28 "src/app-features/**/*.{ts,tsx}", "src/app-domain/**/*.{ts,tsx}", "src/lib/useCommitted*.ts"],
29 rules: { "react-hooks/exhaustive-deps": "error" },
30 },
31 ]);
32
32 lines JAVASCRIPT