Questions tagged [eslint]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
34 views

ESLint/prettier conflict when using cumulusci namespace placeholder in Apex

I am getting the below error when I run npm run prettier and when I commit (since I have a husky hook) a couple of Apex classes that use namespace placeholders . Error: Found punctuation symbol or ...
dangt85's user avatar
  • 165
0 votes
1 answer
410 views

Parsing error: Unexpected token day

When trying to commit the eslint precommit is running and getting the error: 3:9 error Parsing error: Unexpected token day and prevent the commit from happen I'm executing this example commit: PS C:\...
Leto's user avatar
  • 532
3 votes
1 answer
1k views

@api setter invalid reassignment of public property

I am using @api setter to update variable and I receive "invalid reassignment of public property". How can I fix it? I thought problem with my logic and removed everything and nothing is ...
ravipo's user avatar
  • 43
1 vote
1 answer
28 views

Terminal error (esLint) related to hasOwnProperty when compiling

Even the code working good… i am getting this error on terminal. if (response.product.hasOwnProperty('availabilityForPickup') { //Do something... } Do not access Object.prototype method '...
LuizEduardoMPF's user avatar
0 votes
1 answer
544 views

Apex (Salesforce) - How to silence "File ignored because of a matching ignore pattern"

I am trying to remove all errors related to eslint and I successfully did it by adding /force-app/main/default/ into my .eslintignore file. But the problem is, now I get this warning: File ignored ...
mhdev's user avatar
  • 119
0 votes
0 answers
385 views

ESlint and Salesforce

Does anyone know how to properly configure eslint config file and where to put it in Salesforce. I need to disable some rules and I found that, for example, if I want to disable "ApexDoc" ...
mhdev's user avatar
  • 119
1 vote
1 answer
1k views

How to resolve @lwc/lwc/no-unknown-wire-adapters linting errors in LWC?

In a new project I am getting eslint errors like: 6:10 error "getObjectInfo" from "lightning/uiObjectInfoApi" is not a known adapter @lwc/lwc/no-unknown-wire-adapters The ...
Jelle van Geuns's user avatar
0 votes
1 answer
79 views

What values to put into npm init when following workaround instructions to get eslint working in sfdx project?

I'm experiencing the same problem as the poser of this question: Why is ESLint not working properly for Lightning Web Components in VS Code and how to make it work? One of the steps is to run npm init ...
123's user avatar
  • 3
4 votes
2 answers
6k views

Why is ESLint not working properly for Lightning Web Components in VS Code and how to make it work?

I'm trying to set up an environment to play around with LWCs. While doing a Analyze Your Code and Deploy It to Your Org unit from the Set Up Your Lightning Web Components Developer Tools module on ...
Przemysław Długoszewski-Tamoń's user avatar
1 vote
0 answers
175 views

LWC eslint rule [closed]

I am in VSCODE and trying to set eslint rule for LWC using https://github.com/salesforce/eslint-plugin-lwc I am unable to set it up properly and lint rules are not firing. Can anybody help me here who ...
Avijit Chakraborty's user avatar