Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ESLint plugin #322

Open
FloEdelmann opened this issue May 10, 2023 · 2 comments
Open

Create ESLint plugin #322

FloEdelmann opened this issue May 10, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@FloEdelmann
Copy link
Owner

FloEdelmann commented May 10, 2023

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

Possible rules:

vue-ts-types/no-any-prop

Reports use of anyProp.

vue-ts-types/prefer-array-prop

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

vue-ts-types/prefer-one-of-prop

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

vue-ts-types/require-one-of-prop-as-const

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

vue-ts-types/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).

vue-ts-types/require-vue-ts-types

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

@FloEdelmann FloEdelmann added the enhancement New feature or request label May 10, 2023
@FloEdelmann
Copy link
Owner Author

@jhoermann
Copy link
Contributor

@FloEdelmann Better create a sub-package in the same monorepo. Maybe even scoped like @vue-ts-types/eslint-plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants