0.0.45 • Published 3 years ago

@weandthem/prettier-config v0.0.45

Weekly downloads
116
License
ISC
Repository
github
Last release
3 years ago

Prettier Config

This repo serves as the shared Prettier config for We and Them projects.

Table of contents

Using this package

  1. Install this package and its peer dependencies as dev dependencies in your project:

    $ npm i -D prettier @weandthem/prettier-config
  2. Specify it in your package.json

    "prettier": "@weandthem/prettier-config"

Developing

Setup

  1. Clone this repo

    $ git clone https://github.com/WeAndThem/prettier-config.git
  2. Enter the cloned directory

    $ cd prettier-config
  3. Install 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 config
  • scripts/ Shell scripts used with Husky git hooks
  • .prettierrc.js Prettier config for this repo imports from index.js
  • index.js Shared Prettier configuration

Development flow

  1. Do not work on master! Create local branches off of master. We have git hooks configured to prevent committing or pushing to master. Forking is disabled for this repo.

  2. 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 setting
  3. pre-commit and pre-push hooks should help maintain consistent code styles, but can also be run manually as necessary:

    $ npm run prettify
  4. Test changes locally against another We and Them project by linking this module globally:

    $ npm link

    Then, in another We and Them project that consumes this config:

    $ npm link @weandthem/prettier-config

    Changes made in this project are immediately reflected in the other project until the link is broken.

  5. Bump the project version in package.json

  6. Run npm install to update the version in package-lock.json

  7. Commit package.json and package-lock.json in 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.

  8. Open pull requests against master and select an assignee to review the changes.

  9. The assignee leaves any necessary comments and selects either "approve" or "reject" on GitHub.

  10. Once the PR is approved, the author performs the merge.

  11. A GitHub Action will publish the package automatically.

  12. Projects consuming this config will need to run npm update to receive the changes.

0.0.45

3 years ago

0.0.44

3 years ago

0.0.43

3 years ago

0.0.42

3 years ago

0.0.40

3 years ago

0.0.41

3 years ago

0.0.38

3 years ago

0.0.39

3 years ago

0.0.37

3 years ago

0.0.36

3 years ago

0.0.35

3 years ago

0.0.34

3 years ago

0.0.32

3 years ago

0.0.33

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.29

3 years ago

0.0.28

3 years ago

0.0.27

3 years ago

0.0.26

3 years ago

0.0.25

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.22

3 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.5

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago