-
- Notifications
You must be signed in to change notification settings - Fork 697
implements autofix in define-props-declaration (#2465) #2466
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
Open
mpiniarski wants to merge 28 commits into vuejs:master Choose a base branch from mpiniarski:feature/#2465_autofix_in_define-props-declaration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
28 commits Select commit Hold shift + click to select a range
4844612 feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski b770232 feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski 99e2f3e feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski f0294e8 feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski 5a4a15e feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski 583c0db feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski 4499597 feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski 17ac982 feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski 5e1d3b1 feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski bc506f9 feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski f301546 feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski 207477e feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski d08bed1 feat: autofix in `define-props-declaration`: runtime syntax to type-b…
mpiniarski 6cb7153 Update lib/rules/define-props-declaration.js
mpiniarski f6c205f fix: required default value = false
mpiniarski 536c6a1 feature: rename autoFixToSeparateInterface option and describe it in …
mpiniarski 100065d chore: extract fixTypeBased function
mpiniarski 7d9e731 chore: refactor fixTypeBased function
mpiniarski 0715943 chore: refactor componentPropsTypeCode creation
mpiniarski bbdc134 fix: fix tests failing
mpiniarski 2a1c654 feature: remove autoFixToSeparateInterface option
mpiniarski 7cdf3ff Merge branch 'master' into feature/#2465_autofix_in_define-props-decl…
mpiniarski 0e6ea56 Fix tests
FloEdelmann e9d4400 feature: code cleanup
mpiniarski 0bd915b Lint
FloEdelmann 1d58a2b feature: handle array as props list (#2465)
mpiniarski da17d74 feature: catch errors and ignore them (#2465)
mpiniarski 6634c2d feature: do not handle array prop declaration (#2465)
mpiniarski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feature: handle array as props list (#2465)
- Loading branch information
commit 1d58a2bf1716a7c5dd2bad68c15a7b04ba5a720f
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The array elements must be strings. The
kindvariable shouldn't auto-fix because we don't know what's actually in it.Could you leave this test as a test case for when not to auto-fix and add a new test case using a string literal?
https://vuejs.org/guide/components/props.html#props-declaration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, you're right. It does not default to a
string. Leaving it unhandled then.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add the test case you requested earlier?
#2466 (comment)