Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint: markdown using prettier #486

Merged
merged 3 commits into from Nov 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .prettierignore
@@ -1 +1,2 @@
dist
dist
__fixtures__
23 changes: 12 additions & 11 deletions docs/automating-changesets.md
Expand Up @@ -5,7 +5,7 @@ While changesets is designed to work with a fully manual process, it also provid
1. How do I want to ensure pull requests have changesets?
2. How do I run the version and publish commands?

Here we have a quick-start recommended workflow, with more
Here we have a quick-start recommended workflow, with more

## Recommended Automation Flow

Expand All @@ -26,29 +26,30 @@ In this approach, a pull request may be merged if no changeset is present, and a

In some cases, you may want to make CI fail if not changeset is present, to ensure no PR can be merged without a changeset. To do this:

In your CI process add a step that runs:
In your CI process add a step that runs:

```bash
changeset status --sinceMaster
```

This will exit with the exit code 1 if there have been no new changesets since master.

In some cases, you may *want* to merge a change without doing any releases (such as when you only change tests or build tools). In this case, you can run `changeset --empty`. This will add a special changeset that does not release anything.
In some cases, you may _want_ to merge a change without doing any releases (such as when you only change tests or build tools). In this case, you can run `changeset --empty`. This will add a special changeset that does not release anything.

## How do I run the version and publish commands?

We have a [github action](https://github.com/changesets/action) that

* creates a `version` PR, then keeps it up to date, recreating it when merged. This PR always has an up-to-date run of `changeset version`
* Optionally allows you to do releases when changes are merged to master.
- creates a `version` PR, then keeps it up to date, recreating it when merged. This PR always has an up-to-date run of `changeset version`
- Optionally allows you to do releases when changes are merged to master.

If you don't want to use this action, the manual workflow we recommend for running the `version` and `publish` commands is:

* A release coordinator (RC) calls to stop any merging to master
* The RC pull down `master`, runs `changeset version`, then make a new PR with the versioning changes
* The versioning changes are merged back into master
* The RC pulls `master` again and runs `changeset publish`
* The RC runs `git push --follow-tags` to push the release tags back
* The RC unblocks merging to master
- A release coordinator (RC) calls to stop any merging to master
- The RC pull down `master`, runs `changeset version`, then make a new PR with the versioning changes
- The versioning changes are merged back into master
- The RC pulls `master` again and runs `changeset publish`
- The RC runs `git push --follow-tags` to push the release tags back
- The RC unblocks merging to master

This is a lot of steps, and is quite finnicky (we have to pull from master twice). Feel free to finesse it to your own circumstances.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -13,6 +13,7 @@
"lint:prettier": "prettier --list-different \"**/*.{js,ts,tsx}\"",
"types:check": "tsc",
"prettier": "prettier --write \"**/*.{js,ts,tsx}\"",
"prettier:md": "prettier --write \"**/*.md\"",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I would prefer just adding this extension to the list in the prettier task. Similar should be done for the lint:prettier task as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

"changeset": "packages/cli/bin.js",
"check-all": "yarn test && yarn lint && yarn types:check",
"release": "yarn build && changeset publish"
Expand Down
1 change: 0 additions & 1 deletion packages/config/README.md
Expand Up @@ -4,7 +4,6 @@

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@changesets/config)


```tsx
import { parse, read, ValidationError } from "@changesets/config";

Expand Down
1 change: 0 additions & 1 deletion packages/get-github-info/README.md
Expand Up @@ -2,7 +2,6 @@

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@changesets/get-github-info)


> Get the GitHub username and PR number from a commit. Intended for use with changesets.

## Getting Started
Expand Down
1 change: 0 additions & 1 deletion packages/get-release-plan/README.md
Expand Up @@ -2,7 +2,6 @@

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@changesets/get-release-plan)


A function that reads information about the current repository

```js
Expand Down
1 change: 0 additions & 1 deletion packages/get-version-range-type/README.md
Expand Up @@ -2,7 +2,6 @@

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@changesets/get-version-range-type)


Simple function that takes in a string which is a version range (ie `^1.0.0`, `~3.5.1`, `2.0.0`)
and returns the range definition.

Expand Down
1 change: 0 additions & 1 deletion packages/git/README.md
Expand Up @@ -2,7 +2,6 @@

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@changesets/git)


A collection of helper functions used internally in changesets to
make git operations easier.

Expand Down
2 changes: 1 addition & 1 deletion packages/logger/README.md
Expand Up @@ -14,7 +14,7 @@ error('message part 1', 'message part 2');

**error**: Use `error` to print error messages upon which users which immediately action to complete the task.

**info**: Use `info` to print informational messages to user.
**info**: Use `info` to print informational messages to user.

**log**: Use `log` to print messages don't fall in anyother specific category. For example, message to show title of the step being performed by the changesets tool.

Expand Down
2 changes: 1 addition & 1 deletion packages/test-utils/README.md
Expand Up @@ -2,7 +2,7 @@

[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/@changesets/test-utils)

> Utilities for testing @changesets/* packages
> Utilities for testing @changesets/\* packages

### Utilities

Expand Down
8 changes: 4 additions & 4 deletions packages/write/README.md
Expand Up @@ -6,10 +6,10 @@ Writes a changeset to a file.
import write from "@changesets/write";

const changeset = {
"summary": "A description of a minor change",
"releases": [
{ "name": "@changesets/something", "type": "minor" },
{ "name": "@changesets/something-else", "type": "patch" }
summary: "A description of a minor change",
releases: [
{ name: "@changesets/something", type: "minor" },
{ name: "@changesets/something-else", type: "patch" }
]
};

Expand Down