Skip to content

Commit 68fb8d4

Browse files
authored
feat(lint/js): add useDomNodeTextContent (#9865)
1 parent cf4c1c9 commit 68fb8d4

15 files changed

Lines changed: 769 additions & 0 deletions

File tree

.changeset/cruel-pans-kick.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@biomejs/biome": patch
3+
---
4+
5+
Added the new nursery rule [`useDomNodeTextContent`](https://biomejs.dev/linter/rules/use-dom-node-text-content/), which prefers `textContent` over `innerText` for DOM node text access and destructuring.
6+
7+
For example, the following snippet triggers the rule:
8+
9+
```js
10+
const foo = node.innerText;
11+
```

.claude/skills/lint-rule-development/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ impl Rule for UseMyRuleName {
8787
}
8888
```
8989

90+
Note: It's critically important to follow the guidelines in the `High Quality Diagnostics` section below when writing diagnostics.
91+
9092
### Using Semantic Model
9193

9294
For rules that need binding analysis:

crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/biome_configuration/src/analyzer/linter/rules.rs

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/biome_configuration/src/generated/linter_options_check.rs

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/biome_diagnostics_categories/src/categories.rs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)