2024-10-23 04:47:57 +00:00
|
|
|
import globals from "globals"
|
|
|
|
import pluginJs from "@eslint/js"
|
|
|
|
import tseslint from "typescript-eslint"
|
|
|
|
import pluginReact from "eslint-plugin-react"
|
|
|
|
|
|
|
|
export default [
|
|
|
|
{ files: ["./src/**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
|
|
|
|
{ plugins: { react: pluginReact } },
|
|
|
|
{
|
|
|
|
languageOptions: {
|
|
|
|
parserOptions: {
|
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
globals: globals.browser,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
pluginJs.configs.recommended,
|
|
|
|
...tseslint.configs.recommended,
|
|
|
|
pluginReact.configs.flat.recommended,
|
|
|
|
{
|
|
|
|
rules: {
|
|
|
|
"react/react-in-jsx-scope": "off",
|
2024-10-23 05:40:20 +00:00
|
|
|
"react/no-unknown-property": "off",
|
2024-10-23 06:27:28 +00:00
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
args: "all",
|
|
|
|
argsIgnorePattern: "^_",
|
|
|
|
caughtErrors: "all",
|
|
|
|
caughtErrorsIgnorePattern: "^_",
|
|
|
|
destructuredArrayIgnorePattern: "^_",
|
|
|
|
varsIgnorePattern: "^_",
|
|
|
|
ignoreRestSiblings: true,
|
|
|
|
},
|
|
|
|
],
|
2024-10-23 04:47:57 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|