TypeScript type definitions for eslint-plugin-vue compatible with ESLint 9.x.
ESLint 9.x has stricter type definitions that expect all rules to have type
RuleEntry<any[]>, but many Vue plugin rules with empty schemas have type
RuleEntry<[]> (empty tuple), which TypeScript considers incompatible.
This package provides properly typed definitions that resolve the incompatibility between Vue plugin rules and ESLint 9's type requirements.
npm install --save-dev @poupe/eslint-plugin-vue-types
# or
yarn add -D @poupe/eslint-plugin-vue-types
# or
pnpm add -D @poupe/eslint-plugin-vue-typesConfigure your tsconfig.json to use these types instead of the default ones:
{
"compilerOptions": {
"paths": {
"eslint-plugin-vue": ["node_modules/@poupe/eslint-plugin-vue-types"]
}
}
}Import from this package instead of eslint-plugin-vue:
import vuePlugin from '@poupe/eslint-plugin-vue-types';
// or
import { VueRuleDefinitions } from '@poupe/eslint-plugin-vue-types';VuePlugin- Properly typed Vue plugin interfaceVueConfig- Vue ESLint configuration typeVueRuleDefinitions- All Vue rule definitions with proper ESLint 9.x compatible types- Individual rule option types (e.g.,
VueArrayBracketNewline,VueAttributeHyphenation, etc.)
pnpm buildpnpm type-checkpnpm lintMIT