Closed offlineforce closed 4 years ago
Today the LWC eslint rules are defined in the package eslint-plugin-lwc. However this package is reserved for LWC OSS relevant rules.
In order to add those rules, we will probably need to create a new package and reference it in the config.
LWC priming will only work properly for components whose dependencies can be successfully identified. The DependencyAnalyzer code on the server performs the dependency analysis for wires and nested components.
We need to:
Here are a list of rules identified so far ,
Reject if the wire adapter is not among the list of supported wire adapters imported from the following list force/lds, lightning/navigation, force/recordEditStateService, one/layoutContainerLib
Reject if a wire config parameter is not a public property , or not a wire property or not imported from @salesforce scoped modules
Reject if the component makes server calls using fetch api or XMLHttpRequest
Reject if resource urls specified in loadScript and loadStyle calls are not imported from @salesforce scoped modules
reference doc: https://salesforce.quip.com/aFUuAVlygW1M reference code : https://git.soma.salesforce.com/lwc/eslint-plugin-lwc/compare/master...preeti-dave:offlinecomponentrules?expand=1
cc: @trevor-bliss @kevinv11n @jbenallen