Lightning Lint Inspection no longer works with the Latest version of SFDX CLI
- When running Lightning Lint Inspection, the following Error is encountered:
- Error running Lightning Lint: › Warning: force:lightning:lint is not a sfdx command.Did you mean force:config:list? [y/n]: › Error: Run sfdx help force for a list of available commands.
- This error appeared after upgrading the sfdx cli to version “ 7.138.1-eb3bf03”
- Checking the release notes, it appears that the command was removed and that the following plugin should be used instead - “https://github.com/forcedotcom/eslint-plugin-aura”.
Comments (6)
-
repo owner -
repo owner Note that I've also reached out to some contacts at Salesforce about the state of this command since it's still part of the product documentation:
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/cli_usage.htm
Before I remove anything from IC2, I'd like to know the true fate of that command.
-
repo owner Okay, I just got confirmation from Salesforce that it has been removed and that the ESLint stuff is the logical replacement:
They're logging a bug on their side for the lingering docs. I'll remove the code inspection from IC2.
-
reporter HI Scott
What about non source based project structures. Many of our projects are in the old metadata/org based structures… ? Do we then just add the
.eslintrc.json
file where appropriate to make it work? -
repo owner Hi, Jason. Yes, there's nothing source format-specific about having
project.json
and.eslintrc.json
files. You can add those with the specified entries and either runnpm install
from the CLI or have the JetBrains IDE do it for you, and the IDE's support for ESLint should do the rest. Just make sure that you add the.eslintrc.json
file under theaura
folder so that it's properly scoped. Otherwise those rules will be applied to LWC, Visualforce, static resources, etc. -
repo owner - changed status to resolved
Removed the Lightning Lint code inspection in 2.2.0.9 and included the associated Salesforce deprecation/replacement details in the release notes.
- Log in to comment
Hi. Thanks for bringing this to my attention. It looks like the entire command
force:lightning:lint
has been retired in favor of the linked ESLint rules, and those rules are already baked into the standardpackage.json
andaura/.eslintrc.json
files that are created for a new SFDX project (and can be easily added to an existing project), e.g.:package.json
aura/.eslintrc.json
I'm not sure if there's anything for IC2 to do here other than perhaps remove its Lightning Lint bulk code inspection since it's no longer relevant.
Were you specifically looking for something else here?