Node.js Coding Standard Tools with MegaLinter on Gitlab CI (original) (raw)
Photo by Desola Lanre-Ologun on Unsplash
It’s a continuous struggle to keep our application readable, stable, performant, and maintainable during its entire lifecycle and constant changes while evolving every day to provide more options and features.
On top of that, the team that works on the application evolves too. Team members switch context from one part of the application to another, they leave the team and new team members join.
In order to solve these challenges, we make use of the coding standard tools, to help us adhere to the standards and the rules that we have defined for our application.
Some of the most important tools for Node.js applications are EsLint, CSpell, Dockerfilelint, JSCpd, and Prettier. All these tools can also be combined together with MegaLinter so that we can automate the process of checking all these rules in one go.
All these tools can also be configured in our IDE by using different plugins/extensions. Here are their respective extensions for my favorite Node.js IDE: EsLint, CSpell, Prettier, Hadolint — as docker file linter.
JSCpd unfortunately is no longer available in the marketplace but the source code is available on GitHub in case you want to create the extension out of it. Personally, I’m not using this.