Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore: enable ts/no-explicit-any, remove no-unused-vars (#30042)

Stephen Zhoua3d4f4f3bdce
diff --git a/web/eslint.config.mjs b/web/eslint.config.mjs
index 9cd4d7831e7..b085ea36196 100644
--- a/web/eslint.config.mjs
+++ b/web/eslint.config.mjs
@@ -19,6 +19,7 @@ export default antfu(
typescript: {
overrides: {
'ts/consistent-type-definitions': ['error', 'type'],
+ 'ts/no-explicit-any': 'warn',
},
},
test: {
@@ -40,7 +41,6 @@ export default antfu(
'next/inline-script-id': 'warn',
'no-console': 'warn',
'no-irregular-whitespace': 'warn',
- 'no-unused-vars': 'warn',
'node/prefer-global/buffer': 'warn',
'node/prefer-global/process': 'warn',
'react/no-create-ref': 'warn',
diff --git a/web/i18n-config/check-i18n.js b/web/i18n-config/check-i18n.js
index 096a4d7afca..d69885e6f04 100644
--- a/web/i18n-config/check-i18n.js
+++ b/web/i18n-config/check-i18n.js
@@ -184,24 +184,6 @@ async function getKeysFromLanguage(language) {
})
}
-function removeKeysFromObject(obj, keysToRemove, prefix = '') {
- let modified = false
- for (const key in obj) {
- const fullKey = prefix ? `${prefix}.${key}` : key
-
- if (keysToRemove.includes(fullKey)) {
- delete obj[key]
- modified = true
- console.log(`🗑️ Removed key: ${fullKey}`)
- }
- else if (typeof obj[key] === 'object' && obj[key] !== null) {
- const subModified = removeKeysFromObject(obj[key], keysToRemove, fullKey)
- modified = modified || subModified
- }
- }
- return modified
-}
-
async function removeExtraKeysFromFile(language, fileName, extraKeys) {
const filePath = path.resolve(__dirname, '../i18n', language, `${fileName}.ts`)