From 1b9c98269e1eddd14f42614209ac627e3f407c8e Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Sun, 12 Oct 2025 21:24:05 +0800 Subject: [PATCH] Enable `@stylistic/no-trailing-spaces` rule (#18060) --- eslint.config.js | 1 + src/main/get-cursor-node.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index dd28a30bd..5c4fdbd60 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -153,6 +153,7 @@ const configs = [ }, ], "@stylistic/spaced-comment": "error", + "@stylistic/no-trailing-spaces": "error", /* @typescript-eslint/eslint-plugin */ "@typescript-eslint/prefer-ts-expect-error": "error", diff --git a/src/main/get-cursor-node.js b/src/main/get-cursor-node.js index abb19e8b4..c6bffb4d1 100644 --- a/src/main/get-cursor-node.js +++ b/src/main/get-cursor-node.js @@ -4,14 +4,14 @@ import createGetVisitorKeysFunction from "./create-get-visitor-keys-function.js" /** * Find the location of the cursor in the AST, represented in one of the * following ways: - * + * * { "cursorNode": } - the cursor is WITHIN - + * * { "nodeBeforeCursor": | undefined, * "nodeAfterCursor": | undefined } * - the cursor is BETWEEN and . `undefined` represents the * beginning or end of the document. - * + * * This function will return whichever of the above possibilities most * precisely identifies the cursor's location. This means returning a * "cursorNode" when the cursor lies within a leaf node of the AST, and one of