Formatting error should fail bundling in NodeJS + ExpressJS + TSLint + Prettier


I would like to implement a feature like, if any of the file code is not formatted or not followed the standard then build has to show the errors with the line numbers, eg. Semistandard in JS. Likewise for TS.

Because, team members are not formatting the code, and other developers are feeling hard to code. So until they fix the formatting issues, the build should not be succeed. Is there any way to achieve this with the npm command.

For Eg. npm start: "node server.ts && npm run format".

Any medium,, etc link for reference is also worth to watch.

I have the following with me: TSLint + Node + Express + Prettier + VSCode.

Any Prettier config with best practices would be greatly appreciable. eg. .prettierrc and how to configure in VSCode

The above is for express-server. Similarly i need to achieve the same in front end Angular

Source: Angular Questions


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us