Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Static Analyzer Validation Rules

The static analyzer validates that various code constructs and references in Lightning web components, such as wire decorators and server calls, support offline priming. The majority of the rules focus on determining whether all code dependencies, such as imports and modules, can be resolved; or on correct usage of offline-compatible wire adapters.

Using a wire provides an efficient and mostly transparent mechanism to deliver required data for a given set of Lightning web components. Today, not all wire adapters are enabled for offline use, and even those that are must be used correctly to work while offline. Without a properly formatted wire, the number of network requests increases, components render slowly, and performance suffers.

For offline support, mobile apps at Salesforce use these wires to ensure the correct data for each record and its components are always ready to use. A wire that doesn’t align with the validation rules defined in this package can result in features implemented with Lightning web components not working correctly when offline.

For more information on wires and how to use them, see Use the Wire Service to Get Data in the Lightning Web Components Developer Guide.