Browse Source

fix: oxlint config (#7661)

* chore: engines node

* chore: update deps

* fix: oxlint

* chore: fix lint issues
pull/7670/head
xingyu 1 week ago
committed by GitHub
parent
commit
37d72c1628
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      docs/src/_env/adapter/form.ts
  2. 2
      docs/src/demos/vben-vxe-table/form/index.vue
  3. 2
      eslint.config.mjs
  4. 2
      internal/vite-config/src/plugins/extra-app-config.ts
  5. 2
      internal/vite-config/src/plugins/importmap.ts
  6. 6
      oxlint.config.ts
  7. 2
      package.json
  8. 2
      packages/@core/ui-kit/layout-ui/src/components/layout-content.vue
  9. 6
      packages/@core/ui-kit/shadcn-ui/src/components/full-screen/full-screen.vue
  10. 4
      packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue
  11. 1
      packages/effects/common-ui/src/components/captcha/slider-translate-captcha/index.vue
  12. 2
      packages/effects/common-ui/src/components/json-viewer/index.vue
  13. 1
      packages/effects/layouts/src/widgets/global-search/global-search.vue
  14. 2
      packages/effects/layouts/src/widgets/theme-toggle/theme-button.vue
  15. 81
      pnpm-lock.yaml
  16. 4
      pnpm-workspace.yaml
  17. 1
      scripts/vsh/src/publint/index.ts

1
docs/src/_env/adapter/form.ts

@ -10,7 +10,6 @@ import { $t } from '@vben/locales';
import { initComponentAdapter } from './component';
// oxlint-disable-next-line typescript/no-floating-promises
initComponentAdapter();
setupVbenForm<ComponentType>({

2
docs/src/demos/vben-vxe-table/form/index.vue

@ -112,7 +112,7 @@ const gridOptions: VxeGridProps<RowType> = {
},
toolbarConfig: {
//
// @ts-ignore
// @ts-ignore -
search: true,
},
};

2
eslint.config.mjs

@ -1,5 +1,3 @@
// @ts-check
import { defineConfig } from '@vben/eslint-config';
export default defineConfig();

2
internal/vite-config/src/plugins/extra-app-config.ts

@ -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}`,
),
);

2
internal/vite-config/src/plugins/importmap.ts

@ -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.');
}

6
oxlint.config.ts

@ -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);

2
package.json

@ -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": "pnpm@10.32.1"

2
packages/@core/ui-kit/layout-ui/src/components/layout-content.vue

@ -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 => {

6
packages/@core/ui-kit/shadcn-ui/src/components/full-screen/full-screen.vue

@ -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>

4
packages/@core/ui-kit/tabs-ui/src/components/tabs-chrome/tabs.vue

@ -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(() => {

1
packages/effects/common-ui/src/components/captcha/slider-translate-captcha/index.vue

@ -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';
}

2
packages/effects/common-ui/src/components/json-viewer/index.vue

@ -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';

1
packages/effects/layouts/src/widgets/global-search/global-search.vue

@ -82,7 +82,6 @@ const toggleKeydownListener = () => {
};
const toggleOpen = () => {
// oxlint-disable-next-line no-unused-expressions
open.value ? modalApi.close() : modalApi.open();
};

2
packages/effects/layouts/src/widgets/theme-toggle/theme-button.vue

@ -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) {

81
pnpm-lock.yaml

@ -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(vue@3.5.30(typescript@5.9.3))
antdv-next:
specifier: 'catalog:'
version: 1.1.3(date-fns@4.1.0)(vue@3.5.30(typescript@5.9.3))
version: 1.1.4(date-fns@4.1.0)(vue@3.5.30(typescript@5.9.3))
dayjs:
specifier: 'catalog:'
version: 1.11.20
@ -1089,7 +1089,7 @@ importers:
version: 5.0.1(stylelint@17.4.0(typescript@5.9.3))
stylelint-config-recess-order:
specifier: 'catalog:'
version: 7.6.1(stylelint-order@8.1.0(stylelint@17.4.0(typescript@5.9.3)))(stylelint@17.4.0(typescript@5.9.3))
version: 7.6.1(stylelint-order@8.1.1(stylelint@17.4.0(typescript@5.9.3)))(stylelint@17.4.0(typescript@5.9.3))
stylelint-scss:
specifier: 'catalog:'
version: 7.0.0(stylelint@17.4.0(typescript@5.9.3))
@ -1120,7 +1120,7 @@ importers:
version: 40.0.0(stylelint@17.4.0(typescript@5.9.3))
stylelint-order:
specifier: 'catalog:'
version: 8.1.0(stylelint@17.4.0(typescript@5.9.3))
version: 8.1.1(stylelint@17.4.0(typescript@5.9.3))
internal/node-utils:
dependencies:
@ -3140,8 +3140,13 @@ packages:
peerDependencies:
'@csstools/css-tokenizer': ^4.0.0
'@csstools/css-syntax-patches-for-csstree@1.1.0':
resolution: {integrity: sha512-H4tuz2nhWgNKLt1inYpoVCfbJbMwX/lQKp3g69rrrIMIYlFD9+zTykOKhNR8uGrAmbS/kT9n6hTFkmDkxLgeTA==}
'@csstools/css-syntax-patches-for-csstree@1.1.1':
resolution: {integrity: sha512-BvqN0AMWNAnLk9G8jnUT77D+mUbY/H2b3uDTvg2isJkHaOufUE2R3AOwxWo7VBQKT1lOdwdvorddo2B/lk64+w==}
peerDependencies:
css-tree: ^3.2.1
peerDependenciesMeta:
css-tree:
optional: true
'@csstools/css-tokenizer@4.0.0':
resolution: {integrity: sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==}
@ -3766,8 +3771,8 @@ packages:
'@iconify-json/octicon@1.2.21':
resolution: {integrity: sha512-iMW8IT7suHRKVcHnci9wHKY79LU9mQ4rCAcVgKQQsI5SHoBi0r6z0leOXrI/oRCGJDiJDy9cLqweF3C5wSnm0A==}
'@iconify-json/simple-icons@1.2.73':
resolution: {integrity: sha512-nQZTwul4c2zBqH/aLP4zMOiElj93T6HawbrP+sFQKpxmBdS5x1duCK3cAnkj6dntHz84EYkzaQRM83V2pj4qxA==}
'@iconify-json/simple-icons@1.2.74':
resolution: {integrity: sha512-yqaohfY6jnYjTVpuTkaBQHrWbdUrQyWXhau0r/0EZiNWYXPX/P8WWwl1DoLH5CbvDjjcWQw5J0zADhgCUklOqA==}
'@iconify-json/vscode-icons@1.2.45':
resolution: {integrity: sha512-ow+ueibMIq79ueM1kv6cOWgHx8jfh1XJQi2RrqMHb4HLbvIBlxpy5PCMvOJXlA68R6fBAHpWQeh6uWx7VKEVsA==}
@ -5868,8 +5873,8 @@ packages:
peerDependencies:
vue: ^3.5.30
antdv-next@1.1.3:
resolution: {integrity: sha512-ziS77lHL/EdiF6klFzo63WXWWF9SOMFwh1ZJWXpBvhY9RIpNFOau+BZKw+/HUHXF103bHSC0t7LWueMzm5BrIg==}
antdv-next@1.1.4:
resolution: {integrity: sha512-05I8Iha+r2rZ12JwDBIi3XkeDv6r97LOgU0Num0Xbefsb5l0nZUsizJ/SZRFwT1pcAWa9K59aCy6HeirB2sNJg==}
anymatch@3.1.3:
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
@ -6051,8 +6056,8 @@ packages:
base64-js@1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
baseline-browser-mapping@2.10.7:
resolution: {integrity: sha512-1ghYO3HnxGec0TCGBXiDLVns4eCSx4zJpxnHrlqFQajmhfKMQBzUGDdkMK7fUW7PTHTeLf+j87aTuKuuwWzMGw==}
baseline-browser-mapping@2.10.8:
resolution: {integrity: sha512-PCLz/LXGBsNTErbtB6i5u4eLpHeMfi93aUv5duMmj6caNu6IphS4q6UevDnL36sZQv9lrP11dbPKGMaXPwMKfQ==}
engines: {node: '>=6.0.0'}
hasBin: true
@ -6172,8 +6177,8 @@ packages:
caniuse-api@3.0.0:
resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==}
caniuse-lite@1.0.30001778:
resolution: {integrity: sha512-PN7uxFL+ExFJO61aVmP1aIEG4i9whQd4eoSCebav62UwDyp5OHh06zN4jqKSMePVgxHifCw1QJxdRkA1Pisekg==}
caniuse-lite@1.0.30001779:
resolution: {integrity: sha512-U5og2PN7V4DMgF50YPNtnZJGWVLFjjsN3zb6uMT5VGYIewieDj1upwfuVNXf4Kor+89c3iCRJnSzMD5LmTvsfA==}
ccount@2.0.1:
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
@ -10254,8 +10259,8 @@ packages:
peerDependencies:
stylelint: ^17.0.0
stylelint-order@8.1.0:
resolution: {integrity: sha512-ao2+VzToCqbAVGaEYEeSR2zNurvQx+86Kw1d0//kZDx3zlyjvb24dE4J0e4HQgOTruOwZpfaHHRtK58+lrsTAQ==}
stylelint-order@8.1.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:
undici-types@7.18.2:
resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==}
undici@7.24.2:
resolution: {integrity: sha512-P9J1HWYV/ajFr8uCqk5QixwiRKmB1wOamgS0e+o2Z4A44Ej2+thFVRLG/eA7qprx88XXhnV5Bl8LHXTURpzB3Q==}
undici@7.24.3:
resolution: {integrity: sha512-eJdUmK/Wrx2d+mnWWmwwLRyA7OQCkLap60sk3dOK4ViZR7DKwwptwuIvFBg2HaiP9ESaEdhtpSymQPvytpmkCA==}
engines: {node: '>=20.18.1'}
unenv@2.0.0-rc.24:
@ -12828,7 +12833,9 @@ snapshots:
dependencies:
'@csstools/css-tokenizer': 4.0.0
'@csstools/css-syntax-patches-for-csstree@1.1.0': {}
'@csstools/css-syntax-patches-for-csstree@1.1.1(css-tree@3.2.1)':
optionalDependencies:
css-tree: 3.2.1
'@csstools/css-tokenizer@4.0.0': {}
@ -13224,7 +13231,7 @@ snapshots:
dependencies:
'@iconify/types': 2.0.0
'@iconify-json/simple-icons@1.2.73':
'@iconify-json/simple-icons@1.2.74':
dependencies:
'@iconify/types': 2.0.0
@ -15326,7 +15333,7 @@ snapshots:
vue-types: 3.0.2(vue@3.5.30(typescript@5.9.3))
warning: 4.0.3
antdv-next@1.1.3(date-fns@4.1.0)(vue@3.5.30(typescript@5.9.3)):
antdv-next@1.1.4(date-fns@4.1.0)(vue@3.5.30(typescript@5.9.3)):
dependencies:
'@ant-design/colors': 7.2.1
'@ant-design/fast-color': 3.0.1
@ -15481,7 +15488,7 @@ snapshots:
autoprefixer@10.4.27(postcss@8.5.8):
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:
base64-js@1.5.1: {}
baseline-browser-mapping@2.10.7: {}
baseline-browser-mapping@2.10.8: {}
better-path-resolve@1.0.0:
dependencies:
@ -15616,8 +15623,8 @@ snapshots:
browserslist@4.28.1:
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(browserslist@4.28.1)
@ -15715,11 +15722,11 @@ snapshots:
caniuse-api@3.0.0:
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
caniuse-lite@1.0.30001778: {}
caniuse-lite@1.0.30001779: {}
ccount@2.0.1: {}
@ -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
chokidar@4.0.3:
@ -20092,10 +20099,10 @@ snapshots:
postcss-html: 1.8.1
stylelint: 17.4.0(typescript@5.9.3)
stylelint-config-recess-order@7.6.1(stylelint-order@8.1.0(stylelint@17.4.0(typescript@5.9.3)))(stylelint@17.4.0(typescript@5.9.3)):
stylelint-config-recess-order@7.6.1(stylelint-order@8.1.1(stylelint@17.4.0(typescript@5.9.3)))(stylelint@17.4.0(typescript@5.9.3)):
dependencies:
stylelint: 17.4.0(typescript@5.9.3)
stylelint-order: 8.1.0(stylelint@17.4.0(typescript@5.9.3))
stylelint-order: 8.1.1(stylelint@17.4.0(typescript@5.9.3))
stylelint-config-recommended-scss@17.0.0(postcss@8.5.8)(stylelint@17.4.0(typescript@5.9.3)):
dependencies:
@ -20123,7 +20130,7 @@ snapshots:
stylelint: 17.4.0(typescript@5.9.3)
stylelint-config-recommended: 18.0.0(stylelint@17.4.0(typescript@5.9.3))
stylelint-order@8.1.0(stylelint@17.4.0(typescript@5.9.3)):
stylelint-order@8.1.1(stylelint@17.4.0(typescript@5.9.3)):
dependencies:
postcss: 8.5.8
postcss-sorting: 10.0.0(postcss@8.5.8)
@ -20145,7 +20152,7 @@ snapshots:
dependencies:
'@csstools/css-calc': 3.1.1(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0)
'@csstools/css-parser-algorithms': 4.0.0(@csstools/css-tokenizer@4.0.0)
'@csstools/css-syntax-patches-for-csstree': 1.1.0
'@csstools/css-syntax-patches-for-csstree': 1.1.1(css-tree@3.2.1)
'@csstools/css-tokenizer': 4.0.0
'@csstools/media-query-list-parser': 5.0.0(@csstools/css-parser-algorithms@4.0.0(@csstools/css-tokenizer@4.0.0))(@csstools/css-tokenizer@4.0.0)
'@csstools/selector-resolve-nested': 4.0.0(postcss-selector-parser@7.1.1)
@ -20530,7 +20537,7 @@ snapshots:
undici-types@7.18.2: {}
undici@7.24.2: {}
undici@7.24.3: {}
unenv@2.0.0-rc.24:
dependencies:
@ -20891,7 +20898,7 @@ snapshots:
dependencies:
'@docsearch/css': 3.8.2
'@docsearch/js': 3.8.2(@algolia/client-search@5.49.2)(search-insights@2.17.3)
'@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

4
pnpm-workspace.yaml

@ -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
scripts/vsh/src/publint/index.ts

@ -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`));

Loading…
Cancel
Save