Skip to content

Commit a05338c

Browse files
committed
Update dev-dependencies
1 parent 16e19f7 commit a05338c

File tree

4 files changed

+37
-35
lines changed

4 files changed

+37
-35
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
coverage/
22
mdast-util-to-nlcst.js
33
mdast-util-to-nlcst.min.js
4+
*.json
5+
*.md

index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,20 @@ function all(config, parent) {
106106
var child
107107
var node
108108
var pos
109-
var prevEndLine
110-
var prevOffset
109+
var previousEndLine
110+
var previousOffset
111111
var endLine
112112

113113
while (++index < length) {
114114
node = children[index]
115115
pos = node.position
116116
endLine = position.start(node).line
117117

118-
if (prevEndLine && endLine !== prevEndLine) {
118+
if (previousEndLine && endLine !== previousEndLine) {
119119
child = config.parser.tokenizeWhiteSpace(
120-
repeat(newline, endLine - prevEndLine)
120+
repeat(newline, endLine - previousEndLine)
121121
)
122-
patch(config, [child], prevOffset)
122+
patch(config, [child], previousOffset)
123123

124124
if (child.value.length < 2) {
125125
child.value = repeat(newline, 2)
@@ -135,8 +135,8 @@ function all(config, parent) {
135135
}
136136

137137
pos = position.end(node)
138-
prevEndLine = pos.line
139-
prevOffset = pos.offset
138+
previousEndLine = pos.line
139+
previousOffset = pos.offset
140140
}
141141

142142
return result

package.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,20 @@
4242
"parse-dutch": "^4.0.0",
4343
"parse-english": "^4.0.0",
4444
"parse-latin": "^4.0.0",
45-
"prettier": "^1.0.0",
46-
"remark": "^11.0.0",
47-
"remark-cli": "^7.0.0",
48-
"remark-frontmatter": "^1.0.0",
49-
"remark-preset-wooorm": "^6.0.0",
50-
"tape": "^4.0.0",
45+
"prettier": "^2.0.0",
46+
"remark": "^12.0.0",
47+
"remark-cli": "^8.0.0",
48+
"remark-frontmatter": "^2.0.0",
49+
"remark-preset-wooorm": "^7.0.0",
50+
"tape": "^5.0.0",
5151
"tinyify": "^2.0.0",
5252
"vfile": "^4.0.0",
53-
"xo": "^0.26.0"
53+
"xo": "^0.32.0"
5454
},
5555
"scripts": {
56-
"format": "remark *.md -qfo && prettier --write \"**/*.js\" && xo --fix",
57-
"build-bundle": "browserify . -s mdastUtilToNLCST > mdast-util-to-nlcst.js",
58-
"build-mangle": "browserify . -s mdastUtilToNLCST -p tinyify > mdast-util-to-nlcst.min.js",
56+
"format": "remark *.md -qfo && prettier . --write && xo --fix",
57+
"build-bundle": "browserify . -s mdastUtilToNlcst > mdast-util-to-nlcst.js",
58+
"build-mangle": "browserify . -s mdastUtilToNlcst -p tinyify > mdast-util-to-nlcst.min.js",
5959
"build": "npm run build-bundle && npm run build-mangle",
6060
"test-api": "node test",
6161
"test-coverage": "nyc --reporter lcov tape test/index.js",
@@ -79,7 +79,9 @@
7979
"prettier": true,
8080
"esnext": false,
8181
"rules": {
82-
"unicorn/prefer-includes": "off"
82+
"unicorn/no-fn-reference-in-iterator": "off",
83+
"unicorn/prefer-includes": "off",
84+
"unicorn/prefer-optional-catch-binding": "off"
8385
},
8486
"ignores": [
8587
"mdast-util-to-nlcst.js"

test/index.js

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,64 +20,64 @@ var ROOT = join(__dirname, 'fixtures')
2020

2121
var fixtures = fs.readdirSync(ROOT)
2222

23-
test('mdast-util-to-nlcst', function(t) {
23+
test('mdast-util-to-nlcst', function (t) {
2424
t.throws(
25-
function() {
25+
function () {
2626
toNLCST()
2727
},
2828
/mdast-util-to-nlcst expected node/,
2929
'should fail when not given an AST'
3030
)
3131

3232
t.throws(
33-
function() {
33+
function () {
3434
toNLCST({})
3535
},
3636
/mdast-util-to-nlcst expected node/,
3737
'should fail when not given an AST (#2)'
3838
)
3939

4040
t.throws(
41-
function() {
41+
function () {
4242
toNLCST({type: 'foo'})
4343
},
4444
/mdast-util-to-nlcst expected file/,
4545
'should fail when not given a file'
4646
)
4747

4848
t.throws(
49-
function() {
49+
function () {
5050
toNLCST({type: 'foo'})
5151
},
5252
/mdast-util-to-nlcst expected file/,
5353
'should fail when not given a file (#2)'
5454
)
5555

5656
t.throws(
57-
function() {
57+
function () {
5858
toNLCST({type: 'text', value: 'foo'}, {foo: 'bar'})
5959
},
6060
/mdast-util-to-nlcst expected file/,
6161
'should fail when not given a file (#3)'
6262
)
6363

6464
t.throws(
65-
function() {
65+
function () {
6666
toNLCST({type: 'text', value: 'foo'}, vfile('foo'))
6767
},
6868
/mdast-util-to-nlcst expected parser/,
6969
'should fail without parser'
7070
)
7171

7272
t.throws(
73-
function() {
73+
function () {
7474
toNLCST({type: 'text', value: 'foo'}, vfile(), Latin)
7575
},
7676
/mdast-util-to-nlcst expected position on nodes/,
7777
'should fail when not given positional information'
7878
)
7979

80-
t.doesNotThrow(function() {
80+
t.doesNotThrow(function () {
8181
toNLCST(
8282
{
8383
type: 'text',
@@ -89,7 +89,7 @@ test('mdast-util-to-nlcst', function(t) {
8989
)
9090
}, 'should accept a parser constructor')
9191

92-
t.doesNotThrow(function() {
92+
t.doesNotThrow(function () {
9393
toNLCST(
9494
{
9595
type: 'text',
@@ -102,7 +102,7 @@ test('mdast-util-to-nlcst', function(t) {
102102
}, 'should accept a parser instance')
103103

104104
t.throws(
105-
function() {
105+
function () {
106106
toNLCST(
107107
{
108108
type: 'text',
@@ -117,7 +117,7 @@ test('mdast-util-to-nlcst', function(t) {
117117
'should fail when not given positional information (#2)'
118118
)
119119

120-
t.test('should accept nodes without offsets', function(st) {
120+
t.test('should accept nodes without offsets', function (st) {
121121
var node = toNLCST(
122122
{
123123
type: 'text',
@@ -137,8 +137,8 @@ test('mdast-util-to-nlcst', function(t) {
137137
t.end()
138138
})
139139

140-
test('Fixtures', function(t) {
141-
fixtures.filter(negate(hidden)).forEach(function(fixture) {
140+
test('Fixtures', function (t) {
141+
fixtures.filter(negate(hidden)).forEach(function (fixture) {
142142
var filepath = join(ROOT, fixture)
143143
var output = read(join(filepath, 'output.json'), 'utf-8')
144144
var input = read(join(filepath, 'input.md'), 'utf-8')
@@ -150,9 +150,7 @@ test('Fixtures', function(t) {
150150

151151
t.deepEqual(
152152
toNLCST(
153-
remark()
154-
.use(frontmatter)
155-
.parse(input),
153+
remark().use(frontmatter).parse(input),
156154
vfile(input),
157155
Latin,
158156
options

0 commit comments

Comments
 (0)