eslint.config.mjs
Rama main · réplica de lectura del repositorio original.
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import reactHooks from "eslint-plugin-react-hooks";
import globals from "globals";
export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
{
ignores: [
"**/node_modules/**",
"**/dist/**",
"**/build/**",
"**/.expo/**",
"**/playwright-report/**",
"**/playwright-visual-report/**",
"**/test-results/**",
"**/coverage/**",
"**/*.config.{js,mjs}",
"**/metro.config.js",
"**/sw.js",
// This dependency is byte-pinned and verified by its source contract.
"vendor/zod-3.25.76/**",
],
},
{
files: ["**/*.{ts,tsx}"],
plugins: { "react-hooks": reactHooks },
rules: {
...reactHooks.configs.recommended.rules,
// These compiler-oriented rules reject several intentional integration
// patterns used by the imperative terminal/SFTP adapters. The project
// still enforces the correctness-critical rules-of-hooks and
// exhaustive-deps checks from the recommended preset.
"react-hooks/refs": "off",
"react-hooks/set-state-in-effect": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"no-console": ["error", { allow: ["warn", "error"] }],
},
},
{
files: ["**/*.test.{ts,tsx}", "**/*.spec.{ts,tsx}"],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "warn",
"no-console": "off",
},
},
{
files: ["**/*.mjs"],
languageOptions: {
globals: { ...globals.node },
},
rules: {
"no-console": "off",
},
},
{
files: ["**/*.cjs"],
languageOptions: {
globals: { ...globals.node },
},
rules: {
"@typescript-eslint/no-require-imports": "off",
"no-console": "off",
},
},
);