This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch feat/glyph-single-file
in repository https://gitbox.apache.org/repos/asf/superset.git

commit f3e6a409484827087f671f7a77b8bf29f876191d
Author: Evan Rusackas <[email protected]>
AuthorDate: Mon May 25 19:03:32 2026 -0700

    chore(precommit): add full-tsc pre-push hook for frontend
    
    The existing type-checking-frontend hook runs targeted (per-file) tsc on
    pre-commit, which catches most errors but can miss some that the full
    project-wide check picks up. CI already runs `npm run type` (full tsc),
    but local feedback only arrives after push.
    
    This adds a pre-push stage hook that runs the same `npm run type` so
    contributors get the project-wide check before pushing. It also sets
    default_install_hook_types so a single `pre-commit install` installs
    both pre-commit and pre-push hooks.
    
    Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---
 .pre-commit-config.yaml | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a15303b2a3c..acf97e3397d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -14,6 +14,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+# Install pre-push hooks too, not just pre-commit:
+#   pre-commit install --hook-type pre-push
+# (or this default applies automatically on `pre-commit install`)
+default_install_hook_types: [pre-commit, pre-push]
 repos:
   - repo: https://github.com/MarcoGorelli/auto-walrus
     rev: 0.3.4
@@ -94,6 +98,19 @@ repos:
         files: ^superset-frontend\/.*\.(js|jsx|ts|tsx)$
         exclude: ^superset-frontend/cypress-base\/
         require_serial: true
+      - id: full-type-check-frontend
+        name: Full Type-Check (Frontend, pre-push)
+        # The pre-commit (per-file) variant catches most issues but `tsc 
<file>`
+        # bypasses some project-wide invariants. This runs the same check CI
+        # runs (`npm run type` -> `tsc --noEmit -p tsconfig.json`) so 
cross-file
+        # type errors are surfaced before they reach origin.
+        entry: bash -c 'cd superset-frontend && npm run type'
+        language: system
+        files: ^superset-frontend\/.*\.(js|jsx|ts|tsx)$
+        exclude: ^superset-frontend/cypress-base\/
+        pass_filenames: false
+        stages: [pre-push]
+        require_serial: true
   # blacklist unsafe functions like make_url (see #19526)
   - repo: https://github.com/skorokithakis/blacklist-pre-commit-hook
     rev: e2f070289d8eddcaec0b580d3bde29437e7c8221

Reply via email to