fix: oxlint config (#7661)

* chore: engines node

* chore: update deps

* fix: oxlint

* chore: fix lint issues
This commit is contained in:
xingyu
2026-03-15 17:41:47 +08:00
committed by GitHub
parent a8ae891aff
commit 37d72c1628
17 changed files with 60 additions and 61 deletions
-1
View File
@@ -10,7 +10,6 @@ import { $t } from '@vben/locales';
import { initComponentAdapter } from './component';
// oxlint-disable-next-line typescript/no-floating-promises
initComponentAdapter();
setupVbenForm<ComponentType>({
+1 -1
View File
@@ -112,7 +112,7 @@ const gridOptions: VxeGridProps<RowType> = {
},
toolbarConfig: {
// 是否显示搜索表单控制按钮
// @ts-ignore 正式环境时有完整的类型声明
// @ts-ignore - 正式环境时有完整的类型声明
search: true,
},
};
-2
View File
@@ -1,5 +1,3 @@
// @ts-check
import { defineConfig } from '@vben/eslint-config';
export default defineConfig();
@@ -49,10 +49,8 @@ async function viteExtraAppConfigPlugin({
console.log(colors.cyan(`✨configuration file is build successfully!`));
} catch (error) {
// oxlint-disable-next-line no-console
console.log(
colors.red(
// oxlint-disable-next-line typescript/restrict-template-expressions
`configuration file configuration file failed to package:\n${error}`,
),
);
@@ -68,7 +68,6 @@ async function viteImportMapPlugin(
});
if (options?.debug) {
// oxlint-disable-next-line typescript/no-floating-promises
(async () => {
for await (const { message, type } of generator.logStream()) {
console.log(`${type}: ${message}`);
@@ -139,7 +138,6 @@ async function viteImportMapPlugin(
buildEnd() {
// 未生成importmap时,抛出错误,防止被turbo缓存
if (!installed && !isSSR) {
// oxlint-disable-next-line no-unused-expressions
installError && console.error(installError);
throw new Error('Importmap installation failed.');
}
+4 -2
View File
@@ -1,3 +1,5 @@
import { defineConfig } from '@vben/oxlint-config';
import { oxlintConfig } from '@vben/oxlint-config';
export default defineConfig();
import { defineConfig } from 'oxlint';
export default defineConfig(oxlintConfig);
+1 -1
View File
@@ -101,7 +101,7 @@
"vue-tsc": "catalog:"
},
"engines": {
"node": ">=20.19.0",
"node": "^20.19.0 || ^22.13.0 || ^24.0.0",
"pnpm": ">=10.0.0"
},
"packageManager": "[email protected]"
@@ -26,7 +26,7 @@ interface Props {
const props = withDefaults(defineProps<Props>(), {});
// @ts-expect-error unused
// @ts-expect-error - unused
const { contentElement, overlayStyle } = useLayoutContentStyle();
const style = computed((): CSSProperties => {
@@ -12,11 +12,11 @@ const { isFullscreen, toggle } = useFullscreen();
// 重新检查全屏状态
isFullscreen.value = !!(
document.fullscreenElement ||
// @ts-expect-error: vendor fullscreen APIs are not included in the standard DOM typings
// @ts-expect-error - vendor fullscreen APIs are not included in the standard DOM typings
document.webkitFullscreenElement ||
// @ts-expect-error: vendor fullscreen APIs are not included in the standard DOM typings
// @ts-expect-error - vendor fullscreen APIs are not included in the standard DOM typings
document.mozFullScreenElement ||
// @ts-expect-error: vendor fullscreen APIs are not included in the standard DOM typings
// @ts-expect-error - vendor fullscreen APIs are not included in the standard DOM typings
document.msFullscreenElement
);
</script>
@@ -28,9 +28,9 @@ const emit = defineEmits<{
}>();
const active = defineModel<string>('active');
// @ts-expect-error unused
// @ts-expect-error - unused
const contentRef = ref();
// @ts-expect-error unused
// @ts-expect-error - unused
const tabRef = ref();
const style = computed(() => {
@@ -233,7 +233,6 @@ function drawPiece(
ctx.fillStyle = 'rgba(255, 255, 255, 0.7)';
ctx.strokeStyle = 'rgba(255, 255, 255, 0.7)';
ctx.stroke();
// oxlint-disable-next-line no-unused-expressions
opr === canvasOpr.clip ? ctx.clip() : ctx.fill();
ctx.globalCompositeOperation = 'destination-over';
}
@@ -11,7 +11,7 @@ import type {
} from './types';
import { computed, useAttrs } from 'vue';
// @ts-expect-error: vue-json-viewer does not expose compatible typings for this import path
// @ts-expect-error - vue-json-viewer does not expose compatible typings for this import path
import VueJsonViewer from 'vue-json-viewer';
import { $t } from '@vben/locales';
@@ -82,7 +82,6 @@ const toggleKeydownListener = () => {
};
const toggleOpen = () => {
// oxlint-disable-next-line no-unused-expressions
open.value ? modalApi.close() : modalApi.open();
};
@@ -41,7 +41,7 @@ const bindProps = computed(() => {
function toggleTheme(event: MouseEvent) {
const isAppearanceTransition =
// @ts-expect-error: startViewTransition is not available in the current DOM lib target
// @ts-expect-error - startViewTransition is not available in the current DOM lib target
document.startViewTransition &&
!window.matchMedia('(prefers-reduced-motion: reduce)').matches;
if (!isAppearanceTransition || !event) {
+44 -37
View File
@@ -145,8 +145,8 @@ catalogs:
specifier: ^4.2.6
version: 4.2.6
antdv-next:
specifier: ^1.1.3
version: 1.1.3
specifier: ^1.1.4
version: 1.1.4
archiver:
specifier: ^7.0.1
version: 7.0.1
@@ -379,8 +379,8 @@ catalogs:
specifier: ^40.0.0
version: 40.0.0
stylelint-order:
specifier: ^8.1.0
version: 8.1.0
specifier: ^8.1.1
version: 8.1.1
stylelint-scss:
specifier: ^7.0.0
version: 7.0.0
@@ -729,7 +729,7 @@ importers:
version: 14.2.1([email protected]([email protected]))
antdv-next:
specifier: 'catalog:'
version: 1.1.3([email protected])([email protected]([email protected]))
version: 1.1.4([email protected])([email protected]([email protected]))
dayjs:
specifier: 'catalog:'
version: 1.11.20
@@ -1089,7 +1089,7 @@ importers:
version: 5.0.1([email protected]([email protected]))
stylelint-config-recess-order:
specifier: 'catalog:'
version: 7.6.1([email protected].0([email protected]([email protected])))([email protected]([email protected]))
version: 7.6.1([email protected].1([email protected]([email protected])))([email protected]([email protected]))
stylelint-scss:
specifier: 'catalog:'
version: 7.0.0([email protected]([email protected]))
@@ -1120,7 +1120,7 @@ importers:
version: 40.0.0([email protected]([email protected]))
stylelint-order:
specifier: 'catalog:'
version: 8.1.0([email protected]([email protected]))
version: 8.1.1([email protected]([email protected]))
internal/node-utils:
dependencies:
@@ -3140,8 +3140,13 @@ packages:
peerDependencies:
'@csstools/css-tokenizer': ^4.0.0
'@csstools/[email protected].0':
resolution: {integrity: sha512-H4tuz2nhWgNKLt1inYpoVCfbJbMwX/lQKp3g69rrrIMIYlFD9+zTykOKhNR8uGrAmbS/kT9n6hTFkmDkxLgeTA==}
'@csstools/[email protected].1':
resolution: {integrity: sha512-BvqN0AMWNAnLk9G8jnUT77D+mUbY/H2b3uDTvg2isJkHaOufUE2R3AOwxWo7VBQKT1lOdwdvorddo2B/lk64+w==}
peerDependencies:
css-tree: ^3.2.1
peerDependenciesMeta:
css-tree:
optional: true
'@csstools/[email protected]':
resolution: {integrity: sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==}
@@ -3766,8 +3771,8 @@ packages:
'@iconify-json/[email protected]':
resolution: {integrity: sha512-iMW8IT7suHRKVcHnci9wHKY79LU9mQ4rCAcVgKQQsI5SHoBi0r6z0leOXrI/oRCGJDiJDy9cLqweF3C5wSnm0A==}
'@iconify-json/[email protected]3':
resolution: {integrity: sha512-nQZTwul4c2zBqH/aLP4zMOiElj93T6HawbrP+sFQKpxmBdS5x1duCK3cAnkj6dntHz84EYkzaQRM83V2pj4qxA==}
'@iconify-json/[email protected]4':
resolution: {integrity: sha512-yqaohfY6jnYjTVpuTkaBQHrWbdUrQyWXhau0r/0EZiNWYXPX/P8WWwl1DoLH5CbvDjjcWQw5J0zADhgCUklOqA==}
'@iconify-json/[email protected]':
resolution: {integrity: sha512-ow+ueibMIq79ueM1kv6cOWgHx8jfh1XJQi2RrqMHb4HLbvIBlxpy5PCMvOJXlA68R6fBAHpWQeh6uWx7VKEVsA==}
@@ -5868,8 +5873,8 @@ packages:
peerDependencies:
vue: ^3.5.30
[email protected].3:
resolution: {integrity: sha512-ziS77lHL/EdiF6klFzo63WXWWF9SOMFwh1ZJWXpBvhY9RIpNFOau+BZKw+/HUHXF103bHSC0t7LWueMzm5BrIg==}
[email protected].4:
resolution: {integrity: sha512-05I8Iha+r2rZ12JwDBIi3XkeDv6r97LOgU0Num0Xbefsb5l0nZUsizJ/SZRFwT1pcAWa9K59aCy6HeirB2sNJg==}
[email protected]:
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
@@ -6051,8 +6056,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
[email protected].7:
resolution: {integrity: sha512-1ghYO3HnxGec0TCGBXiDLVns4eCSx4zJpxnHrlqFQajmhfKMQBzUGDdkMK7fUW7PTHTeLf+j87aTuKuuwWzMGw==}
[email protected].8:
resolution: {integrity: sha512-PCLz/LXGBsNTErbtB6i5u4eLpHeMfi93aUv5duMmj6caNu6IphS4q6UevDnL36sZQv9lrP11dbPKGMaXPwMKfQ==}
engines: {node: '>=6.0.0'}
hasBin: true
@@ -6172,8 +6177,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==}
[email protected]8:
resolution: {integrity: sha512-PN7uxFL+ExFJO61aVmP1aIEG4i9whQd4eoSCebav62UwDyp5OHh06zN4jqKSMePVgxHifCw1QJxdRkA1Pisekg==}
[email protected]9:
resolution: {integrity: sha512-U5og2PN7V4DMgF50YPNtnZJGWVLFjjsN3zb6uMT5VGYIewieDj1upwfuVNXf4Kor+89c3iCRJnSzMD5LmTvsfA==}
[email protected]:
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
@@ -10254,8 +10259,8 @@ packages:
peerDependencies:
stylelint: ^17.0.0
[email protected].0:
resolution: {integrity: sha512-ao2+VzToCqbAVGaEYEeSR2zNurvQx+86Kw1d0//kZDx3zlyjvb24dE4J0e4HQgOTruOwZpfaHHRtK58+lrsTAQ==}
[email protected].1:
resolution: {integrity: sha512-LqsEB6VggJuu5v10RtkrQsBObcdwBE7GuAOlwfc/LR3VL/w8UqKX2BOLIjhyGt0Gne/njo7gRNGiJAKhfmPMNw==}
engines: {node: '>=20.19.0'}
peerDependencies:
stylelint: ^16.18.0 || ^17.0.0
@@ -10585,8 +10590,8 @@ packages:
[email protected]:
resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==}
[email protected].2:
resolution: {integrity: sha512-P9J1HWYV/ajFr8uCqk5QixwiRKmB1wOamgS0e+o2Z4A44Ej2+thFVRLG/eA7qprx88XXhnV5Bl8LHXTURpzB3Q==}
[email protected].3:
resolution: {integrity: sha512-eJdUmK/Wrx2d+mnWWmwwLRyA7OQCkLap60sk3dOK4ViZR7DKwwptwuIvFBg2HaiP9ESaEdhtpSymQPvytpmkCA==}
engines: {node: '>=20.18.1'}
[email protected]:
@@ -12828,7 +12833,9 @@ snapshots:
dependencies:
'@csstools/css-tokenizer': 4.0.0
'@csstools/[email protected].0': {}
'@csstools/[email protected].1([email protected])':
optionalDependencies:
css-tree: 3.2.1
'@csstools/[email protected]': {}
@@ -13224,7 +13231,7 @@ snapshots:
dependencies:
'@iconify/types': 2.0.0
'@iconify-json/[email protected]3':
'@iconify-json/[email protected]4':
dependencies:
'@iconify/types': 2.0.0
@@ -15326,7 +15333,7 @@ snapshots:
vue-types: 3.0.2([email protected]([email protected]))
warning: 4.0.3
[email protected].3([email protected])([email protected]([email protected])):
[email protected].4([email protected])([email protected]([email protected])):
dependencies:
'@ant-design/colors': 7.2.1
'@ant-design/fast-color': 3.0.1
@@ -15481,7 +15488,7 @@ snapshots:
[email protected]([email protected]):
dependencies:
browserslist: 4.28.1
caniuse-lite: 1.0.30001778
caniuse-lite: 1.0.30001779
fraction.js: 5.3.4
picocolors: 1.1.1
postcss: 8.5.8
@@ -15570,7 +15577,7 @@ snapshots:
[email protected]: {}
[email protected].7: {}
[email protected].8: {}
[email protected]:
dependencies:
@@ -15616,8 +15623,8 @@ snapshots:
[email protected]:
dependencies:
baseline-browser-mapping: 2.10.7
caniuse-lite: 1.0.30001778
baseline-browser-mapping: 2.10.8
caniuse-lite: 1.0.30001779
electron-to-chromium: 1.5.313
node-releases: 2.0.36
update-browserslist-db: 1.2.3([email protected])
@@ -15715,11 +15722,11 @@ snapshots:
[email protected]:
dependencies:
browserslist: 4.28.1
caniuse-lite: 1.0.30001778
caniuse-lite: 1.0.30001779
lodash.memoize: 4.1.2
lodash.uniq: 4.5.0
[email protected]8: {}
[email protected]9: {}
[email protected]: {}
@@ -15764,7 +15771,7 @@ snapshots:
parse5: 7.3.0
parse5-htmlparser2-tree-adapter: 7.1.0
parse5-parser-stream: 7.1.2
undici: 7.24.2
undici: 7.24.3
whatwg-mimetype: 4.0.0
[email protected]:
@@ -20092,10 +20099,10 @@ snapshots:
postcss-html: 1.8.1
stylelint: 17.4.0([email protected])
[email protected]([email protected].0([email protected]([email protected])))([email protected]([email protected])):
[email protected]([email protected].1([email protected]([email protected])))([email protected]([email protected])):
dependencies:
stylelint: 17.4.0([email protected])
stylelint-order: 8.1.0([email protected]([email protected]))
stylelint-order: 8.1.1([email protected]([email protected]))
[email protected]([email protected])([email protected]([email protected])):
dependencies:
@@ -20123,7 +20130,7 @@ snapshots:
stylelint: 17.4.0([email protected])
stylelint-config-recommended: 18.0.0([email protected]([email protected]))
[email protected].0([email protected]([email protected])):
[email protected].1([email protected]([email protected])):
dependencies:
postcss: 8.5.8
postcss-sorting: 10.0.0([email protected])
@@ -20145,7 +20152,7 @@ snapshots:
dependencies:
'@csstools/css-calc': 3.1.1(@csstools/[email protected](@csstools/[email protected]))(@csstools/[email protected])
'@csstools/css-parser-algorithms': 4.0.0(@csstools/[email protected])
'@csstools/css-syntax-patches-for-csstree': 1.1.0
'@csstools/css-syntax-patches-for-csstree': 1.1.1([email protected])
'@csstools/css-tokenizer': 4.0.0
'@csstools/media-query-list-parser': 5.0.0(@csstools/[email protected](@csstools/[email protected]))(@csstools/[email protected])
'@csstools/selector-resolve-nested': 4.0.0([email protected])
@@ -20530,7 +20537,7 @@ snapshots:
[email protected]: {}
[email protected].2: {}
[email protected].3: {}
[email protected]:
dependencies:
@@ -20891,7 +20898,7 @@ snapshots:
dependencies:
'@docsearch/css': 3.8.2
'@docsearch/js': 3.8.2(@algolia/[email protected])([email protected])
'@iconify-json/simple-icons': 1.2.73
'@iconify-json/simple-icons': 1.2.74
'@shikijs/core': 2.5.0
'@shikijs/transformers': 2.5.0
'@shikijs/types': 2.5.0
+2 -2
View File
@@ -68,7 +68,7 @@ catalog:
'@vueuse/integrations': ^14.2.1
'@vueuse/motion': ^3.0.3
ant-design-vue: ^4.2.6
antdv-next: ^1.1.3
antdv-next: ^1.1.4
archiver: ^7.0.1
axios: ^1.13.6
axios-mock-adapter: ^2.1.0
@@ -148,7 +148,7 @@ catalog:
stylelint-config-recommended-scss: ^17.0.0
stylelint-config-recommended-vue: ^1.6.1
stylelint-config-standard: ^40.0.0
stylelint-order: ^8.1.0
stylelint-order: ^8.1.1
stylelint-scss: ^7.0.0
tailwind-merge: ^3.5.0
tailwindcss: ^4.2.1
-1
View File
@@ -168,7 +168,6 @@ function printResult(
`${UNICODE.FAILURE} ${totalCount} problem (${errorCount} errors, ${warningCount} warnings, ${suggestionsCount} suggestions)`,
),
);
// oxlint-disable-next-line no-unused-expressions
!check && process.exit(1);
} else {
consola.log(colors.green(`${UNICODE.SUCCESS} No problem`));