@weandthem/prettier-config v0.0.45
Prettier Config
This repo serves as the shared Prettier config for We and Them projects.
Table of contents
Using this package
Install this package and its peer dependencies as dev dependencies in your project:
$ npm i -D prettier @weandthem/prettier-configSpecify it in your
package.json"prettier": "@weandthem/prettier-config"
Developing
Setup
Clone this repo
$ git clone https://github.com/WeAndThem/prettier-config.gitEnter the cloned directory
$ cd prettier-configInstall dependencies
$ npm install
VS Code is recommended because this repo includes environmental settings that help create a consistent development environment across engineers. Upon opening this repo in VS Code, you'll be prompted to install recommended extensions.
File Structure
.github/workflows/GitHub Actions configs.vscode/Shared VS Code configscripts/Shell scripts used with Husky git hooks.prettierrc.jsPrettier config for this repo imports from index.jsindex.jsShared Prettier configuration
Development flow
Do not work on
master! Create local branches off ofmaster. We have git hooks configured to prevent committing or pushing tomaster. Forking is disabled for this repo.Keep commits small and commit messages relevant. Prepend the Jira ticket number to at least one of your commits for reporting.
Example:
HAR-28: enforce singleQuote settingpre-commit and pre-push hooks should help maintain consistent code styles, but can also be run manually as necessary:
$ npm run prettifyTest changes locally against another We and Them project by linking this module globally:
$ npm linkThen, in another We and Them project that consumes this config:
$ npm link @weandthem/prettier-configChanges made in this project are immediately reflected in the other project until the link is broken.
Bump the project version in
package.jsonRun
npm installto update the version inpackage-lock.jsonCommit
package.jsonandpackage-lock.jsonin an isolated commit with the following convention:$ git commit -m 'Release 0.0.6'The GitHub action that publishes the package will read this commit and tag the release appropriately.
Open pull requests against
masterand select an assignee to review the changes.The assignee leaves any necessary comments and selects either "approve" or "reject" on GitHub.
Once the PR is approved, the author performs the merge.
A GitHub Action will publish the package automatically.
Projects consuming this config will need to run
npm updateto receive the changes.
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago