From b3c4d31088d438ffcf59cab8c5217c6b179b0be8 Mon Sep 17 00:00:00 2001 From: donny Date: Sat, 7 Oct 2023 11:24:29 +0800 Subject: [PATCH] fix(unicorn): rename `prefer-text-content` -> `prefer-dom-node-text-content` https://github.com/sindresorhus/eslint-plugin-unicorn/pull/959 --- src/configs/unicorn.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configs/unicorn.ts b/src/configs/unicorn.ts index c99ef31661..be19bd3e52 100644 --- a/src/configs/unicorn.ts +++ b/src/configs/unicorn.ts @@ -21,6 +21,8 @@ export function unicorn(): FlatESLintConfigItem[] { 'unicorn/no-new-buffer': 'error', // Lowercase number formatting for octal, hex, binary (0x1'error' instead of 0X1'error') 'unicorn/number-literal-case': 'error', + // textContent instead of innerText + 'unicorn/prefer-dom-node-text-content': 'error', // includes over indexOf when checking for existence 'unicorn/prefer-includes': 'error', // Prefer using the node: protocol @@ -29,8 +31,6 @@ export function unicorn(): FlatESLintConfigItem[] { 'unicorn/prefer-number-properties': 'error', // String methods startsWith/endsWith instead of more complicated stuff 'unicorn/prefer-string-starts-ends-with': 'error', - // textContent instead of innerText - 'unicorn/prefer-text-content': 'error', // Enforce throwing type error when throwing error while checking typeof 'unicorn/prefer-type-error': 'error', // Use new when throwing error