Skip to content

Commit 4982ee1

Browse files
authored
Add document.lang (stylelint#20)
1 parent 1d8ce21 commit 4982ee1

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"use strict";
22
const extract = require("./extract");
3-
const syntax = require("postcss-syntax/syntax")(extract);
3+
const syntax = require("postcss-syntax/syntax")(extract, "jsx");
44

55
module.exports = syntax;

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-jsx",
3-
"version": "0.28.0",
3+
"version": "0.30.0",
44
"description": "PostCSS syntax for parsing CSS in JS literals",
55
"repository": {
66
"type": "git",
@@ -45,14 +45,14 @@
4545
"@babel/parser": "^7.0.0-beta.49",
4646
"@babel/traverse": "^7.0.0-beta.49",
4747
"@babel/types": "^7.0.0-beta.49",
48-
"postcss-styled": ">=0.28.0"
48+
"postcss-styled": ">=0.30.0"
4949
},
5050
"peerDependencies": {
5151
"postcss": ">=5.0.0",
52-
"postcss-syntax": ">=0.28.0"
52+
"postcss-syntax": ">=0.30.0"
5353
},
5454
"devDependencies": {
55-
"autoprefixer": "^8.6.2",
55+
"autoprefixer": "^8.6.3",
5656
"chai": "^4.1.2",
5757
"codecov": "^3.0.2",
5858
"json5": "^1.0.1",
@@ -61,6 +61,6 @@
6161
"postcss": "^6.0.22",
6262
"postcss-parser-tests": "^6.2.1",
6363
"postcss-safe-parser": "^3.0.1",
64-
"postcss-syntax": ">=0.28.0"
64+
"postcss-syntax": ">=0.30.0"
6565
}
6666
}

test/non-style.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ describe("non-style js files", () => {
1212
const document = syntax.parse(code, {
1313
from: file,
1414
});
15+
expect(document.source).to.haveOwnProperty("lang", "jsx");
1516
expect(document.toString(), code.toString());
1617
});
1718
});

0 commit comments

Comments
 (0)