chore(web): run oxlint before eslint (#29224)

This commit is contained in:
yyh
2025-12-07 11:36:33 +08:00
committed by GitHub
parent bbbfffb62f
commit c012eddb47
4 changed files with 99 additions and 7 deletions

View File

@@ -158,7 +158,7 @@ const UpdateDSLModal = ({
}
return true
}
catch (err: any) {
catch {
notify({ type: 'error', message: t('workflow.common.importFailure') })
return false
}

View File

@@ -78,6 +78,7 @@ export default combine(
},
{
ignores: [
'storybook-static/**',
'**/node_modules/*',
'**/dist/',
'**/build/',

View File

@@ -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"
]
}
}
}

88
web/pnpm-lock.yaml generated
View File

@@ -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/darwin-arm64@1.31.0':
resolution: {integrity: sha512-HqoYNH5WFZRdqGUROTFGOdBcA9y/YdHNoR/ujlyVO53it+q96dujbgKEvlff/WEuo4LbDKBrKLWKTKvOd/VYdg==}
cpu: [arm64]
os: [darwin]
'@oxlint/darwin-x64@1.31.0':
resolution: {integrity: sha512-gNq+JQXBCkYKQhmJEgSNjuPqmdL8yBEX3v0sueLH3g5ym4OIrNO7ml1M7xzCs0zhINQCR9MsjMJMyBNaF1ed+g==}
cpu: [x64]
os: [darwin]
'@oxlint/linux-arm64-gnu@1.31.0':
resolution: {integrity: sha512-cRmttpr3yHPwbrvtPNlv+0Zw2Oeh0cU902iMI4fFW9ylbW/vUAcz6DvzGMCYZbII8VDiwQ453SV5AA8xBgMbmw==}
cpu: [arm64]
os: [linux]
'@oxlint/linux-arm64-musl@1.31.0':
resolution: {integrity: sha512-0p7vn0hdMdNPIUzemw8f1zZ2rRZ/963EkK3o4P0KUXOPgleo+J9ZIPH7gcHSHtyrNaBifN03wET1rH4SuWQYnA==}
cpu: [arm64]
os: [linux]
'@oxlint/linux-x64-gnu@1.31.0':
resolution: {integrity: sha512-vNIbpSwQ4dwN0CUmojG7Y91O3CXOf0Kno7DSTshk/JJR4+u8HNVuYVjX2qBRk0OMc4wscJbEd7wJCl0VJOoCOw==}
cpu: [x64]
os: [linux]
'@oxlint/linux-x64-musl@1.31.0':
resolution: {integrity: sha512-4avnH09FJRTOT2cULdDPG0s14C+Ku4cnbNye6XO7rsiX6Bprz+aQblLA+1WLOr7UfC/0zF+jnZ9K5VyBBJy9Kw==}
cpu: [x64]
os: [linux]
'@oxlint/win32-arm64@1.31.0':
resolution: {integrity: sha512-mQaD5H93OUpxiGjC518t5wLQikf0Ur5mQEKO2VoTlkp01gqmrQ+hyCLOzABlsAIAeDJD58S9JwNOw4KFFnrqdw==}
cpu: [arm64]
os: [win32]
'@oxlint/win32-x64@1.31.0':
resolution: {integrity: sha512-AS/h58HfloccRlVs7P3zbyZfxNS62JuE8/3fYGjkiRlR1ZoDxdqmz5QgLEn+YxxFUTMmclGAPMFHg9z2Pk315A==}
cpu: [x64]
os: [win32]
'@parcel/watcher-android-arm64@2.5.1':
resolution: {integrity: sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==}
engines: {node: '>= 10.0.0'}
@@ -6918,6 +6961,16 @@ packages:
oxc-resolver@11.14.2:
resolution: {integrity: sha512-M5fERQKcrCngMZNnk1gRaBbYcqpqXLgMcoqAo7Wpty+KH0I18i03oiy2peUsGJwFaKAEbmo+CtAyhXh08RZ1RA==}
oxlint@1.31.0:
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
p-cancelable@2.1.1:
resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==}
engines: {node: '>=8'}
@@ -11347,6 +11400,30 @@ snapshots:
'@oxc-resolver/binding-win32-x64-msvc@11.14.2':
optional: true
'@oxlint/darwin-arm64@1.31.0':
optional: true
'@oxlint/darwin-x64@1.31.0':
optional: true
'@oxlint/linux-arm64-gnu@1.31.0':
optional: true
'@oxlint/linux-arm64-musl@1.31.0':
optional: true
'@oxlint/linux-x64-gnu@1.31.0':
optional: true
'@oxlint/linux-x64-musl@1.31.0':
optional: true
'@oxlint/win32-arm64@1.31.0':
optional: true
'@oxlint/win32-x64@1.31.0':
optional: true
'@parcel/watcher-android-arm64@2.5.1':
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
oxlint@1.31.0:
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
p-cancelable@2.1.1: {}
p-limit@2.3.0: