File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ const supports = {
43
43
// import styled from "react-emotion";
44
44
'react-emotion' : true ,
45
45
46
+ // import styled from 'vue-emotion';
47
+ // Also see:
48
+ // - https://github.com/stylelint/stylelint/issues/4247
49
+ // - https://github.com/gucong3000/postcss-jsx/issues/63
50
+ // - https://github.com/stylelint/postcss-css-in-js/issues/22
51
+ 'vue-emotion' : true ,
52
+
46
53
// import styled from 'preact-emotion'
47
54
'preact-emotion' : true ,
48
55
Original file line number Diff line number Diff line change @@ -67,4 +67,35 @@ describe('javascript tests', () => {
67
67
} ) ;
68
68
} ) ;
69
69
} ) ;
70
+
71
+ it ( 'works with vue-emotion' , ( ) => {
72
+ // Related issues:
73
+ // - https://github.com/stylelint/stylelint/issues/4247
74
+ // - https://github.com/gucong3000/postcss-jsx/issues/63
75
+ // - https://github.com/stylelint/postcss-css-in-js/issues/22
76
+ const parsed = syntax . parse ( `
77
+ import styled from 'vue-emotion';
78
+
79
+ const Wrapper = styled('div')\`
80
+ left: 0;
81
+ top: 0;
82
+ width: 100%;
83
+ height: 100%;
84
+ \`;
85
+ ` ) ;
86
+
87
+ expect ( parsed . nodes ) . toHaveLength ( 1 ) ;
88
+ } ) ;
89
+
90
+ it ( 'works with @emotion/styled' , ( ) => {
91
+ const parsed = syntax . parse ( `
92
+ import styled from '@emotion/styled';
93
+
94
+ const Wrapper = styled.div\`
95
+ left: 0;
96
+ \`;
97
+ ` ) ;
98
+
99
+ expect ( parsed . nodes ) . toHaveLength ( 1 ) ;
100
+ } ) ;
70
101
} ) ;
You can’t perform that action at this time.
0 commit comments