How to lint an entire folder using TypeScript TSLint?

Sometimes, we want to lint an entire folder using TypeScript TSLint.

In this article, we’ll look at how to lint an entire folder using TypeScript TSLint.

How to lint an entire folder using TypeScript TSLint?

To lint an entire folder using TypeScript TSLint, we can run tslint with the pattern of the path of the files that we want to lint.

For instance, we run

tslint src/**/*.ts{,x}

to lint all ts and tsx files in any folder in the src folder or its subfolders with tsline.

Conclusion

To lint an entire folder using TypeScript TSLint, we can run tslint with the pattern of the path of the files that we want to lint.