-
Notifications
You must be signed in to change notification settings - Fork 184
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
Fix FP S3800 (function-return-type
): Exception for sanitation functions
#4548
Conversation
32a4a88
to
87df62a
Compare
87df62a
to
dfd4587
Compare
Quality Gate passedIssues Measures |
@@ -1,37 +1,5 @@ | |||
{ | |||
"vuetify:packages/docs/src/examples/v-date-picker/event-events.vue": [ | |||
44 | |||
], |
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.
For information, I checked all the removed lines and can confirm that they are not triggering the rule anymore - they all belong to a sanitation function.
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.
👍
@@ -468,13 +491,6 @@ ruleTesterTs.run(`Functions should always return the same type [ts]`, rule, { | |||
}, | |||
], | |||
}, | |||
{ |
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.
This test was moved from the invalid list to the valid one.
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.
👍
@@ -533,6 +549,14 @@ ruleTesterTs.run(`Functions should always return the same type [ts]`, rule, { | |||
}, | |||
], | |||
}, | |||
{ | |||
code: ` |
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.
I added this test to guarantee that only functions with true
and string
return types are valid.
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.
👍
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.
LGTM!
@@ -1,37 +1,5 @@ | |||
{ | |||
"vuetify:packages/docs/src/examples/v-date-picker/event-events.vue": [ | |||
44 | |||
], |
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.
👍
@@ -468,13 +491,6 @@ ruleTesterTs.run(`Functions should always return the same type [ts]`, rule, { | |||
}, | |||
], | |||
}, | |||
{ |
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.
👍
@@ -533,6 +549,14 @@ ruleTesterTs.run(`Functions should always return the same type [ts]`, rule, { | |||
}, | |||
], | |||
}, | |||
{ | |||
code: ` |
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.
👍
Fixes #4527