Update dependencies

This commit is contained in:
Titus Wormer 2015-08-17 13:41:45 +02:00
parent 8550673a9a
commit 4936d35b8a
8 changed files with 602 additions and 593 deletions

View File

@ -1,9 +1,10 @@
{
"output": true,
"plugins": [
"./",
"github",
"toc",
"yaml-config"
"comment-config"
],
"settings": {
"bullet": "*"

View File

@ -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"
]
}
}

View File

@ -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.
@ -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`.
@ -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
<!-- Valid, when set to `indented` or `consistent`, invalid when set to `fenced` -->
Hello
...
...
World
World
<!-- Valid, when set to `fenced` or `consistent`, invalid when set to `indented` -->
```
Hello
```
...
```bar
World
```
<!-- Valid, when set to `fenced` or `consistent`, invalid when set to `indented` -->
```
Hello
```
...
```bar
World
```
<!-- Always invalid -->
Hello
...
```
World
```
<!-- Always invalid -->
Hello
...
```
World
```
````
Warn when code-blocks do not adhere to a given style.
@ -278,28 +278,28 @@ Options: `boolean`, default: `false`.
### fenced-code-flag
````md
<!-- Valid: -->
```hello
world();
```
<!-- Valid: -->
```hello
world();
```
<!-- Valid: -->
Hello
<!-- Valid: -->
Hello
<!-- Invalid: -->
```
world();
```
<!-- Invalid: -->
```
world();
```
<!-- Valid when given `{allowEmpty: true}`: -->
```
world();
```
<!-- Valid when given `{allowEmpty: true}`: -->
```
world();
```
<!-- Invalid when given `["world"]`: -->
```hello
world();
```
<!-- Invalid when given `["world"]`: -->
```hello
world();
```
````
Warn when fenced code blocks occur without language flag.
@ -317,32 +317,32 @@ Options: `boolean`, default: `false`.
### fenced-code-marker
````md
<!-- Valid by default and `` '`' ``: -->
```foo
bar();
```
<!-- Valid by default and `` '`' ``: -->
```foo
bar();
```
```
baz();
```
```
baz();
```
<!-- Valid by default and `'~'`: -->
~~~foo
bar();
~~~
<!-- Valid by default and `'~'`: -->
~~~foo
bar();
~~~
~~~
baz();
~~~
~~~
baz();
~~~
<!-- Always invalid: -->
~~~foo
bar();
~~~
<!-- Always invalid: -->
~~~foo
bar();
~~~
```
baz();
```
```
baz();
```
````
Warn for violating fenced code markers.
@ -962,24 +962,24 @@ Options: `boolean`, default: `false`.
### no-shell-dollars
````md
<!-- Invalid: -->
```bash
$ echo a
$ echo a > file
```
<!-- Invalid: -->
```bash
$ echo a
$ echo a > file
```
<!-- Valid: -->
```sh
echo a
echo a > file
```
<!-- Valid: -->
```sh
echo a
echo a > file
```
<!-- Also valid: -->
```zsh
$ echo a
a
$ echo a > file
```
<!-- Also valid: -->
```zsh
$ echo a
a
$ echo a > file
```
````
Warn when shell code is prefixed by dollar-characters.

View File

@ -1,7 +1,4 @@
---
mdast:
setext: true
---
<!--mdast setext-->
<!--lint disable no-multiple-toplevel-headings -->

View File

@ -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');
@ -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();
};
}
/*

File diff suppressed because it is too large Load Diff

2
mdast-lint.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -9,28 +9,21 @@
"validate",
"mdast"
],
"repository": {
"type": "git",
"url": "https://github.com/wooorm/mdast-lint.git"
},
"author": {
"name": "Titus Wormer",
"email": "tituswormer@gmail.com"
},
"repository": "wooorm/mdast-lint",
"author": "Titus Wormer <tituswormer@gmail.com>",
"dependencies": {
"mdast-message-sort": "^0.1.0",
"mdast-range": "^0.4.0",
"mdast-util-heading-style": "^0.1.0",
"mdast-util-position": "^0.2.0",
"mdast-util-to-string": "^0.1.0",
"mdast-range": "^1.0.0",
"mdast-util-heading-style": "^1.0.0",
"mdast-util-position": "^1.0.0",
"mdast-util-to-string": "^1.0.0",
"mdast-zone": "^1.0.0",
"plur": "^2.0.0",
"unist-util-visit": "^1.0.0",
"mdast-zone": "^0.2.1",
"plur": "^2.0.0"
"vfile-sort": "^1.0.0"
},
"files": [
"index.js",
"lib/",
"LICENSE"
"lib/"
],
"devDependencies": {
"browserify": "^11.0.0",
@ -40,10 +33,10 @@
"istanbul": "^0.3.0",
"jscs": "^2.0.0",
"jscs-jsdoc": "^1.0.0",
"mdast": "^0.28.0",
"mdast": "^1.0.0",
"mdast-comment-config": "^1.0.0",
"mdast-github": "^0.3.0",
"mdast-toc": "^0.5.0",
"mdast-yaml-config": "^0.2.0",
"mocha": "^2.0.0",
"vfile": "^1.0.0"
},
@ -58,7 +51,7 @@
"lint": "npm run lint-api && npm run lint-style",
"make": "npm run lint && npm run test-coverage",
"build-rules": "node script/build-rule-documentation.js",
"build-md": "mdast . LICENSE --output --quiet",
"build-md": "mdast . --quiet",
"build-bundle": "browserify index.js --bare -s mdastLint > mdast-lint.js",
"postbuild-bundle": "esmangle mdast-lint.js > mdast-lint.min.js",
"build": "npm run build-rules && npm run build-md && npm run build-bundle"