mirror of
https://github.com/apache/superset.git
synced 2026-04-24 18:44:53 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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)$
|
||||
|
||||
Reference in New Issue
Block a user