-
Notifications
You must be signed in to change notification settings - Fork 4
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: Improve Control Renderer lint #392
Conversation
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.
Looks good, just some small remarks
…bjectLiteralExpression
89df70f
to
3651db5
Compare
src/linter/messages.ts
Outdated
@@ -333,6 +334,15 @@ export const MESSAGE_INFO = { | |||
details: () => `"{@link sap.ui.core.RenderManager#methods/icon RenderManager}",`, | |||
}, | |||
|
|||
[MESSAGE.NOT_STATIC_CONTROL_RENDERER]: { | |||
severity: LintMessageSeverity.Warning, | |||
ruleId: RULES["no-deprecated-api"], |
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 wouldn't expect this an deprecated API
, as it never was intended to be defined that way. Therefore I think we should use a different ruleId. Also, it is not related to UI5 2.x, but a general check.
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.
True, thanks!
But, to me this one seems too specific. Would static-var-required
be ok, 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.
Maybe ui5-class-declaration
, as it is about how UI5 classes are declared/defined.
What do you think @codeworrior / @flovogt / @RandomByte ?
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.
just another idea ui5-control-definition
?
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.
As the renderer
is not a general concept for UI5 classes, I rather tend to ui5-control-declaration
. But there might not be much in addition to this check that would justify a separate rule-ID for that. So I would be fine with ui5-class-declaration
, too.
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.
Changed it to ui5-class-declaration
. Let me know if something else comes
@sapui5/types