Some checks failed
Auto Tag / autotag (push) Successful in 8s
Auto Tag / wiki-sync (push) Successful in 9s
Test / frontend-tests (push) Successful in 1m42s
Test / frontend-typecheck (push) Successful in 1m54s
Auto Tag / changelog (push) Successful in 1m56s
Auto Tag / build-macos-arm64 (push) Successful in 3m3s
Auto Tag / build-linux-amd64 (push) Successful in 9m37s
Auto Tag / build-windows-amd64 (push) Successful in 11m16s
Auto Tag / build-linux-arm64 (push) Successful in 11m41s
Test / rust-fmt-check (push) Failing after 15m46s
Test / rust-clippy (push) Successful in 17m15s
Test / rust-tests (push) Successful in 18m57s
- Add eslint-disable comment for unused handlePaste in LogUpload - Fix unused 'get' parameter in attachmentStore.ts - Fix ESLint setup.ts parsing error by adding it to test files config
143 lines
3.7 KiB
JavaScript
143 lines
3.7 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}", "tests/unit/setup.ts"],
|
|
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"],
|
|
},
|
|
];
|