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/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.jsIgnoring Warnings
Sometimes you just want to focus on the errors. The --quiet argument allows you to ignore warning messages during the linting process.