Skip to content

Commit b54fda7

Browse files
committed
Refactor readme.md
1 parent 20af49e commit b54fda7

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

readme.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Create [vfile][github-vfile] messages.
1717
* [`VFileMessage(reason[, options])`](#vfilemessagereason-options)
1818
* [`Options`](#options)
1919
* [Well-known](#well-known)
20-
* [Types](#types)
2120
* [Compatibility](#compatibility)
2221
* [Contribute](#contribute)
2322
* [License](#license)
@@ -28,8 +27,10 @@ This package provides a (lint) message format.
2827

2928
## When should I use this?
3029

31-
In most cases, you can use `file.message` from `VFile` itself, but in some
32-
cases you might not have a file, and still want to emit warnings or errors,
30+
In most cases,
31+
you can use `file.message` from `VFile` itself,
32+
but in some cases you might not have a file,
33+
and still want to emit warnings or errors,
3334
in which case this can be used directly.
3435

3536
## Install
@@ -63,7 +64,7 @@ import {VFileMessage} from 'vfile-message'
6364

6465
const message = new VFileMessage(
6566
'Unexpected unknown word `braavo`, did you mean `bravo`?',
66-
{source: 'spell', ruleId: 'typo', place: {line: 1, column: 8}}
67+
{place: {column: 8, line: 1}, ruleId: 'typo', source: 'spell'}
6768
)
6869

6970
console.log(message)
@@ -89,6 +90,7 @@ Yields:
8990

9091
This package exports the identifier [`VFileMessage`][api-vfile-message].
9192
There is no default export.
93+
It exports the additional [TypeScript][] type [`Options`][api-options].
9294

9395
### `VFileMessage(reason[, options])`
9496

@@ -170,11 +172,6 @@ The following fields are documented and typed here.
170172
* `note` (`string`, optional)
171173
— long form description of the message (you should use markdown)
172174

173-
## Types
174-
175-
This package is fully typed with [TypeScript][].
176-
It exports the additional type [`Options`][api-options].
177-
178175
## Compatibility
179176

180177
Projects maintained by the unified collective are compatible with maintained

0 commit comments

Comments
 (0)