Having Trouble Setting Up ESLint on IntelliJ IDEA (LWC)

I used npm init to create a package.json file on the root of my project, I then installed locally:

npm install eslint babel-eslint @lwc/eslint-plugin-lwc --save-dev
npm install eslint @salesforce/eslint-config-lwc --save-dev

and updated .eslintrc.json file under force-app/main/default/lwc with

{
  "extends": ["@salesforce/eslint-config-lwc/recommended"]
}

However, IntelliJ is not highlighting linting issues. If I open the same project in Visual Studio the LWC I am working does have the linting issues highlighted (VS Code comes with ESLint configured when you install the Salesforce Plugin)

If I do change I add any characters after "recommended" I get an ESLint Error:

Error: Failed to load config "@salesforce/eslint-config-lwc/recommended2" to extend from.

so it is reading that .eslintrc.json file. Any ideas what I could be doing wrong? Is as if IntelliJ is not finding the rules inside ePayitonline

@salesforce/eslint-config-lwc/recommended
0

Please sign in to leave a comment.