43 lines
1.4 KiB
JavaScript
43 lines
1.4 KiB
JavaScript
import js from "@eslint/js"
|
|
import globals from "globals"
|
|
import reactHooks from "eslint-plugin-react-hooks"
|
|
import reactRefresh from "eslint-plugin-react-refresh"
|
|
import tseslint from "typescript-eslint"
|
|
import { globalIgnores } from "eslint/config"
|
|
|
|
export default tseslint.config([
|
|
globalIgnores(["dist"]),
|
|
{
|
|
files: ["**/*.{ts,tsx}"],
|
|
extends: [
|
|
js.configs.recommended,
|
|
reactHooks.configs["recommended-latest"],
|
|
reactRefresh.configs.vite,
|
|
// Remove tseslint.configs.recommended and use this for stricter rules
|
|
...tseslint.configs.strictTypeChecked,
|
|
],
|
|
languageOptions: {
|
|
ecmaVersion: 2020,
|
|
globals: globals.browser,
|
|
parserOptions: {
|
|
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
},
|
|
rules: {
|
|
"@typescript-eslint/no-unused-vars": 0,
|
|
"@typescript-eslint/no-non-null-assertion": 0,
|
|
"@typescript-eslint/restrict-template-expressions": 0,
|
|
"@typescript-eslint/no-unsafe-assignment": 0,
|
|
"@typescript-eslint/no-unsafe-call": 0,
|
|
"no-empty": 0,
|
|
"@typescript-eslint/no-unsafe-member-access": 0,
|
|
"no-empty-pattern": 0,
|
|
"@typescript-eslint/no-unnecessary-condition": 0,
|
|
"@typescript-eslint/no-confusing-void-expression": 0,
|
|
"@typescript-eslint/no-empty-object-type": 0,
|
|
"react-refresh/only-export-components": 0,
|
|
},
|
|
},
|
|
])
|