1

I have some JS files in a static resource. I pulled code from a Production org and converted to DX format for convenience. I am noticing when I open them in VSCode I get errors like "LWC1007: c:\foo\detailController.js: Unexpected reserved word 'package' (887:44)"

However this JS file does not contain a Lightning Web Component. It's a static resource we use in Visualforce.

Any ideas what I need to do to stop VSCode from treating it like it's LWC?

  • Do you happen to have a file called .eslintrc.json in the staticresource folder or any of the parent folders? That could be causing this problem. – sfdcfox May 2 at 19:10
  • Good question... not that I can see. There are two OTHER static resources with .eslintrc files but not these ones. – Charles T May 2 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.