Skip to content

Latest commit

 

History

History
201 lines (157 loc) · 5.74 KB

prefer-dom-node-text-content.mjs.md

File metadata and controls

201 lines (157 loc) · 5.74 KB

Snapshot report for test/prefer-dom-node-text-content.mjs

The actual snapshot is saved in prefer-dom-node-text-content.mjs.snap.

Generated by AVA.

Invalid #1

  1 | node.innerText;

Error 1/1

`␊
> 1 | node.innerText;␊
    |      ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊

--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
  1 | node.textContent;␊
`

Invalid #2

  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';␊
`

Invalid #3

  1 | innerText.innerText;

Error 1/1

`␊
> 1 | innerText.innerText;␊
    |           ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊

--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
  1 | innerText.textContent;␊
`

Invalid #4

  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;␊
`

Invalid #5

  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;␊
`

Invalid #6

  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;␊
`

Invalid #7

  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;␊
`

Invalid #8

  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;␊
`

Invalid #9

  1 | ({innerText} = node);

Error 1/1

`␊
> 1 | ({innerText} = node);␊
    |   ^^^^^^^^^ Prefer \`.textContent\` over \`.innerText\`.␊

--------------------------------------------------------------------------------␊
Suggestion 1/1: Switch to \`.textContent\`.␊
  1 | ({textContent: innerText} = node);␊
`

Invalid #10

  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);␊
`

Invalid #11

  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);␊
`

Invalid #12

  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);␊
`

Invalid #13

  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}␊
`

Invalid #14

  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);␊
`