mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
Remove obsolete eslint-disable comments after rule configuration changes
This commit is contained in:
parent
cc0f469aea
commit
8722235552
6 changed files with 6 additions and 11 deletions
|
|
@ -28,7 +28,6 @@ export class ClaudeConversationNamingService implements IConversationNamingServi
|
|||
}]
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-restricted-globals -- requestUrl doeesn't support AbortSignal
|
||||
const response = await fetch(AIProviderURL.Claude, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ export class GeminiConversationNamingService implements IConversationNamingServi
|
|||
}]
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-restricted-globals -- requestUrl doeesn't support AbortSignal
|
||||
const response = await fetch(`${AIProviderURL.Gemini}/${AIProviderModel.GeminiNamer}:generateContent?key=${this.apiKey}`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ export class OpenAIConversationNamingService implements IConversationNamingServi
|
|||
]
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-restricted-globals -- requestUrl doeesn't support AbortSignal
|
||||
const response = await fetch(AIProviderURL.OpenAI, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -2,10 +2,8 @@ import type VaultkeeperAIPlugin from "main";
|
|||
|
||||
export function openPluginSettings(plugin: VaultkeeperAIPlugin) {
|
||||
// @ts-ignore - accessing internal API
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access -- required to open Settings menu – internal API, no alternative, low runtime risk
|
||||
plugin.app.setting.open();
|
||||
// @ts-ignore - accessing internal API
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access -- required to switch Settings tab – internal API, no alternative, low runtime risk
|
||||
plugin.app.setting.openTabById(plugin.manifest.id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ export class StreamingService {
|
|||
additionalHeaders?: Record<string, string>
|
||||
): AsyncGenerator<IStreamChunk, void, unknown> {
|
||||
try {
|
||||
// eslint-disable-next-line no-restricted-globals -- requestUrl doeesn't support streaming
|
||||
const response = await fetch(
|
||||
url,
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ export default [
|
|||
"@typescript-eslint/ban-ts-comment": "off",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"no-prototype-builtins": "off",
|
||||
"@typescript-eslint/no-unsafe-call": "off",
|
||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||
|
||||
// Enable additional TypeScript rules for PR issues
|
||||
"@typescript-eslint/require-await": "error",
|
||||
|
|
@ -73,13 +75,16 @@ export default [
|
|||
"eslint-comments/no-unused-disable": "error",
|
||||
"eslint-comments/no-restricted-disable": [
|
||||
"error",
|
||||
"@typescript-eslint/no-explicit-any"
|
||||
"@typescript-eslint/no-explicit-any",
|
||||
"no-restricted-globals"
|
||||
],
|
||||
|
||||
// Console usage (allow warn, error, debug only)
|
||||
"no-console": ["error", { allow: ["warn", "error", "debug"] }],
|
||||
|
||||
// Restricted globals
|
||||
// Note: fetch is intentionally not restricted here because this plugin legitimately needs
|
||||
// fetch for streaming and AbortSignal support, which requestUrl doesn't provide
|
||||
"no-restricted-globals": [
|
||||
"error",
|
||||
{
|
||||
|
|
@ -89,10 +94,6 @@ export default [
|
|||
{
|
||||
name: "localStorage",
|
||||
message: "Prefer `App#saveLocalStorage` / `App#loadLocalStorage` functions to write / read localStorage data that's unique to a vault."
|
||||
},
|
||||
{
|
||||
name: "fetch",
|
||||
message: "Use the built-in `requestUrl` function instead of `fetch` for network requests."
|
||||
}
|
||||
],
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue