-
Notifications
You must be signed in to change notification settings - Fork 30
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
Suppressing remaining lint warnings. #47
Conversation
@api | ||
titleValue = ""; | ||
|
||
@track | ||
@api | ||
descriptionValue = ""; |
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.
I've not seen this warning, locally. It feels erroneous, given that there is no "child" component being implemented in this use case.
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.
Did you update to v0.7.1 of eslint graph analyzer?
@@ -55,6 +56,7 @@ export default class FileUpload extends LightningElement { | |||
this.descriptionValue = ""; | |||
this.errorMessage = ""; | |||
} | |||
/* eslint-enable @lwc/lwc/no-api-reassignments */ |
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.
Because @api
is now used new lint warning was shown. It seems as though the rules @salesforce/lwc-graph-analyzer/no-composition-unanalyzable-property-non-public
and @lwc/lwc/no-api-reassignments
work so well together.
For now I suppressed the warnings between 38-59.
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.
@@ -15,26 +15,27 @@ export default class FileUpload extends LightningElement { | |||
@track | |||
uploadingFile = false; | |||
|
|||
@track | |||
@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.
4620de8
to
533efa7
Compare
533efa7
to
ee12983
Compare
@khawkins FYI, verified that removing template from |
@@ -11,6 +10,7 @@ export default class ErrorPanel extends LightningElement { | |||
|
|||
viewDetails = false; | |||
|
|||
@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 bother to make this @api
. From Komaci's standpoint, it's not analyzable anyway, and it's not otherwise necessary to be exposed to components using this one in their composition.
Lint warnings for some html files will be left untouched. This is because Komaci's static analysis is too aggressive in enforcing its rule. The code is still valid even with the warnings. We need Komaci to be more flexible instead.
Interesting note. Eslint plugin cannot suppress lint warnings in html using
//eslint-disable
variants. It may be a feature which we may need to look into in eslint-plugin-lwc-graph-analyzer.