Skip to content
/ tsc-lint Public

Find tsconfig files and use them for linting in parallel

License

Notifications You must be signed in to change notification settings

alloc/tsc-lint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tsc-lint

Run tsc on multiple tsconfigs in parallel. Your tsconfig.json files are discovered automatically, and .gitignore files are respected. The --emitDeclarationOnly option is added for you, and node_modules/.tsc-lint is used as the output directory.

Note: Project references are not supported.

tsc-lint screenshot

pnpm add tsc-lint -D

Update your project's package.json to add a lint script.

{
  "scripts": {
    "lint": "tsc-lint"
  }
}

By default, the working directory is searched for tsconfig.json files. You can pass one or more different directories as an argument, and those will be searched instead.

# Lint only your ./test/ folder.
pnpm lint test

noEmit vs emitDeclarationOnly

If your project is consumed by other projects (e.g. a library), you should not have noEmit in your tsconfig.json files. The emit step is critical for catching certain errors, which is why tsc-lint uses the --emitDeclarationOnly option instead.

If you are using noEmit, that will be detected and tsc-lint will avoid the emit step.

Options

tsc-lint --help

Troubleshooting

# Enable debug logging.
DEBUG="tsc-lint" pnpm lint

About

Find tsconfig files and use them for linting in parallel

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published