Merge pull request #4739 from continuedev/tomasz/better-linting

Better linting
This commit is contained in:
Tomasz Stefaniak 2025-03-20 11:22:44 -07:00 • committed by GitHub
commit 5833d36fac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 3 deletions

View file

@ -5,8 +5,18 @@
"project": "./tsconfig.json"
},
"rules": {
"quotes": ["warn", "double", {}],
"quotes": ["off", "double", {}],
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-floating-promises": "warn"
"@typescript-eslint/no-floating-promises": "off",
"import/order": "off",
"curly": "off",
"@typescript-eslint/semi": "off",
"eqeqeq": "error",
"complexity": ["error", { "max": 38 }],
"max-lines-per-function": ["error", { "max": 996 }],
"max-statements": ["error", { "max": 112 }],
"max-depth": ["error", { "max": 6 }],
"max-nested-callbacks": ["error", { "max": 4 }],
"max-params": ["error", { "max": 11 }]
}
}

View file

@ -107,7 +107,7 @@ class Anthropic extends BaseLLM {
const newpart = {
...part,
// If multiple text parts, only add cache_control to the last one
...(addCaching && contentIdx == message.content.length - 1
...(addCaching && contentIdx === message.content.length - 1
? { cache_control: { type: "ephemeral" } }
: {}),
};