@atlaskit/eslint-plugin-ui-styling-standard 0.18.0 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/rules/no-imported-style-values/index.js +36 -5
  3. package/dist/es2019/rules/no-imported-style-values/index.js +36 -5
  4. package/dist/esm/rules/no-imported-style-values/index.js +36 -5
  5. package/package.json +1 -1
  6. package/afm-cc/tsconfig.json +0 -28
  7. package/afm-jira/tsconfig.json +0 -27
  8. package/build/tsconfig.json +0 -18
  9. package/constellation/atlaskit-theme/usage.mdx +0 -132
  10. package/constellation/consistent-css-prop-usage/usage.mdx +0 -7
  11. package/constellation/convert-props-syntax/usage.mdx +0 -130
  12. package/constellation/enforce-style-prop/usage.mdx +0 -47
  13. package/constellation/index/migration-guide.mdx +0 -309
  14. package/constellation/index/overview.mdx +0 -250
  15. package/constellation/index/props.mdx +0 -30
  16. package/constellation/local-cx-xcss/usage.mdx +0 -53
  17. package/constellation/no-array-arguments/usage.mdx +0 -49
  18. package/constellation/no-classname-prop/usage.mdx +0 -49
  19. package/constellation/no-container-queries/usage.mdx +0 -101
  20. package/constellation/no-css-tagged-template-expression/usage.mdx +0 -8
  21. package/constellation/no-dynamic-styles/usage.mdx +0 -130
  22. package/constellation/no-empty-styled-expression/usage.mdx +0 -8
  23. package/constellation/no-exported-css/usage.mdx +0 -8
  24. package/constellation/no-exported-keyframes/usage.mdx +0 -8
  25. package/constellation/no-exported-styles/usage.mdx +0 -87
  26. package/constellation/no-global-styles/usage.mdx +0 -60
  27. package/constellation/no-important-styles/usage.mdx +0 -33
  28. package/constellation/no-imported-style-values/usage.mdx +0 -157
  29. package/constellation/no-invalid-css-map/usage.mdx +0 -8
  30. package/constellation/no-js-xcss/usage.mdx +0 -7
  31. package/constellation/no-keyframes-tagged-template-expression/usage.mdx +0 -8
  32. package/constellation/no-nested-selectors/usage.mdx +0 -95
  33. package/constellation/no-styled/usage.mdx +0 -92
  34. package/constellation/no-styled-tagged-template-expression/usage.mdx +0 -8
  35. package/constellation/no-suppress-xcss/usage.mdx +0 -28
  36. package/constellation/no-unsafe-selectors/usage.mdx +0 -370
  37. package/constellation/no-unsafe-values/usage.mdx +0 -318
  38. package/constellation/use-compiled/usage.mdx +0 -54
  39. package/index.js +0 -24
  40. package/scripts/codegen.tsx +0 -373
  41. package/src/index.codegen.tsx +0 -14
  42. package/src/index.tsx +0 -1
  43. package/src/presets/all.codegen.tsx +0 -79
  44. package/src/presets/recommended.codegen.tsx +0 -79
  45. package/src/rules/TEMPLATE.md +0 -29
  46. package/src/rules/__tests__/utils/_tester.tsx +0 -40
  47. package/src/rules/atlaskit-theme/README.md +0 -130
  48. package/src/rules/atlaskit-theme/__tests__/test.ts +0 -133
  49. package/src/rules/atlaskit-theme/index.ts +0 -134
  50. package/src/rules/convert-props-syntax/README.md +0 -128
  51. package/src/rules/convert-props-syntax/__tests__/invalid.test.tsx +0 -76
  52. package/src/rules/convert-props-syntax/__tests__/rule.test.tsx +0 -584
  53. package/src/rules/convert-props-syntax/__tests__/type-annotations.test.tsx +0 -140
  54. package/src/rules/convert-props-syntax/__tests__/unusual-properties.test.tsx +0 -69
  55. package/src/rules/convert-props-syntax/index.tsx +0 -414
  56. package/src/rules/enforce-style-prop/README.md +0 -45
  57. package/src/rules/enforce-style-prop/__tests__/rule.test.tsx +0 -243
  58. package/src/rules/enforce-style-prop/index.tsx +0 -172
  59. package/src/rules/external-rules.tsx +0 -177
  60. package/src/rules/index.codegen.tsx +0 -42
  61. package/src/rules/local-cx-xcss/README.md +0 -51
  62. package/src/rules/local-cx-xcss/__tests__/rule.test.tsx +0 -102
  63. package/src/rules/local-cx-xcss/index.tsx +0 -62
  64. package/src/rules/no-array-arguments/README.md +0 -47
  65. package/src/rules/no-array-arguments/__tests__/rule.test.tsx +0 -107
  66. package/src/rules/no-array-arguments/index.tsx +0 -86
  67. package/src/rules/no-classname-prop/README.md +0 -47
  68. package/src/rules/no-classname-prop/__tests__/rule.test.tsx +0 -39
  69. package/src/rules/no-classname-prop/index.tsx +0 -34
  70. package/src/rules/no-container-queries/README.md +0 -99
  71. package/src/rules/no-container-queries/__tests__/rule.test.tsx +0 -139
  72. package/src/rules/no-container-queries/index.tsx +0 -94
  73. package/src/rules/no-dynamic-styles/README.md +0 -128
  74. package/src/rules/no-dynamic-styles/__tests__/rule.test.tsx +0 -135
  75. package/src/rules/no-dynamic-styles/index.tsx +0 -60
  76. package/src/rules/no-exported-styles/README.md +0 -85
  77. package/src/rules/no-exported-styles/__tests__/rule.test.tsx +0 -216
  78. package/src/rules/no-exported-styles/index.tsx +0 -52
  79. package/src/rules/no-global-styles/README.md +0 -58
  80. package/src/rules/no-global-styles/__tests__/no-css-modules.test.tsx +0 -33
  81. package/src/rules/no-global-styles/__tests__/no-global-styles.test.tsx +0 -46
  82. package/src/rules/no-global-styles/index.tsx +0 -82
  83. package/src/rules/no-important-styles/README.md +0 -31
  84. package/src/rules/no-important-styles/__tests__/rule.test.tsx +0 -165
  85. package/src/rules/no-important-styles/index.tsx +0 -70
  86. package/src/rules/no-imported-style-values/README.md +0 -155
  87. package/src/rules/no-imported-style-values/__tests__/rule.test.tsx +0 -491
  88. package/src/rules/no-imported-style-values/index.tsx +0 -188
  89. package/src/rules/no-nested-selectors/README.md +0 -93
  90. package/src/rules/no-nested-selectors/__tests__/rule.test.tsx +0 -335
  91. package/src/rules/no-nested-selectors/index.tsx +0 -99
  92. package/src/rules/no-styled/README.md +0 -90
  93. package/src/rules/no-styled/__tests__/rule.test.tsx +0 -73
  94. package/src/rules/no-styled/index.tsx +0 -45
  95. package/src/rules/no-unsafe-selectors/README.md +0 -368
  96. package/src/rules/no-unsafe-selectors/__tests__/no-ambiguous-pseudos.test.tsx +0 -368
  97. package/src/rules/no-unsafe-selectors/__tests__/no-grouped-at-rules.test.tsx +0 -57
  98. package/src/rules/no-unsafe-selectors/__tests__/no-increased-specificity.test.tsx +0 -73
  99. package/src/rules/no-unsafe-selectors/__tests__/no-keyframes-at-rules.test.tsx +0 -40
  100. package/src/rules/no-unsafe-selectors/__tests__/no-legacy-pseudo-element-syntax.test.tsx +0 -101
  101. package/src/rules/no-unsafe-selectors/__tests__/no-restricted-at-rules.test.tsx +0 -131
  102. package/src/rules/no-unsafe-selectors/__tests__/no-restricted-pseudos.test.tsx +0 -132
  103. package/src/rules/no-unsafe-selectors/__tests__/no-selectors-object.test.tsx +0 -25
  104. package/src/rules/no-unsafe-selectors/__tests__/no-unparsable-selectors.test.tsx +0 -35
  105. package/src/rules/no-unsafe-selectors/__tests__/rule.test.tsx +0 -257
  106. package/src/rules/no-unsafe-selectors/constants.tsx +0 -91
  107. package/src/rules/no-unsafe-selectors/index.tsx +0 -198
  108. package/src/rules/no-unsafe-selectors/lint-selector.tsx +0 -155
  109. package/src/rules/no-unsafe-selectors/source-position-utils.tsx +0 -55
  110. package/src/rules/no-unsafe-selectors/walk-css-map.tsx +0 -226
  111. package/src/rules/no-unsafe-values/README.md +0 -316
  112. package/src/rules/no-unsafe-values/__tests__/no-array-values.test.tsx +0 -27
  113. package/src/rules/no-unsafe-values/__tests__/no-conditional-values.test.tsx +0 -37
  114. package/src/rules/no-unsafe-values/__tests__/no-dynamic-keys.test.tsx +0 -229
  115. package/src/rules/no-unsafe-values/__tests__/no-function-calls.test.tsx +0 -267
  116. package/src/rules/no-unsafe-values/__tests__/no-identifier-arguments.test.tsx +0 -52
  117. package/src/rules/no-unsafe-values/__tests__/no-object-access.test.tsx +0 -106
  118. package/src/rules/no-unsafe-values/__tests__/no-object-references.test.tsx +0 -44
  119. package/src/rules/no-unsafe-values/__tests__/no-spread-elements.test.tsx +0 -48
  120. package/src/rules/no-unsafe-values/__tests__/no-unsafe-values.test.tsx +0 -75
  121. package/src/rules/no-unsafe-values/__tests__/no-variables.test.tsx +0 -121
  122. package/src/rules/no-unsafe-values/index.tsx +0 -94
  123. package/src/rules/no-unsafe-values/messages.tsx +0 -86
  124. package/src/rules/no-unsafe-values/utils.tsx +0 -387
  125. package/src/rules/use-compiled/README.md +0 -52
  126. package/src/rules/use-compiled/__tests__/can-auto-fix.test.tsx +0 -73
  127. package/src/rules/use-compiled/__tests__/css.test.tsx +0 -126
  128. package/src/rules/use-compiled/__tests__/imports.test.tsx +0 -158
  129. package/src/rules/use-compiled/__tests__/keyframes.test.tsx +0 -140
  130. package/src/rules/use-compiled/__tests__/pragma.test.tsx +0 -108
  131. package/src/rules/use-compiled/__tests__/styled.test.tsx +0 -114
  132. package/src/rules/use-compiled/__tests__/use-compiled.test.tsx +0 -15
  133. package/src/rules/use-compiled/index.tsx +0 -252
  134. package/src/rules/use-compiled/is-safe.tsx +0 -159
  135. package/src/rules/use-compiled/utils.tsx +0 -33
  136. package/src/rules/utils/create-rule-with-typed-config.tsx +0 -86
  137. package/src/rules/utils/create-rule.tsx +0 -13
  138. package/tsconfig.app.json +0 -47
  139. package/tsconfig.dev.json +0 -45
  140. package/tsconfig.json +0 -25
@@ -1,368 +0,0 @@
1
- import outdent from 'outdent';
2
-
3
- import { tester } from '../../__tests__/utils/_tester';
4
- import rule from '../index';
5
-
6
- tester.run('no-ambiguous-pseudos', rule, {
7
- valid: [
8
- {
9
- name: '& is used',
10
- code: `
11
- import { css } from '@compiled/react';
12
-
13
- css({
14
- '&:hover': {},
15
- '&:focus, &:active': {},
16
- });
17
- `,
18
- },
19
- {
20
- name: '& is used with compound selector',
21
- code: `
22
- import { css } from '@compiled/react';
23
-
24
- css({
25
- '&:hover:focus': {}
26
- });
27
- `,
28
- },
29
- {
30
- name: '* is used',
31
- code: `
32
- import { css } from '@compiled/react';
33
-
34
- css({
35
- '*:hover': {},
36
- '*:focus, *:active': {},
37
- '*:hover:focus': {},
38
- });
39
- `,
40
- },
41
- {
42
- name: 'missing & after attribute',
43
- code: `
44
- import { css } from '@compiled/react';
45
-
46
- css({
47
- '[data-testid]:hover': {}
48
- });
49
- `,
50
- },
51
- {
52
- name: 'missing & after attribute with value',
53
- code: `
54
- import { css } from '@compiled/react';
55
-
56
- css({
57
- '[data-testid="abc"]:hover': {}
58
- });
59
- `,
60
- },
61
- {
62
- name: 'missing & after descendant selector',
63
- code: `
64
- import { css } from '@compiled/react';
65
-
66
- css({
67
- '& :hover': {},
68
- });
69
- `,
70
- },
71
- {
72
- name: 'missing & after sibling selector',
73
- code: `
74
- import { css } from '@compiled/react';
75
-
76
- css({
77
- '& + :hover': {},
78
- });
79
- `,
80
- },
81
- {
82
- name: 'should ignore xcss',
83
- code: `
84
- import { xcss } from '@atlaskit/primitives';
85
-
86
- xcss({
87
- ':hover': {},
88
- });
89
- `,
90
- },
91
- ],
92
- invalid: [
93
- {
94
- name: 'missing &',
95
- code: outdent`
96
- import { css } from '@compiled/react';
97
-
98
- css({
99
- ':hover': {},
100
- });
101
- `,
102
- output: outdent`
103
- import { css } from '@compiled/react';
104
-
105
- css({
106
- '&:hover': {},
107
- });
108
- `,
109
- errors: [
110
- {
111
- messageId: 'no-ambiguous-pseudos',
112
- line: 4,
113
- column: 4,
114
- endColumn: 10,
115
- },
116
- ],
117
- },
118
- {
119
- name: 'multiple selectors in list with missing &',
120
- code: outdent`
121
- import { css } from '@compiled/react';
122
-
123
- css({
124
- ':hover, :focus': {},
125
- });
126
- `,
127
- output: outdent`
128
- import { css } from '@compiled/react';
129
-
130
- css({
131
- '&:hover, &:focus': {},
132
- });
133
- `,
134
- errors: [
135
- {
136
- messageId: 'no-ambiguous-pseudos',
137
- line: 4,
138
- column: 4,
139
- endColumn: 10,
140
- },
141
- {
142
- messageId: 'no-ambiguous-pseudos',
143
- line: 4,
144
- column: 12,
145
- endColumn: 18,
146
- },
147
- ],
148
- },
149
- {
150
- name: 'multiple selectors in list with one missing &',
151
- code: outdent`
152
- import { css } from '@compiled/react';
153
-
154
- css({
155
- '&:hover, :focus': {},
156
- });
157
- `,
158
- output: outdent`
159
- import { css } from '@compiled/react';
160
-
161
- css({
162
- '&:hover, &:focus': {},
163
- });
164
- `,
165
- errors: [
166
- {
167
- messageId: 'no-ambiguous-pseudos',
168
- line: 4,
169
- column: 13,
170
- endColumn: 19,
171
- },
172
- ],
173
- },
174
- {
175
- name: 'compound selector with missing &',
176
- code: outdent`
177
- import { css } from '@compiled/react';
178
-
179
- css({
180
- ':hover:focus': {},
181
- });
182
- `,
183
- output: outdent`
184
- import { css } from '@compiled/react';
185
-
186
- css({
187
- '&:hover:focus': {},
188
- });
189
- `,
190
- errors: [
191
- {
192
- messageId: 'no-ambiguous-pseudos',
193
- line: 4,
194
- column: 4,
195
- endColumn: 10,
196
- },
197
- ],
198
- },
199
- ],
200
- });
201
-
202
- tester.run(
203
- 'no-ambiguous-pseudos with shouldAlwaysInsertNestingSelectorForAmbiguousPseudos disabled',
204
- rule,
205
- {
206
- valid: [],
207
- invalid: [
208
- {
209
- name: 'missing &',
210
- code: outdent`
211
- import { css } from '@compiled/react';
212
-
213
- css({
214
- ':hover': {},
215
- });
216
- `,
217
- options: [
218
- {
219
- shouldAlwaysInsertNestingSelectorForAmbiguousPseudos: false,
220
- },
221
- ],
222
- errors: [
223
- {
224
- messageId: 'no-ambiguous-pseudos',
225
- line: 4,
226
- column: 4,
227
- endColumn: 10,
228
- suggestions: [
229
- {
230
- messageId: 'insert-nesting-selector',
231
- output: outdent`
232
- import { css } from '@compiled/react';
233
-
234
- css({
235
- '&:hover': {},
236
- });
237
- `,
238
- },
239
- ],
240
- },
241
- ],
242
- },
243
- {
244
- name: 'multiple selectors in list with missing &',
245
- code: outdent`
246
- import { css } from '@compiled/react';
247
-
248
- css({
249
- ':hover, :focus': {},
250
- });
251
- `,
252
- options: [
253
- {
254
- shouldAlwaysInsertNestingSelectorForAmbiguousPseudos: false,
255
- },
256
- ],
257
- errors: [
258
- {
259
- messageId: 'no-ambiguous-pseudos',
260
- line: 4,
261
- column: 4,
262
- endColumn: 10,
263
- suggestions: [
264
- {
265
- messageId: 'insert-nesting-selector',
266
- output: outdent`
267
- import { css } from '@compiled/react';
268
-
269
- css({
270
- '&:hover, :focus': {},
271
- });
272
- `,
273
- },
274
- ],
275
- },
276
- {
277
- messageId: 'no-ambiguous-pseudos',
278
- line: 4,
279
- column: 12,
280
- endColumn: 18,
281
- suggestions: [
282
- {
283
- messageId: 'insert-nesting-selector',
284
- output: outdent`
285
- import { css } from '@compiled/react';
286
-
287
- css({
288
- ':hover, &:focus': {},
289
- });
290
- `,
291
- },
292
- ],
293
- },
294
- ],
295
- },
296
- {
297
- name: 'multiple selectors in list with one missing &',
298
- code: outdent`
299
- import { css } from '@compiled/react';
300
-
301
- css({
302
- '&:hover, :focus': {},
303
- });
304
- `,
305
- options: [
306
- {
307
- shouldAlwaysInsertNestingSelectorForAmbiguousPseudos: false,
308
- },
309
- ],
310
- errors: [
311
- {
312
- messageId: 'no-ambiguous-pseudos',
313
- line: 4,
314
- column: 13,
315
- endColumn: 19,
316
- suggestions: [
317
- {
318
- messageId: 'insert-nesting-selector',
319
- output: outdent`
320
- import { css } from '@compiled/react';
321
-
322
- css({
323
- '&:hover, &:focus': {},
324
- });
325
- `,
326
- },
327
- ],
328
- },
329
- ],
330
- },
331
- {
332
- name: 'compound selector with missing &',
333
- code: outdent`
334
- import { css } from '@compiled/react';
335
-
336
- css({
337
- ':hover:focus': {},
338
- });
339
- `,
340
- options: [
341
- {
342
- shouldAlwaysInsertNestingSelectorForAmbiguousPseudos: false,
343
- },
344
- ],
345
- errors: [
346
- {
347
- messageId: 'no-ambiguous-pseudos',
348
- line: 4,
349
- column: 4,
350
- endColumn: 10,
351
- suggestions: [
352
- {
353
- messageId: 'insert-nesting-selector',
354
- output: outdent`
355
- import { css } from '@compiled/react';
356
-
357
- css({
358
- '&:hover:focus': {},
359
- });
360
- `,
361
- },
362
- ],
363
- },
364
- ],
365
- },
366
- ],
367
- },
368
- );
@@ -1,57 +0,0 @@
1
- import { tester } from '../../__tests__/utils/_tester';
2
- import rule from '../index';
3
-
4
- tester.run('no-grouped-at-rules', rule, {
5
- valid: [],
6
- invalid: [
7
- {
8
- name: '@media grouping',
9
- code: `
10
- import { cssMap } from '@compiled/react';
11
-
12
- cssMap({
13
- variant: {
14
- '@media': {
15
- '(min-width: 900px)': {},
16
- '(min-width: 1200px)': {},
17
- }
18
- }
19
- });
20
- `,
21
- errors: [{ messageId: 'no-grouped-at-rules' }],
22
- },
23
- {
24
- name: '@keyframes grouping',
25
- code: `
26
- import { cssMap } from '@compiled/react';
27
-
28
- cssMap({
29
- success: {
30
- '@keyframes': {
31
- 'fadeIn': {}
32
- }
33
- }
34
- });
35
- `,
36
- errors: [{ messageId: 'no-grouped-at-rules' }, { messageId: 'no-keyframes-at-rules' }],
37
- },
38
- {
39
- name: '@scope grouping',
40
- code: `
41
- import { cssMap } from '@compiled/react';
42
-
43
- cssMap({
44
- success: {
45
- '@scope': {
46
- '(body) to (article)': {}
47
- }
48
- }
49
- });
50
- `,
51
- errors: [
52
- { messageId: 'no-grouped-at-rules' },
53
- { messageId: 'no-restricted-at-rules', data: { atRule: '@scope' } },
54
- ],
55
- },
56
- ],
57
- });
@@ -1,73 +0,0 @@
1
- import { tester } from '../../__tests__/utils/_tester';
2
- import rule from '../index';
3
-
4
- tester.run('no-increased-specificity', rule, {
5
- valid: [
6
- {
7
- name: 'multiple & in selector list',
8
- code: `
9
- import { css } from '@compiled/react';
10
-
11
- css({
12
- '&:hover, &:active': {},
13
- });
14
- `,
15
- },
16
- ],
17
- invalid: [
18
- {
19
- name: 'single &',
20
- code: `
21
- import { css } from '@compiled/react';
22
-
23
- css({
24
- '&': {},
25
- });
26
- `,
27
- errors: [
28
- {
29
- messageId: 'no-increased-specificity',
30
- line: 5,
31
- column: 12,
32
- endColumn: 13,
33
- },
34
- ],
35
- },
36
- {
37
- name: 'double &',
38
- code: `
39
- import { css } from '@compiled/react';
40
-
41
- css({
42
- '&&': {},
43
- });
44
- `,
45
- errors: [
46
- {
47
- messageId: 'no-increased-specificity',
48
- line: 5,
49
- column: 12,
50
- endColumn: 14,
51
- },
52
- ],
53
- },
54
- {
55
- name: 'longer chain of &',
56
- code: `
57
- import { css } from '@compiled/react';
58
-
59
- css({
60
- '&&&&&&&&&': {},
61
- });
62
- `,
63
- errors: [
64
- {
65
- messageId: 'no-increased-specificity',
66
- line: 5,
67
- column: 12,
68
- endColumn: 21,
69
- },
70
- ],
71
- },
72
- ],
73
- });
@@ -1,40 +0,0 @@
1
- import { tester } from '../../__tests__/utils/_tester';
2
- import rule from '../index';
3
-
4
- tester.run('no-keyframes-at-rules', rule, {
5
- valid: [],
6
- invalid: [
7
- {
8
- name: '@keyframes',
9
- code: `
10
- import { css } from '@compiled/react';
11
-
12
- css({
13
- '@keyframes fadeIn': {}
14
- });
15
- `,
16
- errors: [
17
- {
18
- messageId: 'no-keyframes-at-rules',
19
- },
20
- ],
21
- },
22
- {
23
- name: '@keyframes in cssMap',
24
- code: `
25
- import { cssMap } from '@compiled/react';
26
-
27
- cssMap({
28
- success: {
29
- '@keyframes fadeIn': {}
30
- }
31
- });
32
- `,
33
- errors: [
34
- {
35
- messageId: 'no-keyframes-at-rules',
36
- },
37
- ],
38
- },
39
- ],
40
- });
@@ -1,101 +0,0 @@
1
- import { tester } from '../../__tests__/utils/_tester';
2
- import rule from '../index';
3
-
4
- tester.run('no-legacy-pseudo-element-syntax', rule, {
5
- valid: [
6
- {
7
- code: `
8
- import { css } from '@compiled/react';
9
-
10
- css({
11
- '&::after': {},
12
- '&::before': {},
13
- '&::first-letter': {},
14
- '&::first-line': {},
15
- });
16
- `,
17
- },
18
- ],
19
- invalid: [
20
- {
21
- name: 'single colon syntax for pseudo elements',
22
- code: `
23
- import { css } from '@compiled/react';
24
-
25
- css({
26
- '&:after': {},
27
- '&:before': {},
28
- '&:first-letter': {},
29
- '&:first-line': {},
30
- });
31
- `,
32
- output: `
33
- import { css } from '@compiled/react';
34
-
35
- css({
36
- '&::after': {},
37
- '&::before': {},
38
- '&::first-letter': {},
39
- '&::first-line': {},
40
- });
41
- `,
42
- errors: [
43
- {
44
- messageId: 'no-legacy-pseudo-element-syntax',
45
- line: 5,
46
- column: 13,
47
- endColumn: 19,
48
- },
49
- {
50
- messageId: 'no-legacy-pseudo-element-syntax',
51
- line: 6,
52
- column: 13,
53
- endColumn: 20,
54
- },
55
- {
56
- messageId: 'no-legacy-pseudo-element-syntax',
57
- line: 7,
58
- column: 13,
59
- endColumn: 26,
60
- },
61
- {
62
- messageId: 'no-legacy-pseudo-element-syntax',
63
- line: 8,
64
- column: 13,
65
- endColumn: 24,
66
- },
67
- ],
68
- },
69
- {
70
- name: 'single colon syntax in complex selector',
71
- code: `
72
- import { css } from '@compiled/react';
73
-
74
- css({
75
- '&:hover:after, &:active:before': {},
76
- });
77
- `,
78
- output: `
79
- import { css } from '@compiled/react';
80
-
81
- css({
82
- '&:hover::after, &:active::before': {},
83
- });
84
- `,
85
- errors: [
86
- {
87
- messageId: 'no-legacy-pseudo-element-syntax',
88
- line: 5,
89
- column: 19,
90
- endColumn: 25,
91
- },
92
- {
93
- messageId: 'no-legacy-pseudo-element-syntax',
94
- line: 5,
95
- column: 35,
96
- endColumn: 42,
97
- },
98
- ],
99
- },
100
- ],
101
- });