Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@federato/ts-strictify

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@federato/ts-strictify

Enable gradual TypeScript strict

  • 1.3.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

@federato/ts-strictify

Runs TypeScript in strict mode on your changed files.

How it works

When you start working on a new feature or fixing a bug, you will modify the code base in one way or another. ts-strictify will take a look at these changes - and only these changes (!) and will complain, if the files you have touched are not strict compliant.

That is different than TypeScript works. You could check a single file against the compiler, but the compiler would also look up the imports and the imports of the imports. Not exactly what you want, when you are looking for incrementally update path.

Install

With npm:

npm install --save-dev ts-strictify

With yarn:

yarn add --dev ts-strictify

With pnpm:

pnpm add --dev ts-strictify

Usage

With npm:

npx ts-strictify

With yarn:

yarn ts-strictify

With pnpm:

pnpm ts-strictify

You can find a list of all available options here.

Pre-Commit Hook

You can run ts-strictify as a pre-commit hook using husky. Add the following to your package.json file.

{
  "husky": {
    "hooks": {
      "pre-commit": "ts-strictify"
    }
  }
}

Options

Options:
  --help                          Show help                       [boolean]
  --version                       Show version number             [boolean]
  --project                           [string] [default: "./tsconfig.json"]
  --targetBranch                                 [string] [default: "main"]
  --commitedFiles                                 [boolean] [default: true]
  --stagedFiles                                   [boolean] [default: true]
  --modifiedFiles                                 [boolean] [default: true]
  --untrackedFiles                                [boolean] [default: true]
  --createdFiles                                  [boolean] [default: true]

Thanks

Thanks to Christian Schröter for his work on the original ts-strictify project this fork was based on!

Keywords

FAQs

Package last updated on 16 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc