fix: resolve all lint errors, improve type safety, and remove unused code
Some checks failed
Dev Deployment (Zero Downtime) / deploy-dev (push) Failing after 7m26s
Some checks failed
Dev Deployment (Zero Downtime) / deploy-dev (push) Failing after 7m26s
Remove unused imports, replace `any` types with proper interfaces in directus.ts and i18n-loader.ts, exclude scripts/ and coverage/ from ESLint, and fix unused variable warnings across the codebase. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
const fetch = require('node-fetch');
|
||||
require('dotenv').config();
|
||||
|
||||
@@ -19,7 +20,7 @@ async function setupSnippets() {
|
||||
schema: { name: 'snippets' }
|
||||
})
|
||||
});
|
||||
} catch (e) {}
|
||||
} catch (_e) {}
|
||||
|
||||
// 2. Add Fields
|
||||
const fields = [
|
||||
@@ -39,7 +40,7 @@ async function setupSnippets() {
|
||||
headers: { 'Authorization': `Bearer ${DIRECTUS_TOKEN}`, 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(f)
|
||||
});
|
||||
} catch (e) {}
|
||||
} catch (_e) {}
|
||||
}
|
||||
|
||||
// 3. Add Example Data
|
||||
@@ -69,7 +70,7 @@ async function setupSnippets() {
|
||||
headers: { 'Authorization': `Bearer ${DIRECTUS_TOKEN}`, 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(s)
|
||||
});
|
||||
} catch (e) {}
|
||||
} catch (_e) {}
|
||||
}
|
||||
|
||||
console.log('✅ Snippets setup complete!');
|
||||
|
||||
Reference in New Issue
Block a user