forcedotcom / forcedotcom/code-analyzer

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

オープン
#2,049 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
240
フォーク
52
平均マージ
1日 23時間
マージ済み PR(30日)
5

説明

Have you tried to resolve this issue yourself first?
  • 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

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

docs/rules/ssr/ssr-no-static-imports-of-user-specific-scoped-modules.md から始め、レポートに記載されている LWC imports を使用して eslint スキャンを再現します。lightning__ServerRenderable または lightning__ServerRenderableWithHydration でマークされたコンポーネントでのみエラーが発生することを確認し、回帰テストで修正後の動作を確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。