~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
fix: Add ESLint flat config for v9 pre-commit hook
LearningCircuit3a1f8a34637c
diff --git a/.gitignore b/.gitignoreindex 43bc0917e0..ee20465628 100644--- a/.gitignore+++ b/.gitignore@@ -40,6 +40,7 @@!MANIFEST.in!.pre-commit-config.yaml!.isort.cfg+!eslint.config.mjs# Block JSON files in root directory (except package.json which is explicitly allowed above)diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex 75f67bc426..6e0a3880dd 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -28,7 +28,7 @@ repos:- id: eslintname: ESLint - lint JavaScriptfiles: \.(js|mjs)$- exclude: (node_modules|dist|build|\.min\.js)+ exclude: (node_modules|dist|build|\.min\.js|static/dist)additional_dependencies:- repo: https://github.com/astral-sh/ruff-pre-commitdiff --git a/.pre-commit-hooks/file-whitelist-check.sh b/.pre-commit-hooks/file-whitelist-check.shindex 54646dc16c..d207873621 100755--- a/.pre-commit-hooks/file-whitelist-check.sh+++ b/.pre-commit-hooks/file-whitelist-check.sh@@ -6,6 +6,7 @@ALLOWED_PATTERNS=("\.py$""\.js$"+ "\.mjs$""\.html$""\.css$""\.json$"diff --git a/eslint.config.mjs b/eslint.config.mjsnew file mode 100644index 0000000000..6daf45e8f4--- /dev/null+++ b/eslint.config.mjs@@ -0,0 +1,100 @@+export default [+ {+ files: ["**/*.js", "**/*.mjs"],+ languageOptions: {+ ecmaVersion: 2022,+ sourceType: "module",+ globals: {+ // Browser globals+ window: "readonly",+ document: "readonly",+ console: "readonly",+ fetch: "readonly",+ setTimeout: "readonly",+ setInterval: "readonly",+ clearTimeout: "readonly",+ clearInterval: "readonly",+ localStorage: "readonly",+ sessionStorage: "readonly",+ navigator: "readonly",+ location: "readonly",+ history: "readonly",+ alert: "readonly",+ confirm: "readonly",+ FormData: "readonly",+ URLSearchParams: "readonly",+ URL: "readonly",+ Blob: "readonly",+ File: "readonly",+ FileReader: "readonly",+ Event: "readonly",+ CustomEvent: "readonly",+ HTMLElement: "readonly",+ Node: "readonly",+ NodeList: "readonly",+ Element: "readonly",+ MutationObserver: "readonly",+ ResizeObserver: "readonly",+ IntersectionObserver: "readonly",+ WebSocket: "readonly",+ AbortController: "readonly",+ Request: "readonly",+ Response: "readonly",+ Headers: "readonly",+ crypto: "readonly",+ performance: "readonly",+ requestAnimationFrame: "readonly",+ cancelAnimationFrame: "readonly",+ getComputedStyle: "readonly",+ matchMedia: "readonly",+ // ES2021+ globals+ Promise: "readonly",+ Map: "readonly",+ Set: "readonly",+ WeakMap: "readonly",+ WeakSet: "readonly",+ Symbol: "readonly",+ Proxy: "readonly",+ Reflect: "readonly",+ BigInt: "readonly",+ globalThis: "readonly",+ // Common libraries used in project+ marked: "readonly",+ DOMPurify: "readonly",+ io: "readonly",+ Prism: "readonly",+ ClipboardJS: "readonly",+ jspdf: "readonly",+ html2canvas: "readonly",+ },+ },+ rules: {+ // Critical errors that should block commits+ "no-const-assign": "error",+ "no-dupe-args": "error",+ "no-dupe-keys": "error",+ "no-duplicate-case": "error",+ "no-func-assign": "error",+ "valid-typeof": "error",+ // Warnings for less critical issues+ "no-empty": "warn",+ "no-extra-semi": "warn",+ "no-unreachable": "warn",+ // Disabled for existing codebase compatibility+ "no-unused-vars": "off",+ "no-undef": "off",+ "no-redeclare": "off",+ },+ },+ {+ ignores: [+ "node_modules/**",+ "dist/**",+ "build/**",+ "**/*.min.js",+ "**/static/dist/**",+ // Temporarily exclude until duplicate function declarations are refactored+ "**/pages/news.js",+ ],+ },+];