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'
'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],
],
// 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',
-/* eslint-disable @typescript-eslint/prefer-ts-expect-error */
+/* eslint-disable @typescript-eslint/ban-ts-comment */
import type { NativeElements, ReservedProps, VNode } from '@vue/runtime-dom'
/**
-/* 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'