Skip to content

Airbase/gh-action-tscheck-action-shell

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

no new @ts-nocheck

Checks if new @ts-nocheck is introduced in a PR or not.

  • It looks at git diff between the source branch and the destination branch of a pull request
  • It searches for the patterns // @ts-nocheck or /* @ts-nocheck in added/removed lines
  • Then, it separates out the additions and deletions and counts the instances in each of them
  • Finally, it would fail with exit 1 if the count in additions is more than count in deletions (which would mean the PR has introduced new @ts-nocheck instances)

How it works

The action searches for lines containing either:

  • // @ts-nocheck - line comment pattern
  • /* @ts-nocheck - block comment pattern

Lines can have other content before or after these patterns. The check ignores plain @ts-nocheck without comment markers.

About

A GitHub action that runs git diff against the base branch and checks if new @ts-nochecks are added.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Shell 100.0%