![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@springtree/coding
Advanced tools
This repository contains information about our company rules and guidelines when it comes to writing software. Our primary development language is JavaScript/TypeScript so those will be featured here prominently. A collection of configuration files for various tools and linters that can be used in our projects can also be found here.
You can now use npx
to setup linting and the gitcommit hooks using this repository:
npx @springtree/coding --init
If you are using a project without TypeScript run:
npx @springtree/coding --init --no-ts
We have adopted the Airbnb style guide for our JavaScript and TypeScript projects. This is a very widely used standard and support is available in a multitude of editors and CI tools. We have added the following rules to the style to make the resulting code a little more spacious and readable:
All new projects must use this style guide. When coding on an existing project adhere to the cureent style used throughout the project. This repository contains configuration files for eslint and tslint.
You can install these tools using npm:
npm i -D eslint eslint-config-airbnb eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-import tslint tslint-config-airbnb
All code, variable names, code comments and documentation should be written in English.
Every project needs to have a README.md
(or equivalent) that must contain:
Any additional information about how to run unit tests should be added if available.
We use Git flow AVH as our branching stategy. You can install this on a Mac using Homebrew
brew install git-flow-avh
We have a whole wiki page dedicated to how we use Git flow to perform releases. Try to contain work in separate feature branches as much as possible.
Projects on GitHub should be setup with branch protection to now allow direct pushes to the master
and develop
branches.
The restriction on master
is also enforced for administrators.
Branch naming enforcement can be installed with:
npx @springtree/coding --gitflow
NOTE: Be sure to initialise your repo with git flow first and push master/develop branches. The branch enforcement will dissallow direct pushing to those branches.
We use the Angular commit log format which we enforce using a combination of commitlint and husky.
You can install these tools using npm:
npm i -D husky @commitlint/cli @commitlint/config-angular
Add the following husky hook to your package.json to enforce the format:
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
Create a commitlint configuration files:
echo "module.exports = { extends: ['@commitlint/config-angular'] }" > commitlint.config.js
All projects should be built using a CI and should not depend on the build chain of an individual developers laptop. This should preferable be setup at project inception.
We use the folloing CI's at this time:
Use tools like docker to encapsulate your build chain.
Pull requests should be setup to use the CI to validate the branch is building. If available this should include running the unit test suite.
FAQs
The SpringTree coding guidelines and helper scripts
The npm package @springtree/coding receives a total of 2 weekly downloads. As such, @springtree/coding popularity was classified as not popular.
We found that @springtree/coding demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.