Avoid TypeScript errors in your project by using the TypeScript compiler

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • Scout APM - Truly a developer’s best friend
  • SonarQube - Static code analysis for 29 languages.
  • talent.io - Download talent.io’s Tech Salary Report
  • lint-staged

    🚫💩 — Run linters on git staged files

    One thing I like to do is to configure my typecheck command with lint-staged and husky on pre-commit along with my tests and eslint verification.

  • TypeScript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    💡 Notice: The reason why I'm not executing my npm run typecheck inside lint-staged is that, since lint-staged only runs staged files and passes the current file being checked by argument to the command being executed, we can't have a reference to the tsconfig.json file (with the --project flag) and a source file to check in the same command. If you do, you'll get a TS5042: Option 'project' cannot be mixed with source files on a command line. error. Passing npm run typecheck in the husky pre-commit hook separated from lint-staged will typecheck the entire project, and not just the staged files. It's not perfect, but it works! There's an issue in the official TypeScript repository about this, in case you want to take a look.

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • husky

    Git hooks made easy 🐶 woof!

    One thing I like to do is to configure my typecheck command with lint-staged and husky on pre-commit along with my tests and eslint verification.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts