forcedotcom / forcedotcom/code-analyzer

[BUG][code-analyzer] SRR checks done for LWC which are non lightning__ServerRenderable or lightning__ServerRenderableWithHydration

Offen
#2,049 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
240
Forks
52
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
5

Beschreibung

### Have you tried to resolve this issue yourself first?

- [x] I confirm I have gone through the above steps and still have an issue to report.

### Bug Description

Create a simple LWC, with

`import hasDelegatedAdmin from '@salesforce/customPermission/DelegatedAdmin';`
or any

- @salesforce/user/*
- @salesforce/userPermission/*
- @salesforce/customPermission/*

Run the code analyser eslint scan, the error show up.
https://github.com/salesforce/eslint-plugin-lwc/blob/v3.5.0/docs/rules/ssr/ssr-no-static-imports-of-user-specific-scoped-modules.md
The LWC component is neither marked with lightning__ServerRenderable nor lightning__ServerRenderableWithHydration

### Output / Logs

```shell

```

### Steps To Reproduce

Check Description.

### Expected Behavior

The error should happen only for LWCs components with lightning__ServerRenderable nor lightning__ServerRenderableWithHydration

### Operating System

Any

### Salesforce CLI Version

@salesforce/cli/2.136.8 darwin-arm64 node-v22.22.2

### Code Analyzer Plugin (code-analyzer) Version

code-analyzer 5.12.0 (5.12.0)

### Node Version

_No response_

### Java Version

_No response_

### Python Version

_No response_

### Additional Context (Screenshots, Files, etc)

_No response_

### Workaround

Suppress or lower the error to warning.

### Urgency

High

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit docs/rules/ssr/ssr-no-static-imports-of-user-specific-scoped-modules.md und reproduziere den eslint-Scan unter Verwendung der im Bericht aufgeführten LWC-Imports. Überprüfe, dass der Fehler nur bei Komponenten auftritt, die mit lightning__ServerRenderable oder lightning__ServerRenderableWithHydration gekennzeichnet sind, und bestätige das korrigierte Verhalten mit einem Regressionstest.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.