Skip to content

Commit 8ea86e6

Browse files
committed
Update dev-dependencies
1 parent 2f98b3e commit 8ea86e6

File tree

4 files changed

+20
-23
lines changed

4 files changed

+20
-23
lines changed

.prettierignore

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
.DS_Store
2-
*.log
3-
.nyc_output/
41
coverage/
5-
node_modules/
6-
yarn.lock
2+
*.json
3+
*.md

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ parser.registerNestingOperators('>', '+', '~')
2121
parser.registerAttrEqualityMods('~', '|', '^', '$', '*')
2222

2323
function fromSelector(selector, space) {
24-
var opts = (typeof space === 'string' ? {space: space} : space) || {}
24+
var options = (typeof space === 'string' ? {space: space} : space) || {}
2525
var result = parser.parse(selector || '')
26-
var config = {space: opts.space || 'html', root: true}
26+
var config = {space: options.space || 'html', root: true}
2727

2828
return compile(result, config) || build(config.space)()
2929
}

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
},
3737
"devDependencies": {
3838
"nyc": "^15.0.0",
39-
"prettier": "^1.0.0",
40-
"remark-cli": "^7.0.0",
41-
"remark-preset-wooorm": "^6.0.0",
42-
"tape": "^4.0.0",
39+
"prettier": "^2.0.0",
40+
"remark-cli": "^8.0.0",
41+
"remark-preset-wooorm": "^7.0.0",
42+
"tape": "^5.0.0",
4343
"unist-builder": "^2.0.0",
44-
"xo": "^0.27.0"
44+
"xo": "^0.32.0"
4545
},
4646
"scripts": {
47-
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
47+
"format": "remark . -qfo && prettier . --write && xo --fix",
4848
"test-api": "node test",
4949
"test-coverage": "nyc --reporter lcov tape test.js",
5050
"test": "npm run format && npm run test-coverage"

test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,75 +5,75 @@ var h = require('hastscript')
55
var s = require('hastscript/svg')
66
var from = require('.')
77

8-
test('fromSelector()', function(t) {
8+
test('fromSelector()', function (t) {
99
t.equal(typeof from, 'function', 'should expose a function')
1010

1111
t.throws(
12-
function() {
12+
function () {
1313
from('@supports (transform-origin: 5% 5%) {}')
1414
},
1515
/Error: Rule expected but "@" found/,
1616
'should throw w/ invalid selector'
1717
)
1818

1919
t.throws(
20-
function() {
20+
function () {
2121
from('a, b')
2222
},
2323
/Error: Cannot handle selector list/,
2424
'should throw w/ multiple selector'
2525
)
2626

2727
t.throws(
28-
function() {
28+
function () {
2929
from('a + b')
3030
},
3131
/Error: Cannot handle sibling combinator `\+` at root/,
3232
'should throw w/ next-sibling combinator at root'
3333
)
3434

3535
t.throws(
36-
function() {
36+
function () {
3737
from('a ~ b')
3838
},
3939
/Error: Cannot handle sibling combinator `~` at root/,
4040
'should throw w/ subsequent-sibling combinator at root'
4141
)
4242

4343
t.throws(
44-
function() {
44+
function () {
4545
from('[foo%=bar]')
4646
},
4747
/Error: Expected "=" but "%" found./,
4848
'should throw w/ attribute modifiers'
4949
)
5050

5151
t.throws(
52-
function() {
52+
function () {
5353
from('[foo~=bar]')
5454
},
5555
/Error: Cannot handle attribute equality modifier `~=`/,
5656
'should throw w/ attribute modifiers'
5757
)
5858

5959
t.throws(
60-
function() {
60+
function () {
6161
from(':active')
6262
},
6363
/Error: Cannot handle pseudo-selector `active`/,
6464
'should throw on pseudo classes'
6565
)
6666

6767
t.throws(
68-
function() {
68+
function () {
6969
from(':nth-foo(2n+1)')
7070
},
7171
/Error: Cannot handle pseudo-selector `nth-foo`/,
7272
'should throw on pseudo class “functions”'
7373
)
7474

7575
t.throws(
76-
function() {
76+
function () {
7777
from('::before')
7878
},
7979
/Error: Cannot handle pseudo-element or empty pseudo-class/,

0 commit comments

Comments
 (0)