Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple eslint errors with salesforce's LWC eslint config #181

Open
thesunlover opened this issue Aug 23, 2024 · 0 comments
Open

Multiple eslint errors with salesforce's LWC eslint config #181

thesunlover opened this issue Aug 23, 2024 · 0 comments

Comments

@thesunlover
Copy link

There are multiple 'for-in's that trigger eslint errors for the built version of the library:
119:4 error The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype guard-for-in
162:4 error The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype guard-for-in
replacing Object.keys(def).forEach(()=>{}) is going to iterate only on the actual properties on the 'def' object.

for (let key in def) { def[key] = parseDefinition(def[key]) }

I have tried setting my eslint config simliar to the author's, but I still get the same errors


{
  "extends": [
    "eslint:recommended",
    "@salesforce/eslint-config-lwc/recommended",
    "@locker/eslint-config-locker"
  ],
  	"env": {
		"browser": true,
		"node": true,
		"es6": true
	},
	"parserOptions": {
		"ecmaVersion": 2018,
		"sourceType": "module"
	},
	"rules": {
		"no-mixed-spaces-and-tabs": [
			"error",
			"smart-tabs"
		],
		"no-console": "off"
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant