Refactor frontend components and dependencies
- Update ESLint configuration for frontend - Refactor dialog components (ActivateJail, CreateAction, CreateFilter, CreateJail) - Update JailsTab and RegexTesterTab components - Refactor TopCountriesPieChart component - Update package.json dependencies - Update documentation (Tasks.md) - Refactor CodeList component for jail page Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import js from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
import reactHooks from "eslint-plugin-react-hooks";
|
||||
import reactPlugin from "eslint-plugin-react";
|
||||
import prettierConfig from "eslint-config-prettier";
|
||||
|
||||
export default tseslint.config(
|
||||
{ ignores: ["dist", "eslint.config.ts"] },
|
||||
{ ignores: ["dist", "eslint.config.ts", ".vite"] },
|
||||
{
|
||||
extends: [js.configs.recommended, ...tseslint.configs.strictTypeChecked],
|
||||
files: ["**/*.{ts,tsx}"],
|
||||
@@ -15,10 +16,21 @@ export default tseslint.config(
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
react: reactPlugin,
|
||||
"react-hooks": reactHooks,
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: "detect",
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
...reactHooks.configs.recommended.rules,
|
||||
"@typescript-eslint/no-floating-promises": "error",
|
||||
"@typescript-eslint/no-misused-promises": "error",
|
||||
"react/no-array-index-key": "warn",
|
||||
"react/no-unstable-nested-components": "error",
|
||||
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@typescript-eslint/explicit-function-return-type": "warn",
|
||||
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
|
||||
|
||||
Reference in New Issue
Block a user