forcedotcom / forcedotcom/code-analyzer
[BUG][code-analyzer] SRR checks done for LWC which are non lightning__ServerRenderable or lightning__ServerRenderableWithHydration
まだ誰も着手していません。
- 主要言語
- 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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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