Validate Components During Development

To ensure your components can be used in offline environments, watch for and act on the recommendations of the static analyzer.
As you develop your Lightning web components, validation indicators, displayed as colored squiggly lines, appear under code to highlight that it violates a validation rule. Red lines indicate an error, and yellow lines indicate a warning.
Offline LWC validation error in VS Code
To fix an issue, hover over the problematic code. A pop-up appears near the code, describing what the problem is and how to fix it.
Offline LWC validation error in VS Code. Advice is displayed when you hover over the validation error.
  • You’ll see a description of the issue, along with the linting package that found the issue.
  • Click View Problem to highlight the code causing the issue, with a box underneath describing the issue and what linting package found the issue.
  • Click Quick Fix to show a dropdown of options of how to fix the issue. Then, select an option from the menu to automatically perform that fix.