The actual snapshot is saved in prefer-dom-node-text-content.mjs.snap
.
Generated by AVA.
1 | node.innerText;
Error 1/1
`␊
> 1 | node.innerText;␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | node.textContent;␊
`
1 | node.innerText = 'foo';
Error 1/1
`␊
> 1 | node.innerText = 'foo';␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | node.textContent = 'foo';␊
`
1 | innerText.innerText;
Error 1/1
`␊
> 1 | innerText.innerText;␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | innerText.textContent;␊
`
1 | const {innerText} = node;
Error 1/1
`␊
> 1 | const {innerText} = node;␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | const {textContent: innerText} = node;␊
`
1 | const {innerText,} = node;
Error 1/1
`␊
> 1 | const {innerText,} = node;␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | const {textContent: innerText,} = node;␊
`
1 | const {innerText: text} = node;
Error 1/1
`␊
> 1 | const {innerText: text} = node;␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | const {textContent: text} = node;␊
`
1 | const {innerText = "default text"} = node;
Error 1/1
`␊
> 1 | const {innerText = "default text"} = node;␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | const {textContent: innerText = "default text"} = node;␊
`
1 | const {innerText: text = "default text"} = node;
Error 1/1
`␊
> 1 | const {innerText: text = "default text"} = node;␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | const {textContent: text = "default text"} = node;␊
`
1 | ({innerText} = node);
Error 1/1
`␊
> 1 | ({innerText} = node);␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | ({textContent: innerText} = node);␊
`
1 | ({innerText: text} = node);
Error 1/1
`␊
> 1 | ({innerText: text} = node);␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | ({textContent: text} = node);␊
`
1 | ({innerText = "default text"} = node);
Error 1/1
`␊
> 1 | ({innerText = "default text"} = node);␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | ({textContent: innerText = "default text"} = node);␊
`
1 | ({innerText: text = "default text"} = node);
Error 1/1
`␊
> 1 | ({innerText: text = "default text"} = node);␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | ({textContent: text = "default text"} = node);␊
`
1 | function foo({innerText}) {return innerText}
Error 1/1
`␊
> 1 | function foo({innerText}) {return innerText}␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | function foo({textContent: innerText}) {return innerText}␊
`
1 | for (const [{innerText}] of elements);
Error 1/1
`␊
> 1 | for (const [{innerText}] of elements);␊
| ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊
␊
--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
1 | for (const [{textContent: innerText}] of elements);␊
`