{"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,"search_vec":"'2018':86 'also':46 'api':31 'appear':66 'aura':93 'avail':47 'base':25 'bundl':41 'cli':3,6,44 'code':10,17,34 'compon':16,33 'customiz':61 'eslint':27 'flag':29 'forc':80 'general':36 'heroku':50,90 'heroku-plugin':89 'incorrect':32 'issu':19,38 'javascript':87 'js':37 'lightn':2,5,15,81,92 'lint':82 'lockerservic':22 'mainten':70 'mode':71 'plugin':51,91 'prefer':74 'project':65 'relat':20 'review':11 'rule':55,59,63 'salesforc':1,4,43,88 'scan':14 'secur':58 'set':56 'sfdx':79 'sinc':85 'style':62 'tool':12 'two':54 'unmodifi':57 'unsupported/private':30 'updat':84 'usag':75 'v3.0.0':7","created_at":"2026-04-25T07:40:02.418560+00:00","updated_at":"2026-04-25T07:40:02.418560+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/salesforce-lightning-cli","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}