forcedotcom / lightning-language-server

LWC and Aura Language Servers - shipped as part of the Salesforce VSCode Extensions
https://forcedotcom.github.io/salesforcedx-vscode/
BSD 3-Clause "New" or "Revised" License
31 stars 48 forks source link

Linter should ignore `__tests__` folder when invoking `@lwc/metadata` #588

Open nolanlawson opened 4 months ago

nolanlawson commented 4 months ago

Summary

Users are reporting (https://github.com/salesforce/sfdx-lwc-jest/issues/350) that import { createElement } from 'lwc' is showing a red squiggly in VS Code even though this is not considered a lint error anywhere else in the system (e.g. when running eslint on the command line or publishing via SFDX).

Our team looked into this, and we believe the solution is the following:

Steps To Reproduce:

  1. Add import { createElement } from 'lwc' to a __tests__ (Jest) test in an SFDX project.

Expected result

No red squiggly should appear.

Actual result

A red squiggly appears.

Additional information

Please see https://github.com/salesforce/sfdx-lwc-jest/issues/350 for the original bug report.

VS Code Version: Unknown

SFDX CLI Version: Unknown

OS and version: Unknown

BatemanVO commented 4 months ago

As requested from the previous thread: VS Code Version: 1.86.2, x64 SFDX CLI Version: 2.29.5 OS and version: Windows 10 22H2 Build 19045.4046

erocheleau commented 4 months ago

Same

EmilynPantelakis commented 3 months ago

I'm here to report the same issue.