Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 17, 2015
1 parent 8550673 commit 4936d35
Show file tree
Hide file tree
Showing 8 changed files with 395 additions and 386 deletions.
3 changes: 2 additions & 1 deletion .mdastrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"output": true,
"plugins": [
"./",
"github",
"toc",
"yaml-config"
"comment-config"
],
"settings": {
"bullet": "*"
Expand Down
14 changes: 7 additions & 7 deletions component.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
"repository": "wooorm/mdast-lint",
"dependencies": {
"sindresorhus/plur": "^2.0.0",
"wooorm/mdast-message-sort": "^0.1.0",
"wooorm/mdast-range": "^0.4.0",
"wooorm/mdast-util-heading-style": "^0.1.0",
"wooorm/mdast-util-position": "^0.2.0",
"wooorm/mdast-util-to-string": "^0.1.0",
"wooorm/mdast-range": "^1.0.0",
"wooorm/mdast-util-heading-style": "^1.0.0",
"wooorm/mdast-util-position": "^1.0.0",
"wooorm/mdast-util-to-string": "^1.0.0",
"wooorm/unist-util-visit": "^1.0.0",
"wooorm/mdast-zone": "^0.2.1"
"wooorm/mdast-zone": "^1.0.0",
"wooorm/vfile-sort": "^1.0.0"
},
"scripts": [
"index.js",
"lib/**/*.js"
]
}
}
202 changes: 101 additions & 101 deletions doc/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ be null or undefined in order to be ignored.
### externals

````md
<!-- Load more rules -->
```json
{
"externals": ["foo", "bar", "baz"]
}
```
<!-- Load more rules -->
```json
{
"externals": ["foo", "bar", "baz"]
}
```
````

Externals contains a list of extra rules to load.
Expand All @@ -92,13 +92,13 @@ name or a file), but in the browser an object must be passed in.
### reset

````md
<!-- Explicitly activate rules: -->
```json
{
"reset": true,
"final-newline": true
}
```
<!-- Explicitly activate rules: -->
```json
{
"reset": true,
"final-newline": true
}
```
````

By default, all rules are turned on unless explicitly set to `false`.
Expand Down Expand Up @@ -197,28 +197,28 @@ Options: `boolean`, default: `false`.
### code-block-style

````md
<!-- Valid, when set to `indented` or `consistent`, invalid when set to `fenced` -->
Hello

...

World

<!-- Valid, when set to `fenced` or `consistent`, invalid when set to `indented` -->
```
Hello
```
...
```bar
World
```

<!-- Always invalid -->
Hello
...
```
World
```
<!-- Valid, when set to `indented` or `consistent`, invalid when set to `fenced` -->
Hello

...

World

<!-- Valid, when set to `fenced` or `consistent`, invalid when set to `indented` -->
```
Hello
```
...
```bar
World
```

<!-- Always invalid -->
Hello
...
```
World
```
````

Warn when code-blocks do not adhere to a given style.
Expand Down Expand Up @@ -278,28 +278,28 @@ Options: `boolean`, default: `false`.
### fenced-code-flag

````md
<!-- Valid: -->
```hello
world();
```

<!-- Valid: -->
Hello

<!-- Invalid: -->
```
world();
```

<!-- Valid when given `{allowEmpty: true}`: -->
```
world();
```

<!-- Invalid when given `["world"]`: -->
```hello
world();
```
<!-- Valid: -->
```hello
world();
```

<!-- Valid: -->
Hello

<!-- Invalid: -->
```
world();
```

<!-- Valid when given `{allowEmpty: true}`: -->
```
world();
```

<!-- Invalid when given `["world"]`: -->
```hello
world();
```
````

Warn when fenced code blocks occur without language flag.
Expand All @@ -317,32 +317,32 @@ Options: `boolean`, default: `false`.
### fenced-code-marker

````md
<!-- Valid by default and `` '`' ``: -->
```foo
bar();
```

```
baz();
```

<!-- Valid by default and `'~'`: -->
~~~foo
bar();
~~~

~~~
baz();
~~~

<!-- Always invalid: -->
~~~foo
bar();
~~~

```
baz();
```
<!-- Valid by default and `` '`' ``: -->
```foo
bar();
```

```
baz();
```

<!-- Valid by default and `'~'`: -->
~~~foo
bar();
~~~

~~~
baz();
~~~

<!-- Always invalid: -->
~~~foo
bar();
~~~

```
baz();
```
````

Warn for violating fenced code markers.
Expand Down Expand Up @@ -962,24 +962,24 @@ Options: `boolean`, default: `false`.
### no-shell-dollars

````md
<!-- Invalid: -->
```bash
$ echo a
$ echo a > file
```

<!-- Valid: -->
```sh
echo a
echo a > file
```

<!-- Also valid: -->
```zsh
$ echo a
a
$ echo a > file
```
<!-- Invalid: -->
```bash
$ echo a
$ echo a > file
```

<!-- Valid: -->
```sh
echo a
echo a > file
```

<!-- Also valid: -->
```zsh
$ echo a
a
$ echo a > file
```
````

Warn when shell code is prefixed by dollar-characters.
Expand Down
5 changes: 1 addition & 4 deletions history.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
mdast:
setext: true
---
<!--mdast setext-->

<!--lint disable no-multiple-toplevel-headings -->

Expand Down
16 changes: 9 additions & 7 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* Dependencies.
*/

var sort = require('vfile-sort');
var range = require('mdast-range');
var zone = require('mdast-zone');
var sort = require('mdast-message-sort');
var internals = require('./rules');
var filter = require('./filter');

Expand Down Expand Up @@ -308,17 +308,19 @@ function lint(mdast, options) {
'onparse': onparse
}));

/*
* Sort messages.
*/

mdast.use(sort);

/*
* Filter.
*/

mdast.use(filter);

/**
* Transformer sort messages.
*/
return function (node, file, next) {
sort(file);
next();
};
}

/*
Expand Down
Loading

0 comments on commit 4936d35

Please sign in to comment.