express-typescript-skeleton
lint-staged
express-typescript-skeleton | lint-staged | |
---|---|---|
7 | 51 | |
454 | 12,900 | |
- | 0.9% | |
7.5 | 8.2 | |
8 days ago | 2 days ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
express-typescript-skeleton
-
Difference between TsED and NestJS?
I have been using TsED for a year now and I can say that so far I have not had any problems. It is very comfortable to work with this mini-framework. In addition, the creator provides very fast support and is happy to help with any problems. A few months ago I created a REST API template with hexagonal architecture using TsED.
- express-typescript-skeleton, a starter template for Node.js, is looking for contributions!
- ๐ NodeJS + Ts.ED + TypeScript + Clean Architecture Template
-
Production-ready template for back ends created with Node.js, TS and Express
https://github.com/borjapazr/express-typescript-skeleton
As I say in the README of the project:
This is an opinionated template. The architecture of the code base and the configuration of the different tools used has been based on best practices and personal preferences.
This template does not pretend to have the magic solution to all the problems that a developer may face when creating a REST API using Node.js. This is my contribution, after spending some time on it, to the community. It is an opinionated codebase created based on personal preferences, but also based on the application of best practices.
All criticisms and opinions are welcome, indeed I am very grateful for them. Based on them this could evolve, adapt and become something better. I am sure it will bring something to someone at some point, because even from the worst things something can be learned.
Many thanks to all of you who have taken the time to look at the project.
- ๐ฐ๐ฆธ Production-ready template for backends created with Node.js, Typescript and Express
lint-staged
-
Streamline Your Workflow: A Guide to Normalising Git Commit and Push Processes
lint-staged is the second important tools we need here, install it via NPM.
-
How Automation Saved Me from Oops Moments: Never Skip Tests in Production Again!
We were already using lint-staged and have a pre-commit hook in place using Husky in our project for linter and prettier. So it made sense to add a check here.
-
Pre-commit with husky & lint-staged
Now you can config it in your package.json, here is the guide doc:
-
Automating code patterns with Husky
In the world of software development, maintaining consistent code quality and ensuring that the codebase adheres to predefined patterns and guidelines is crucial. However, manually enforcing these standards can be time-consuming and error-prone. This is where automation tools like Husky, Lint-Staged, Commitlint, and Commitizen come to the rescue. In this post, we will explore how these tools can be combined to streamline your development workflow.
-
500 lines in 2013 is 10k in 2023, inflation you know
This is wasted work that can and should be automated. Adding a linter and formatter on CI and a pre-commit hook such as lint-staged can do wonders.
-
Set up linting and formatting for code and (S)CSS files in a Next.js project
lint-staged is a package that can be used to run formatting and linting commands on staged files in a Git repo.
-
How do you handle eslint/prettier configs across multiple repos?
To answer your next question: I lint and format on save, and I use Git hooks installed by Husky and executed through Lint-Staged (this tool helps ensure your Git hooks only run on modified files, etc) to ensure there are no lint or formatting errors whenever making a commit or pushing code. This is helpful for teams, as some developers tend to forget to run lint tasks, or don't have the Prettier extension installed in their IDE. If there are lint errors, the commit is rejected until fixed. YMMV - you'll need to fine-tune the strictness of this based on the team's needs.
-
How to create and publish a TypeScript library with ease
Uses Husky Git hooks and Lint-staged pre-commit hooks.
-
How to Contribute on the First Day of a Frontendย Project
Something else to consider is applying linting and formatting before every git commit. A package like Lint-staged only lints and formats on staged items, ensuring all pushed code follows the standards in the repo. This allows developers to have their own formatting preferences when developing, while the code homogenizes on push. Linting pre-commit also avoids strict rules like no-console or no-unused-vars restricting a developer when writing code, when it should only apply in production. Imagine not being able to console log anything during development!
-
Commit Like a PRO
Lint-Staged Docs
What are some alternatives?
nestjs-api-boilerplate - Nestjs API Boilerplate ๐ ๐ช ๐ฅ : Typescript, Postgresql, TypeORM, Swagger for Api documentation, Passport-JWT authentication, Jest, Env configuration, Migrations, Seeds, Docker, Redis, AWS S3, and best application architecture.
commitlint - ๐ Lint commit messages
domain-driven-hexagon - Learn Domain-Driven Design, software architecture, design patterns, best practices. Code examples included
Nest - A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript ๐
node-typescript-boilerplate - Minimalistic project template to jump start a Node.js back-end application in TypeScript. ESLint, Jest and type definitions included.
stylelint - A mighty CSS linter that helps you avoid errors and enforce conventions.
superfetch - ๐ HTTP Server testing library inspired by node-supertest-fetch.
prettier - Prettier is an opinionated code formatter.
ddd-forum - Hacker news-inspired forum app built with TypeScript using DDD practices from solidbook.io.
graphql-code-generator - A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.
nest-api-example - Example of an Restful API with Nest.js and TypeORM
volar - โก Explore high-performance tooling for Vue [Moved to: https://github.com/vuejs/language-tools]