Skip to content

Commit ff81118

Browse files
committed
Refactor prose
1 parent 8ea509b commit ff81118

File tree

2 files changed

+73
-45
lines changed

2 files changed

+73
-45
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "unified-diff",
33
"version": "2.0.0",
4-
"description": "plugin to ignore unrelated messages",
4+
"description": "unified plugin to ignore unrelated messages",
55
"license": "MIT",
66
"keywords": [
77
"unified",

readme.md

+72-44
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
1-
# unified-diff [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]
2-
3-
[Unified][] plugin to ignore unrelated messages. Currently works in
4-
PRs on Travis.
5-
6-
When working with natural language, having tools that check cumbersome
7-
tasks can be very useful (think [alex][] or [retext][] plugins). However,
8-
natural language isn’t as strict as code. Integrating natural language
9-
checking in a CI often doesn’t work well due to false positives.
1+
# unified-diff
2+
3+
[![Build][build-badge]][build]
4+
[![Coverage][coverage-badge]][coverage]
5+
[![Downloads][downloads-badge]][downloads]
6+
[![Sponsors][sponsors-badge]][collective]
7+
[![Backers][backers-badge]][collective]
8+
[![Chat][chat-badge]][chat]
9+
10+
[**unified**][unified] plugin to ignore unrelated messages.
11+
Currently works in PRs on Travis.
12+
13+
When working with natural language, having tools that check cumbersome tasks
14+
can be very useful (think [alex][] or [retext][] plugins).
15+
However, natural language isn’t as strict as code.
16+
Integrating natural language checking in a CI often doesn’t work well due to
17+
false positives.
1018
It’s possible to add a long list of exceptions, but this soon becomes
1119
unmanageable.
1220

13-
This plugin solves that problem, when in Travis, by ignoring any
14-
messages on unchanged lines. When run outside Travis, this plugin
15-
doesn’t do anything.
16-
17-
###### TODO
18-
19-
* [ ] Add support for other CIs (ping if you want to work on this);
20-
* [ ] Add non-CI support (I’m not yet sure how though).
21+
This plugin solves that problem, when in Travis, by ignoring any messages on
22+
unchanged lines.
23+
When run outside Travis, this plugin doesn’t do anything.
2124

22-
## Installation
25+
## Install
2326

24-
[npm][npm-install]:
27+
[npm][]:
2528

26-
```bash
29+
```sh
2730
npm install unified-diff
2831
```
2932

30-
## Usage
33+
## Use
3134

32-
Say we have this `readme.md`. Note the `an an`.
35+
Say we have this `readme.md`.
36+
Note the `an an`.
3337

34-
```md
38+
```markdown
3539
This is an an example.
3640
```
3741

@@ -94,8 +98,7 @@ script:
9498
```
9599

96100
When run in Travis, we’ll see the following printed on **stderr**(4).
97-
Note that `an an` on L1 is not included because it’s unrelated to this
98-
PR.
101+
Note that `an an` on L1 is not included because it’s unrelated to this PR.
99102

100103
```txt
101104
readme.md
@@ -119,42 +122,71 @@ index 360b225..5a96b86 100644
119122
+Some more text. An error.
120123
```
121124

122-
This time our lint task exits successfully, even though L1 would
123-
normally emit an error, but it’s unrelated to the PR.
125+
This time our lint task exits successfully, even though L1 would normally emit
126+
an error, but it’s unrelated to the PR.
124127

125128
## API
126129

127130
### `processor.use(diff)`
128131

129-
Ignore messages emitted by plugins before `diff` for lines that did
130-
not change.
132+
Ignore messages emitted by plugins before `diff` for lines that did not change.
131133

132-
There are no options. If there’s a `TRAVIS_COMMIT_RANGE` environment
133-
variable this plugin runs, otherwise it’s a noop.
134+
There are no options.
135+
If there’s a `TRAVIS_COMMIT_RANGE` environment variable this plugin runs,
136+
otherwise it’s a noop.
137+
138+
###### TODO
139+
140+
* [ ] Add support for other CIs (ping if you want to work on this)
141+
* [ ] Add non-CI support (I’m not yet sure how though)
134142

135143
## Contribute
136144

137-
See [`contributing.md` in `unifiedjs/unified`][contributing] for ways to get
138-
started.
145+
See [`contributing.md`][contributing] in [`unifiedjs/.github`][health] for ways
146+
to get started.
147+
See [`support.md`][support] for ways to get help.
139148

140-
This organisation has a [Code of Conduct][coc]. By interacting with this
141-
repository, organisation, or community you agree to abide by its terms.
149+
This project has a [Code of Conduct][coc].
150+
By interacting with this repository, organisation, or community you agree to
151+
abide by its terms.
142152

143153
## License
144154

145155
[MIT][license] © [Titus Wormer][author]
146156

147157
<!-- Definitions -->
148158

149-
[travis-badge]: https://img.shields.io/travis/unifiedjs/unified-diff.svg
159+
[build-badge]: https://img.shields.io/travis/unifiedjs/unified-diff.svg
160+
161+
[build]: https://travis-ci.org/unifiedjs/unified-diff
162+
163+
[coverage-badge]: https://img.shields.io/codecov/c/github/unifiedjs/unified-diff.svg
164+
165+
[coverage]: https://codecov.io/github/unifiedjs/unified-diff
150166

151-
[travis]: https://travis-ci.org/unifiedjs/unified-diff
167+
[downloads-badge]: https://img.shields.io/npm/dm/unified-diff.svg
152168

153-
[codecov-badge]: https://img.shields.io/codecov/c/github/unifiedjs/unified-diff.svg
169+
[downloads]: https://www.npmjs.com/package/unified-diff
154170

155-
[codecov]: https://codecov.io/github/unifiedjs/unified-diff
171+
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
156172

157-
[npm-install]: https://docs.npmjs.com/cli/install
173+
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
174+
175+
[collective]: https://opencollective.com/unified
176+
177+
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
178+
179+
[chat]: https://spectrum.chat/unified
180+
181+
[npm]: https://docs.npmjs.com/cli/install
182+
183+
[health]: https://github.com./unifiedjs/.github
184+
185+
[contributing]: https://github.com./unifiedjs/.github/blob/master/contributing.md
186+
187+
[support]: https://github.com./unifiedjs/.github/blob/master/support.md
188+
189+
[coc]: https://github.com./unifiedjs/.github/blob/master/code-of-conduct.md
158190

159191
[license]: license
160192

@@ -165,7 +197,3 @@ repository, organisation, or community you agree to abide by its terms.
165197
[alex]: https://github.com./wooorm/alex
166198

167199
[retext]: https://github.com./retextjs/retext/blob/master/doc/plugins.md#list-of-plugins
168-
169-
[contributing]: https://github.com./unifiedjs/unified/blob/master/contributing.md
170-
171-
[coc]: https://github.com./unifiedjs/unified/blob/master/code-of-conduct.md

0 commit comments

Comments
 (0)