I'm configuring Github actions for my typescript project (nothing special yet, just Node.js). I use eslint with typescript plugin first on the code base. Then prettier. I've seen many times that build step is used as well (like tsx build). However, is it necessary, I already run eslint-typescript (with plugin:@typescript-eslint/recommended-requiring-type-checking)? Does this plugin build the project and do I have to separately run the build?
CodePudding user response:
Yes, you'll still need to build.
ESLint is a linter, not a build tool. It simply checks your codes for specific issues. You can see the issues it checks with the plugin you mentioned here: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended-requiring-type-checking.ts
There are additional problems that can only be encountered with a proper build action. ESLint can't catch everything, sadly :)
For instance, if you upgrade a dependency that suddenly causes CSS to stop compiling, you'd only learn about that through a build step.
