Files
LegacyHUB/frontend/eslint.config.js
Vadim Malanov 9b84e38f5a
Some checks failed
CI / Backend (lint + tests + compose) (push) Has been cancelled
CI / Frontend (lint + type-check + build) (push) Has been cancelled
feat: adopt shared TeamHUB cursor theme
2026-06-20 19:14:04 +03:00

77 lines
2.2 KiB
JavaScript

import js from "@eslint/js";
import tsParser from "@typescript-eslint/parser";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
export default [
{ ignores: ["dist", "node_modules", "public", "*.config.js", "*.config.ts"] },
js.configs.recommended,
{
files: ["src/**/*.js"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
window: "readonly",
document: "readonly",
console: "readonly",
navigator: "readonly",
localStorage: "readonly",
setTimeout: "readonly",
clearTimeout: "readonly",
crypto: "readonly",
},
},
rules: {
"no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
},
},
{
files: ["src/**/*.{ts,tsx}"],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: { jsx: true },
},
globals: {
window: "readonly",
document: "readonly",
console: "readonly",
navigator: "readonly",
localStorage: "readonly",
setTimeout: "readonly",
clearTimeout: "readonly",
crypto: "readonly",
KeyboardEvent: "readonly",
Event: "readonly",
HTMLInputElement: "readonly",
HTMLButtonElement: "readonly",
HTMLDivElement: "readonly",
HTMLParagraphElement: "readonly",
HTMLSpanElement: "readonly",
},
},
plugins: {
"@typescript-eslint": tsPlugin,
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...tsPlugin.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
"@typescript-eslint/no-explicit-any": "off",
"no-undef": "off",
"no-empty": ["error", { allowEmptyCatch: true }],
},
},
];