{"id":18770,"library":"salesforce-lightning-cli","title":"Salesforce Lightning CLI","description":"Salesforce Lightning CLI (v3.0.0) is a code review tool for scanning Lightning component code for issues related to LockerService. It is based on ESLint and flags unsupported/private APIs, incorrect component code, and general JS issues. It is bundled with Salesforce CLI and also available as a Heroku plugin. It has two rule sets: unmodifiable security rules and customizable style rules. The project appears to be in maintenance mode, with the preferred usage now being through sfdx force:lightning:lint. No updates since 2018.","status":"maintenance","version":"3.0.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","salesforce","heroku-plugin","lightning","aura"],"install":[{"cmd":"npm install salesforce-lightning-cli","lang":"bash","label":"npm"},{"cmd":"yarn add salesforce-lightning-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add salesforce-lightning-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Lightning CLI is built on top of ESLint and uses its rule engine.","package":"eslint","optional":true},{"reason":"Can be installed as a Heroku plugin via heroku plugins:install.","package":"@heroku-cli/plugin","optional":true}],"imports":[{"note":"The preferred way to run is via sfdx, not heroku. The heroku plugin is legacy.","wrong":"heroku lightning:lint [path]","symbol":"Lightning CLI","correct":"sfdx force:lightning:lint [path]"},{"note":"Config file path must come after the folder path. Only style rules can be overridden.","wrong":"sfdx force:lightning:lint --config [file] [path]","symbol":"Custom rules config","correct":"sfdx force:lightning:lint [path] --config [file]"},{"note":"The --files argument accepts glob patterns. Use double asterisk for recursive matching.","wrong":"sfdx force:lightning:lint [path] --files *.js","symbol":"Filtering files","correct":"sfdx force:lightning:lint [path] --files **/*Controller.js"}],"quickstart":{"code":"sfdx force:lightning:lint ./path/to/lightning/components/ --files **/*Controller.js --verbose","lang":"javascript","description":"Runs Lightning CLI linting on a directory, filtering to controller files, and showing warnings."},"warnings":[{"fix":"Install Salesforce CLI from https://developer.salesforce.com/tools/sfdxcli and run `sfdx force:lightning:lint`.","message":"The Heroku plugin installation method is deprecated. Use Salesforce CLI (sfdx) instead.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Use Metadata API or Force.com IDE to download components to your machine before linting.","message":"Lightning CLI only runs on local files. It does not fetch code from the server.","severity":"gotcha","affected_versions":"*"},{"fix":"Security rules are non-modifiable. Copy the default style rules file from lib/code-style-rules.js and modify those.","message":"The --config argument only allows customization of style rules, not security rules.","severity":"gotcha","affected_versions":"*"},{"fix":"Consider migrating to newer linting tools that support Lightning Web Security.","message":"LockerService is being deprecated in favor of Lightning Web Security. Lightning CLI may not be updated for new security requirements.","severity":"deprecated","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install Heroku Toolbelt from https://devcenter.heroku.com/articles/getting-started-with-nodejs#set-up, or use Salesforce CLI instead.","cause":"Heroku Toolbelt is not installed or not in PATH.","error":"'heroku' is not recognized as an internal or external command"},{"fix":"Run `heroku plugins:install salesforce-lightning-cli` or use `sfdx force:lightning:lint` which is bundled with Salesforce CLI.","cause":"Plugin not installed or incorrect installation path.","error":"Error: Cannot find module 'salesforce-lightning-cli'"},{"fix":"Verify the directory path and the glob pattern. Use recursive glob (double asterisk) if files are in subdirectories.","cause":"The --files pattern did not match any files in the specified directory.","error":"No files matching pattern: **/*Controller.js"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}