Newer Version Available
Use Salesforce Lightning CLI
Run Lightning CLI just like any
other lint command-line tool. The only trick is invoking it through the heroku command. Your shell window shows the results.
Normal Use
You can run the Lightning CLI linter on any folder that contains Lightning components:
1heroku lightning:lint ./path/to/lightning/components/The default output only shows errors. To see warnings too, use the verbose mode option.
See “Review and Resolve Problems” for what to do with the output of running Lightning CLI.
Common Options
Filtering Files
Sometimes, you just want to scan a particular kind of file. The --files argument allows you to set a pattern to match files against.
For example, the following command allows you to scan controllers only:
1heroku lightning:lint ./path/to/lightning/components/ --files **/*Controller.jsVerbose Mode
The default output only shows errors so you can focus on bigger issues. The --verbose argument allows you to see warning messages and errors during the linting process.