]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore(lint): replace deprecated `tseslint.config` and `prefer-ts-expect-error` (...
authorVida Xie <vida_2020@163.com>
Wed, 5 Nov 2025 09:04:12 +0000 (17:04 +0800)
committerGitHub <noreply@github.com>
Wed, 5 Nov 2025 09:04:12 +0000 (17:04 +0800)
eslint.config.js
packages/vue/jsx-runtime/index.d.ts
packages/vue/jsx.d.ts

index b752b2e19f15ef4190fce5ddcf92d9da11375d90..2b472e14d1e1af6c02610e98373542ed2a84e650 100644 (file)
@@ -1,5 +1,6 @@
 import importX from 'eslint-plugin-import-x'
 import tseslint from 'typescript-eslint'
+import { defineConfig } from 'eslint/config'
 import vitest from '@vitest/eslint-plugin'
 import { builtinModules } from 'node:module'
 
@@ -12,7 +13,7 @@ const banConstEnum = {
     'Please use non-const enums. This project automatically inlines enums.',
 }
 
-export default tseslint.config(
+export default defineConfig(
   {
     files: ['**/*.js', '**/*.ts', '**/*.tsx'],
     extends: [tseslint.configs.base],
@@ -60,7 +61,10 @@ export default tseslint.config(
       ],
       // This rule enforces the preference for using '@ts-expect-error' comments in TypeScript
       // code to indicate intentional type errors, improving code clarity and maintainability.
-      '@typescript-eslint/prefer-ts-expect-error': 'error',
+      '@typescript-eslint/ban-ts-comment': [
+        'error',
+        { minimumDescriptionLength: 0 },
+      ],
       // Enforce the use of 'import type' for importing types
       '@typescript-eslint/consistent-type-imports': [
         'error',
index af5ffe2ac243671f5aa555f8f7ca265aa74e5af0..28071b75afeb63e63a31685f84cb44b1922642a0 100644 (file)
@@ -1,4 +1,4 @@
-/* eslint-disable @typescript-eslint/prefer-ts-expect-error */
+/* eslint-disable @typescript-eslint/ban-ts-comment */
 import type { NativeElements, ReservedProps, VNode } from '@vue/runtime-dom'
 
 /**
index 1fa1e32667644cad4d6a0166d450228ce764fd96..cfea000826b262399872727d34f96de672deed10 100644 (file)
@@ -1,4 +1,4 @@
-/* eslint-disable @typescript-eslint/prefer-ts-expect-error */
+/* eslint-disable @typescript-eslint/ban-ts-comment */
 // global JSX namespace registration
 // somehow we have to copy=pase the jsx-runtime types here to make TypeScript happy
 import type { NativeElements, ReservedProps, VNode } from '@vue/runtime-dom'