alveifbklsiu259 opened a new pull request, #32261:
URL: https://github.com/apache/superset/pull/32261

   feat(type-checking): Add type-checking pre-commit hooks
   
   ### SUMMARY
   
   This PR introduces some pre-commit hooks to check TypeScript files using 
`tscw-config`. This enhancement aims to streamline the development process by 
running type checks **only on changed files**.
   
   #### NOTES
   
   - Since different packages (e.g., `superset-frontend`, 
`superset-websocket`...) use their own `tsconfig.json` and may require 
different declaration files, multiple type-checking hooks are used.
   - JS/JSX files will be processed by the type-checking hooks, but `checkJs` 
is not enabled by default. To enable type-checking for JS/JSX files, either 
include `//@ts-check` at the top of each JS/JSX file or enable it in the 
package's `tsconfig.json`.
   - Each package, such as `superset-frontend`, `superset-websocket`... will 
include all files ending with `.d.ts` in their respective directories 
(recursively). However, if one needs to include third-party declaration files, 
one can either import them directly in the files that need them or declare them 
in the `type` field of the package's `tsconfig.json`. For example `import 
"@testing-library/jest-dom"`
   
   ### DISCLOSURE
   
   I am the author of `tscw-config`. I genuinely believe that this library 
offers an effective solution to the issue discussed in [Issue 
#27379](https://github.com/microsoft/TypeScript/issues/27379#issuecomment-2565940933).
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to