{ "$schema": "./node_modules/oxlint/configuration_schema.json", "plugins": ["typescript", "react", "react-hooks", "react-perf", "unicorn"], "jsPlugins": [ { "name": "mobile-pairing", "specifier": "./config/oxlint-plugins/mobile-pairing-qrcode-import.mjs" }, { "name": "app-store-performance", "specifier": "./config/oxlint-plugins/app-store-performance.mjs" }, { "name": "quadratic-buffer-concat", "specifier": "./config/oxlint-plugins/quadratic-buffer-concat.mjs" }, { "name": "renderer-scrollbar-style", "specifier": "./config/oxlint-plugins/renderer-scrollbar-style.mjs" } ], "categories": { "correctness": "error" }, "rules": { "app-store-performance/require-selector": "error", "app-store-performance/no-identity-selector": "error", "app-store-performance/no-fresh-selector-result": "error", "no-fallthrough": "error", "eslint/no-useless-call": "error", "oxc/no-accumulating-spread": "error", "quadratic-buffer-concat/no-loop-carried-concat": "error", "react/jsx-no-duplicate-props": "error", "react/jsx-no-undef": "error", "react/no-children-prop": "error", "react/no-danger-with-children": "error", "react/no-direct-mutation-state": "error", "react/no-find-dom-node": "error", "react/no-render-return-value": "error", "react/no-string-refs": "error", "react/no-unescaped-entities": "error", "react/require-render-return": "error", "react/jsx-curly-brace-presence": [ "error", { "props": "never", "children": "never", "propElementValues": "always" } ], "react/jsx-filename-extension": ["error", { "extensions": [".tsx", ".jsx"] }], "react/jsx-fragments": "error", "react/jsx-key": "error", "react/jsx-no-constructed-context-values": "error", "react/jsx-no-target-blank": "error", "react/jsx-no-useless-fragment": ["error", { "allowExpressions": true }], "react/jsx-pascal-case": "error", "react/no-object-type-as-default-prop": "error", "react/self-closing-comp": "error", "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn", "typescript/array-type": "error", "typescript/consistent-generic-constructors": "error", "typescript/consistent-indexed-object-style": "error", "typescript/consistent-type-assertions": "error", "typescript/consistent-type-definitions": ["error", "type"], "typescript/consistent-type-imports": "error", "typescript/no-explicit-any": ["error", { "ignoreRestArgs": true }], "typescript/no-import-type-side-effects": "error", "typescript/no-unnecessary-boolean-literal-compare": "error", "typescript/no-unnecessary-template-expression": "error", "typescript/no-unsafe-function-type": "warn", "typescript/prefer-function-type": "error", "typescript/prefer-includes": "error", "typescript/prefer-optional-chain": "error", "typescript/prefer-ts-expect-error": "error", "typescript/switch-exhaustiveness-check": [ "error", { "allowDefaultCaseForExhaustiveSwitch": false } ], "curly": "error", "no-unneeded-ternary": "error", "no-else-return": "error", "prefer-exponentiation-operator": "error", "prefer-object-has-own": "error", "no-restricted-imports": [ "error", { "paths": [ { "name": "@linear/sdk", "allowTypeImports": true, "message": "Value-importing @linear/sdk hoists its ~2.6MB CJS bundle into the eager top-level require block and defeats the lazy loader. Use `import type` plus loadLinearSdk() from src/main/linear/linear-sdk.ts." } ] } ], "mobile-pairing/no-eager-qrcode-import": "error", "no-useless-return": "error", "prefer-template": "error", "unicorn/consistent-empty-array-spread": "error", "unicorn/consistent-existence-index-check": "error", "unicorn/empty-brace-spaces": "error", "unicorn/error-message": "error", "unicorn/no-array-fill-with-reference-type": "warn", "unicorn/no-array-reverse": "error", "unicorn/no-instanceof-builtins": "error", "unicorn/no-typeof-undefined": "error", "unicorn/no-unnecessary-array-splice-count": "error", "unicorn/no-useless-promise-resolve-reject": "error", "unicorn/no-zero-fractions": "error", "unicorn/prefer-array-find": "error", "unicorn/prefer-array-flat-map": "warn", "unicorn/prefer-array-index-of": "error", "unicorn/prefer-at": "error", "unicorn/prefer-date-now": "error", "unicorn/prefer-includes": "error", "unicorn/prefer-import-meta-properties": "error", "unicorn/prefer-math-min-max": "error", "unicorn/prefer-negative-index": "error", "unicorn/prefer-node-protocol": "error", "unicorn/prefer-number-properties": "error", "unicorn/prefer-object-from-entries": "error", "unicorn/prefer-regexp-test": "warn", "unicorn/prefer-ternary": "error", "unicorn/throw-new-error": "error" }, "overrides": [ { "files": ["src/renderer/src/**/*.{ts,tsx}"], "rules": { "renderer-scrollbar-style/require-styled-vertical-scrollbar": "error" } }, { "files": ["**/*.test.*", "**/*.spec.*", "**/*-benchmark.*"], "rules": { "quadratic-buffer-concat/no-loop-carried-concat": "off", "renderer-scrollbar-style/require-styled-vertical-scrollbar": "off" } }, { "files": ["**/*.ts"], "rules": { "max-lines": ["error", { "max": 300, "skipBlankLines": true, "skipComments": true }] } }, { "files": ["**/*.tsx"], "rules": { "max-lines": ["error", { "max": 400, "skipBlankLines": true, "skipComments": true }] } }, { "files": ["**/*.mjs"], "rules": { "max-lines": ["error", { "max": 600, "skipBlankLines": true, "skipComments": true }] } }, { "files": ["**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts", "**/*.spec.tsx"], "rules": { "max-lines": ["error", { "max": 800, "skipBlankLines": true, "skipComments": true }] } } ], "ignorePatterns": ["**/node_modules", "**/dist", "**/out", "tests/e2e/.cross-version-checkouts"] }