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(web): run oxlint before eslint (#29224)

yyhc012eddb47d0
diff --git a/web/app/components/workflow/update-dsl-modal.tsx b/web/app/components/workflow/update-dsl-modal.tsx
index 136c3d3455d..be2dab7a3d0 100644
--- a/web/app/components/workflow/update-dsl-modal.tsx
+++ b/web/app/components/workflow/update-dsl-modal.tsx
@@ -158,7 +158,7 @@ const UpdateDSLModal = ({
}
return true
}
- catch (err: any) {
+ catch {
notify({ type: 'error', message: t('workflow.common.importFailure') })
return false
}
diff --git a/web/eslint.config.mjs b/web/eslint.config.mjs
index 197f7e3e1c2..fa8dd3441fc 100644
--- a/web/eslint.config.mjs
+++ b/web/eslint.config.mjs
@@ -78,6 +78,7 @@ export default combine(
},
{
ignores: [
+ 'storybook-static/**',
'**/node_modules/*',
'**/dist/',
'**/build/',
diff --git a/web/package.json b/web/package.json
index 58105ae8e80..906102b3677 100644
--- a/web/package.json
+++ b/web/package.json
@@ -23,10 +23,11 @@
"build": "next build",
"build:docker": "next build && node scripts/optimize-standalone.js",
"start": "node ./scripts/copy-and-start.mjs",
- "lint": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache",
- "lint:fix": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --fix",
- "lint:quiet": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --quiet",
- "lint:complexity": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --rule 'complexity: [error, {max: 15}]' --quiet",
+ "lint:oxlint": "oxlint --config .oxlintrc.json .",
+ "lint": "pnpm run lint:oxlint && eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache",
+ "lint:fix": "pnpm run lint:oxlint && eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --fix",
+ "lint:quiet": "pnpm run lint:oxlint && eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --quiet",
+ "lint:complexity": "pnpm run lint:oxlint && eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --rule 'complexity: [error, {max: 15}]' --quiet",
"type-check": "tsc --noEmit",
"type-check:tsgo": "tsgo --noEmit",
"prepare": "cd ../ && node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || husky ./web/.husky",
@@ -182,6 +183,7 @@
"@types/semver": "^7.7.1",
"@types/sortablejs": "^1.15.8",
"@types/uuid": "^10.0.0",
+ "@typescript/native-preview": "^7.0.0-dev",
"autoprefixer": "^10.4.21",
"babel-loader": "^10.0.0",
"bing-translate-api": "^4.1.0",
@@ -202,12 +204,12 @@
"lodash": "^4.17.21",
"magicast": "^0.3.5",
"nock": "^14.0.10",
+ "oxlint": "^1.31.0",
"postcss": "^8.5.6",
"react-scan": "^0.4.3",
"sass": "^1.93.2",
"storybook": "9.1.13",
"tailwindcss": "^3.4.18",
- "@typescript/native-preview": "^7.0.0-dev",
"ts-node": "^10.9.2",
"typescript": "^5.9.3",
"uglify-js": "^3.19.3"
@@ -229,6 +231,7 @@
"eslint --fix"
],
"**/*.ts?(x)": [
+ "oxlint --config .oxlintrc.json",
"eslint --fix"
]
},
@@ -285,4 +288,4 @@
"sharp"
]
}
-}
\ No newline at end of file
+}
diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml
index db15a099612..851ad973ab7 100644
--- a/web/pnpm-lock.yaml
+++ b/web/pnpm-lock.yaml
@@ -526,6 +526,9 @@ importers:
nock:
specifier: ^14.0.10
version: 14.0.10
+ oxlint:
+ specifier: ^1.31.0
+ version: 1.31.0
postcss:
specifier: ^8.5.6
version: 8.5.6
@@ -2576,6 +2579,46 @@ packages:
cpu: [x64]
os: [win32]
+ '@oxlint/[email protected]':
+ resolution: {integrity: sha512-HqoYNH5WFZRdqGUROTFGOdBcA9y/YdHNoR/ujlyVO53it+q96dujbgKEvlff/WEuo4LbDKBrKLWKTKvOd/VYdg==}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@oxlint/[email protected]':
+ resolution: {integrity: sha512-gNq+JQXBCkYKQhmJEgSNjuPqmdL8yBEX3v0sueLH3g5ym4OIrNO7ml1M7xzCs0zhINQCR9MsjMJMyBNaF1ed+g==}
+ cpu: [x64]
+ os: [darwin]
+
+ '@oxlint/[email protected]':
+ resolution: {integrity: sha512-cRmttpr3yHPwbrvtPNlv+0Zw2Oeh0cU902iMI4fFW9ylbW/vUAcz6DvzGMCYZbII8VDiwQ453SV5AA8xBgMbmw==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@oxlint/[email protected]':
+ resolution: {integrity: sha512-0p7vn0hdMdNPIUzemw8f1zZ2rRZ/963EkK3o4P0KUXOPgleo+J9ZIPH7gcHSHtyrNaBifN03wET1rH4SuWQYnA==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@oxlint/[email protected]':
+ resolution: {integrity: sha512-vNIbpSwQ4dwN0CUmojG7Y91O3CXOf0Kno7DSTshk/JJR4+u8HNVuYVjX2qBRk0OMc4wscJbEd7wJCl0VJOoCOw==}
+ cpu: [x64]
+ os: [linux]
+
+ '@oxlint/[email protected]':
+ resolution: {integrity: sha512-4avnH09FJRTOT2cULdDPG0s14C+Ku4cnbNye6XO7rsiX6Bprz+aQblLA+1WLOr7UfC/0zF+jnZ9K5VyBBJy9Kw==}
+ cpu: [x64]
+ os: [linux]
+
+ '@oxlint/[email protected]':
+ resolution: {integrity: sha512-mQaD5H93OUpxiGjC518t5wLQikf0Ur5mQEKO2VoTlkp01gqmrQ+hyCLOzABlsAIAeDJD58S9JwNOw4KFFnrqdw==}
+ cpu: [arm64]
+ os: [win32]
+
+ '@oxlint/[email protected]':
+ resolution: {integrity: sha512-AS/h58HfloccRlVs7P3zbyZfxNS62JuE8/3fYGjkiRlR1ZoDxdqmz5QgLEn+YxxFUTMmclGAPMFHg9z2Pk315A==}
+ cpu: [x64]
+ os: [win32]
+
'@parcel/[email protected]':
resolution: {integrity: sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==}
engines: {node: '>= 10.0.0'}
@@ -6918,6 +6961,16 @@ packages:
resolution: {integrity: sha512-M5fERQKcrCngMZNnk1gRaBbYcqpqXLgMcoqAo7Wpty+KH0I18i03oiy2peUsGJwFaKAEbmo+CtAyhXh08RZ1RA==}
+ resolution: {integrity: sha512-U+Z3VShi1zuLF2Hz/pm4vWJUBm5sDHjwSzj340tz4tS2yXg9H5PTipsZv+Yu/alg6Z7EM2cZPKGNBZAvmdfkQg==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ hasBin: true
+ peerDependencies:
+ oxlint-tsgolint: '>=0.8.1'
+ peerDependenciesMeta:
+ oxlint-tsgolint:
+ optional: true
+
resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==}
engines: {node: '>=8'}
@@ -11347,6 +11400,30 @@ snapshots:
'@oxc-resolver/[email protected]':
optional: true
+ '@oxlint/[email protected]':
+ optional: true
+
+ '@oxlint/[email protected]':
+ optional: true
+
+ '@oxlint/[email protected]':
+ optional: true
+
+ '@oxlint/[email protected]':
+ optional: true
+
+ '@oxlint/[email protected]':
+ optional: true
+
+ '@oxlint/[email protected]':
+ optional: true
+
+ '@oxlint/[email protected]':
+ optional: true
+
+ '@oxlint/[email protected]':
+ optional: true
+
'@parcel/[email protected]':
optional: true
@@ -16699,6 +16776,17 @@ snapshots:
'@oxc-resolver/binding-win32-ia32-msvc': 11.14.2
'@oxc-resolver/binding-win32-x64-msvc': 11.14.2
+ optionalDependencies:
+ '@oxlint/darwin-arm64': 1.31.0
+ '@oxlint/darwin-x64': 1.31.0
+ '@oxlint/linux-arm64-gnu': 1.31.0
+ '@oxlint/linux-arm64-musl': 1.31.0
+ '@oxlint/linux-x64-gnu': 1.31.0
+ '@oxlint/linux-x64-musl': 1.31.0
+ '@oxlint/win32-arm64': 1.31.0
+ '@oxlint/win32-x64': 1.31.0
+