From d449393df8a2ac892fac6d3bd82a6c5ef3a2b286 Mon Sep 17 00:00:00 2001 From: Evan Rusackas Date: Mon, 23 Feb 2026 16:45:24 -0800 Subject: [PATCH] fix: pre-commit eslint-docs sed strips docs/ from developer_docs path The sed "s|docs/||g" flag removed ALL occurrences of "docs/" from file paths, mangling "developer_docs/sidebars.js" into "developer_sidebars.js". Use line-by-line processing with "^docs/" to only strip the leading prefix. Co-Authored-By: Claude Opus 4.6 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bc34e39bc24..a15303b2a3c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -83,7 +83,7 @@ repos: files: ^superset-frontend/.*\.(js|jsx|ts|tsx)$ - id: eslint-docs name: eslint (docs) - entry: bash -c 'cd docs && FILES=$(echo "$@" | sed "s|docs/||g") && yarn eslint --fix --quiet $FILES' + entry: bash -c 'cd docs && FILES=$(printf "%s\n" "$@" | sed "s|^docs/||" | tr "\n" " ") && yarn eslint --fix --quiet $FILES' language: system pass_filenames: true files: ^docs/.*\.(js|jsx|ts|tsx)$