Skip to content

~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.

chore(lint): enable no-unused-expressions via chai-friendly plugin (#3649)

LearningCircuitd0cf8ab98271
diff --git a/eslint.config.js b/eslint.config.js
index c7e46abd95..0db99f87df 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -2,6 +2,7 @@
// https://eslint.org/docs/latest/use/configure/configuration-files-new
import nounsanitized from "eslint-plugin-no-unsanitized";
+import chaiFriendly from "eslint-plugin-chai-friendly";
// Recognized safe escape/sanitize methods for no-unsanitized plugin.
// Implementations:
@@ -42,6 +43,7 @@ export default [
plugins: {
"no-unsanitized": nounsanitized,
+ "chai-friendly": chaiFriendly,
},
rules: {
@@ -227,6 +229,11 @@ export default [
// Readability: drop pointless `else` after `return`, fold `else { if }` into `else if`
"no-else-return": "error",
"no-lonely-if": "error",
+
+ // Catch bare expression statements like `foo.bar;` (probably meant `foo.bar()`).
+ // Chai-friendly variant exempts `expect(x).to.be.true` style assertions.
+ "no-unused-expressions": "off",
+ "chai-friendly/no-unused-expressions": "error",
},
languageOptions: {
diff --git a/package-lock.json b/package-lock.json
index 11d0a7ccd1..d21ae2adb2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "local-deep-research-web",
- "version": "1.6.0",
+ "version": "1.6.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "local-deep-research-web",
- "version": "1.6.0",
+ "version": "1.6.1",
"dependencies": {
"@fortawesome/fontawesome-free": "^7.2.0",
"bootstrap": "^5.3.8",
@@ -25,6 +25,7 @@
"devDependencies": {
"@vitest/coverage-v8": "^4.1.2",
"eslint": "^10.2.1",
+ "eslint-plugin-chai-friendly": "^1.2.0",
"eslint-plugin-no-unsanitized": "^4.1.5",
"happy-dom": "^20.9.0",
"vite": "^7.3.2",
@@ -1780,6 +1781,19 @@
}
}
},
+ "node_modules/eslint-plugin-chai-friendly": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-1.2.0.tgz",
+ "integrity": "sha512-um2pBb4ZXNCoTRPRAWiUaXeIaw1dRaPOEZ+G/qcZqfyTdkCXXwOBctnfnbIRbZiQf4AXl3ImV1grt423SlK+mg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "peerDependencies": {
+ "eslint": ">=3.0.0"
+ }
+ },
"node_modules/eslint-plugin-no-unsanitized": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-4.1.5.tgz",
diff --git a/package.json b/package.json
index 3da26d9072..decb8fb7b3 100644
--- a/package.json
+++ b/package.json
@@ -37,6 +37,7 @@
"devDependencies": {
"@vitest/coverage-v8": "^4.1.2",
"eslint": "^10.2.1",
+ "eslint-plugin-chai-friendly": "^1.2.0",
"eslint-plugin-no-unsanitized": "^4.1.5",
"happy-dom": "^20.9.0",
"vite": "^7.3.2",