tftsr-devops_investigation/eslint.config.js
Shaun Arman 7a6a47a21b
Some checks failed
PR Review Automation / review (pull_request) Has been cancelled
Test / frontend-tests (pull_request) Successful in 1m40s
Test / frontend-typecheck (pull_request) Successful in 1m43s
Test / rust-fmt-check (pull_request) Successful in 10m59s
Test / rust-clippy (pull_request) Successful in 12m55s
Test / rust-tests (pull_request) Successful in 14m30s
test(kube): fix stale nav section assertions + add research docs
KubernetesPage.test.tsx had two stale section heading assertions from
before the nav restructure:
- "Services & Networking" → "Network"
- "Config & Storage" → "Config" + "Storage" (now separate sections)
Also renamed the matching it() description for accuracy.

eslint.config.js: add .claude/ to ignores (session memory dir).

Adds FreeLens feature inventory (md + json) generated during
gap analysis research for this feature parity work.
2026-06-08 20:48:02 -05:00

103 lines
3.1 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import globals from "globals";
import eslintReact from "@eslint-react/eslint-plugin";
import pluginReactHooks from "eslint-plugin-react-hooks";
import pluginTs from "@typescript-eslint/eslint-plugin";
import parserTs from "@typescript-eslint/parser";
const tsBase = {
languageOptions: {
parser: parserTs,
parserOptions: {
ecmaFeatures: { jsx: true },
project: "./tsconfig.json",
},
},
plugins: {
"@typescript-eslint": pluginTs,
"react-hooks": pluginReactHooks,
"@eslint-react": eslintReact,
},
rules: {
...pluginTs.configs.recommended.rules,
...pluginReactHooks.configs.recommended.rules,
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"no-console": ["warn", { allow: ["warn", "error"] }],
// Downgraded: pre-existing codebase has legitimate `any` usage at API boundaries
"@typescript-eslint/no-explicit-any": "warn",
"@eslint-react/no-direct-mutation-state": "error",
"@eslint-react/no-missing-key": "error",
// Off: many pre-existing list renders use index keys where stable IDs aren't available
"@eslint-react/no-array-index-key": "off",
// react-hooks v7 new rules overly strict for this project's data-fetching pattern
"react-hooks/set-state-in-effect": "off",
},
};
export default [
{
ignores: ["dist/", "node_modules/", "src-tauri/target/**", "target/**", "coverage/", "tailwind.config.ts", ".claude/"],
},
{
files: ["src/**/*.{ts,tsx}"],
...tsBase,
languageOptions: {
...tsBase.languageOptions,
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ["tests/unit/**/*.test.{ts,tsx}", "tests/unit/setup.ts"],
...tsBase,
languageOptions: {
...tsBase.languageOptions,
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.node,
...globals.vitest,
},
},
},
{
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: ["log", "warn", "error"] }],
},
},
];