/js-toolkit

A collection of tools for building javascript projects at Ascend.

Primary LanguageJavaScript

A collection of tools for building javascript projects at Ascend.


Commitizen friendly Support Level License: MIT

Published Tools

More tools will be worked and published in the near future!

Repo Toolchain

A list of tooling used in this monorepo along with the reasoning behind it. Look at these like mini ADRs.

Node & Package Manager version pinning managed by Volta

Volta is an alternative to nvm and has been far more reliable in my experience. If it's used my multiple devs across projects, it virtually eliminates node or yarn version issues. Check out the site to install & configure.

Yarn and Node versions for this project are specified in package.json in the volta key.

Package Management via Yarn

Using Yarn 1
Why Yarn 1 instead of Yarn 2? Well... at first glance yarn 2 unfortunately doesn't work with any sort of conventional commit tooling :/

Why use Yarn instead of NPM? I still really like yarn workspaces far more than anything NPM offers. We aren't using them right now, but in the future there could be a reason to make this a monorepo. Also, I really like running yarn <command> as opposed to npm run <command>. And finally, Yarn's resolutions are really nice in a pinch.

We require Conventional Commits

Conventional commits are really great for improving commit clarity. They also help us in the release process by allowing us to automate changelog generation and take full advantage of semantic releases.

Conventional Commits CLI to help write better commits

The Commitizen CLI helps you write conventional commits by taking you through a commit prompt so you don't have to memorize the Conventional Commit spec.

Using the CLI is totally optional and is a great option for anyone new to conventional commit. You can engage the CLI prompt by running git cz or instead of git commit

Linter to enforce Conventional Commits

Commit linting will automatically run when you attempt to make a commit and will tell you if you have any syntax errors in your commit that break the conventional commit spec. This helps prevent bad commits from slipping through the cracks.

Linting on commit messages is orchestrated via husky

Package releases and publishing managed with Changesets

Created by Atlassian, Changesets is a tool to manage versioning and changelogs with a focus on multi-package repositories. It's based on the principles of semver.

We've tried semantic release to manage monorepos but changesets just makes it 10x easier 🎉