43081j / 43081j/eslint-plugin-lit

rule: Expressions can occur in text content or in attribute value positions.

未關閉
#73 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
138
分支
26
平均合併
23 小時 29 分鐘
30 天內合併 PR
4

描述

would it be worth while (and, tractable) to have a rule that enforces the above lit-html constraint? the following concocted code, for example, causes an exception:
````
render(html`

`, $('body')[0])
````

while the following produces happiness
````
render(html`

`, $('body')[0])
````
(if that's what you were looking for.)

cheers.

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

該 issue 提議為 lit-html 新增一條新的 ESLint 規則,以強制表達式僅出現在文字內容或屬性值位置。先查看外掛中現有的規則實作,以瞭解 lit-html 範本的 AST 模式。查看表達式是如何被偵測與驗證的。透過檢查 lit-html 對表達式放置的限制來確定此規則的範圍。撰寫有效與無效案例的測試,然後在適當目錄中實作該規則。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
eslint, javascript, typescript
領域
devtools, testing-qa
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。