Skip to content

Create ESLint plugin #322

@FloEdelmann

Description

@FloEdelmann

Package name: eslint-plugin-vue-ts-types

Possible rules:

no-any-prop

Reports use of anyProp.

prefer-array-prop

Reports objectProp<User[]> and suggests arrayProp<User> instead.

prefer-one-of-prop

Reports stringProp<'a' | 'b'> and numberProp<1 | 2> and suggests oneOfProp(['a', 'b'] as const) etc. instead.

require-one-of-prop-as-const

Reports use of oneOfProp([…]) without as const.

require-type-parameter

Reports use of prop functions without type parameter (by default only for arrayProp, objectProp, functionProp and oneOfTypesProp, but others can be configured).

require-vue-ts-types

Reports where vue-ts-types is not used (but should); autofix would be very helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions