SSGulnur
lint-staged
SSGulnur | lint-staged | |
---|---|---|
11 | 53 | |
0 | 12,931 | |
- | 1.2% | |
10.0 | 8.2 | |
over 1 year ago | 11 days ago | |
JavaScript | 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.
SSGulnur
-
How to publish your GitHub project to npm?
Today, I created the first release for my SSGulnur tool.
-
Continuous Integration for Node.js project
This will create a configuration yaml file in your .github/workflows folder which will explain Github what and when to do to your repo changes.
-
Continuous integration pipeline
For my PR I did basic tests checking the functions for unexpected output.
-
JavaScript testing with Jest
I also updated my CONTRIBUTING.md, so the future contributors find instructions for testing.
-
How to beautify your code and make contributions easy?
configure the rules and options to customize the look, e.g., .prettierrc
-
Docusaurus first impression and stealing like an open sourcer
I filed a new issue and started working on it on the new branch. I saved every step as commits which I squashed into one later. Everything went as planned and the implementation took me about what I expected, as I was not creating anything new myself and was only working on integrating an existing tool into my project.
-
OSD600 Blog #6 - Lab 4
Issue URL
-
My first usage of git remotes!
I also received an issue on my repo with my SSG tool. I labeled it as an enhancement as it was not a necessary part but good to have. I checked the PR and realized that there was a need for a few changes by testing the work. For that, I added them as a remote to my local repo, fetched and set a tracking branch. I contacted the author of PR through Slack and explained all necessary updates. I also summarized them in the PR itself as things to do, so I remember what to check for when everything is ready.
-
My first merge!
First feature that I was interested in implementing was adding markdown bold and link syntax features support. As always, I created an issue about my solution and a branch in which I worked on it.
-
My first code review and issues!
Issue #1 is a bug connected to file reading and quotation marks. Basically, all quotation marks needed to be converted into the escape characters in order to be processed correctly and not as end of the string.
lint-staged
-
Supercharge your workflow with Husky, Lint Staged and Commitlint
Lint Staged: https://github.com/lint-staged/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!
What are some alternatives?
StaticSiteGenerator - This repo contains the Static Site Generator for OSD600
commitlint - 📓 Lint commit messages
docusaurus
Nest - A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
semver - Semantic Versioning Specification
stylelint - A mighty CSS linter that helps you avoid errors and enforce conventions.
react-native - A framework for building native applications using React
prettier - Prettier is an opinionated code formatter.
np - A better `npm publish`
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.
Docusaurus - Easy to maintain open source documentation websites.
volar - âš¡ Explore high-performance tooling for Vue [Moved to: https://github.com/vuejs/language-tools]