All checks were successful
Test / frontend-tests (pull_request) Successful in 1m9s
Test / frontend-typecheck (pull_request) Successful in 1m15s
Test / rust-fmt-check (pull_request) Successful in 2m44s
Test / rust-clippy (pull_request) Successful in 24m22s
Test / rust-tests (pull_request) Successful in 25m43s
- Fix TypeScript lint errors in setup.ts and LogUpload - Remove unused imports and variables - Fix duplicate Separator exports in ui/index.tsx - Apply cargo fmt formatting to Rust code - Update ESLint configuration
143 lines
3.6 KiB
JavaScript
143 lines
3.6 KiB
JavaScript
import globals from "globals";
|
|
import pluginReact from "eslint-plugin-react";
|
|
import pluginReactHooks from "eslint-plugin-react-hooks";
|
|
import pluginTs from "@typescript-eslint/eslint-plugin";
|
|
import parserTs from "@typescript-eslint/parser";
|
|
|
|
export default [
|
|
{
|
|
files: ["src/**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
},
|
|
parser: parserTs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
project: "./tsconfig.json",
|
|
},
|
|
},
|
|
plugins: {
|
|
react: pluginReact,
|
|
"react-hooks": pluginReactHooks,
|
|
"@typescript-eslint": pluginTs,
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
rules: {
|
|
...pluginReact.configs.recommended.rules,
|
|
...pluginReactHooks.configs.recommended.rules,
|
|
...pluginTs.configs.recommended.rules,
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
"react/react-in-jsx-scope": "off",
|
|
"react/prop-types": "off",
|
|
"react/no-unescaped-entities": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["tests/unit/**/*.test.{ts,tsx}"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
...globals.vitest,
|
|
},
|
|
parser: parserTs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
project: "./tsconfig.json",
|
|
},
|
|
},
|
|
plugins: {
|
|
react: pluginReact,
|
|
"react-hooks": pluginReactHooks,
|
|
"@typescript-eslint": pluginTs,
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
rules: {
|
|
...pluginReact.configs.recommended.rules,
|
|
...pluginReactHooks.configs.recommended.rules,
|
|
...pluginTs.configs.recommended.rules,
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
"react/react-in-jsx-scope": "off",
|
|
"react/prop-types": "off",
|
|
"react/no-unescaped-entities": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["tests/e2e/**/*.ts", "tests/e2e/**/*.tsx"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.node,
|
|
},
|
|
parser: parserTs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: false,
|
|
},
|
|
},
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": pluginTs,
|
|
},
|
|
rules: {
|
|
...pluginTs.configs.recommended.rules,
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
},
|
|
},
|
|
{
|
|
files: ["cli/**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.node,
|
|
},
|
|
parser: parserTs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: false,
|
|
},
|
|
},
|
|
},
|
|
plugins: {
|
|
"@typescript-eslint": pluginTs,
|
|
},
|
|
rules: {
|
|
...pluginTs.configs.recommended.rules,
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
"react/no-unescaped-entities": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["**/*.ts", "**/*.tsx"],
|
|
ignores: ["dist/", "node_modules/", "src-tauri/", "target/", "coverage/", "tailwind.config.ts"],
|
|
},
|
|
];
|