@atlaskit/eslint-plugin-ui-styling-standard 0.16.2 → 0.16.4
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.
- package/CHANGELOG.md +16 -0
- package/constellation/atlaskit-theme/usage.mdx +74 -55
- package/constellation/convert-props-syntax/usage.mdx +29 -24
- package/constellation/enforce-style-prop/usage.mdx +32 -26
- package/constellation/local-cx-xcss/usage.mdx +27 -15
- package/constellation/no-array-arguments/usage.mdx +12 -9
- package/constellation/no-classname-prop/usage.mdx +13 -5
- package/constellation/no-container-queries/usage.mdx +65 -16
- package/constellation/no-dynamic-styles/usage.mdx +16 -11
- package/constellation/no-exported-styles/usage.mdx +25 -30
- package/constellation/no-global-styles/usage.mdx +4 -3
- package/constellation/no-important-styles/usage.mdx +5 -3
- package/constellation/no-imported-style-values/usage.mdx +30 -27
- package/constellation/no-nested-selectors/usage.mdx +51 -18
- package/constellation/no-styled/usage.mdx +17 -14
- package/constellation/no-unsafe-selectors/usage.mdx +184 -58
- package/constellation/no-unsafe-values/usage.mdx +150 -48
- package/constellation/use-compiled/usage.mdx +8 -8
- package/dist/cjs/rules/no-array-arguments/index.js +3 -3
- package/dist/cjs/rules/no-dynamic-styles/index.js +2 -2
- package/dist/cjs/rules/no-imported-style-values/index.js +2 -2
- package/dist/cjs/rules/no-unsafe-values/index.js +2 -2
- package/dist/es2019/rules/no-array-arguments/index.js +2 -2
- package/dist/es2019/rules/no-dynamic-styles/index.js +1 -1
- package/dist/es2019/rules/no-imported-style-values/index.js +1 -1
- package/dist/es2019/rules/no-unsafe-values/index.js +1 -1
- package/dist/esm/rules/no-array-arguments/index.js +3 -3
- package/dist/esm/rules/no-dynamic-styles/index.js +2 -2
- package/dist/esm/rules/no-imported-style-values/index.js +2 -2
- package/dist/esm/rules/no-unsafe-values/index.js +2 -2
- package/package.json +8 -3
- package/src/rules/atlaskit-theme/README.md +74 -55
- package/src/rules/convert-props-syntax/README.md +29 -24
- package/src/rules/enforce-style-prop/README.md +32 -26
- package/src/rules/local-cx-xcss/README.md +27 -15
- package/src/rules/no-array-arguments/README.md +12 -9
- package/src/rules/no-array-arguments/index.tsx +2 -2
- package/src/rules/no-classname-prop/README.md +13 -5
- package/src/rules/no-container-queries/README.md +65 -16
- package/src/rules/no-dynamic-styles/README.md +16 -11
- package/src/rules/no-dynamic-styles/index.tsx +1 -1
- package/src/rules/no-exported-styles/README.md +25 -30
- package/src/rules/no-global-styles/README.md +4 -3
- package/src/rules/no-important-styles/README.md +5 -3
- package/src/rules/no-imported-style-values/README.md +30 -27
- package/src/rules/no-imported-style-values/index.tsx +1 -1
- package/src/rules/no-nested-selectors/README.md +51 -18
- package/src/rules/no-styled/README.md +17 -14
- package/src/rules/no-unsafe-selectors/README.md +184 -58
- package/src/rules/no-unsafe-values/README.md +150 -48
- package/src/rules/no-unsafe-values/index.tsx +1 -1
- package/src/rules/use-compiled/README.md +8 -8
|
@@ -1,52 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Blocks nested selectors in style declarations.
|
|
2
|
+
|
|
3
|
+
Use styles which do not require context from other elements.
|
|
3
4
|
|
|
4
5
|
## Examples
|
|
5
6
|
|
|
6
7
|
### Incorrect
|
|
7
8
|
|
|
8
|
-
```
|
|
9
|
+
```tsx
|
|
9
10
|
import { css } from '@compiled/react';
|
|
11
|
+
import { token } from '@atlaskit/tokens';
|
|
12
|
+
|
|
10
13
|
const styles = css({
|
|
11
14
|
h2: {
|
|
12
|
-
|
|
15
|
+
font: token('font.heading.large'),
|
|
13
16
|
},
|
|
14
17
|
});
|
|
18
|
+
|
|
19
|
+
const Component = () => (
|
|
20
|
+
<div css={styles}>
|
|
21
|
+
<h2>Heading</h2>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
15
24
|
```
|
|
16
25
|
|
|
17
|
-
```
|
|
26
|
+
```tsx
|
|
18
27
|
import { styled } from '@compiled/react';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
import { token } from '@atlaskit/tokens';
|
|
29
|
+
|
|
30
|
+
const Table = styled.table({
|
|
31
|
+
border: `1px solid ${token('color.border')}`,
|
|
32
|
+
td: {
|
|
33
|
+
padding: token('space.100'),
|
|
22
34
|
},
|
|
23
35
|
});
|
|
24
36
|
```
|
|
25
37
|
|
|
26
|
-
```
|
|
38
|
+
```tsx
|
|
27
39
|
import { styled } from '@compiled/react';
|
|
40
|
+
import { token } from '@atlaskit/tokens';
|
|
41
|
+
|
|
28
42
|
const Component = styled.div({
|
|
29
43
|
'.myclass': {
|
|
30
|
-
padding:
|
|
44
|
+
padding: token('space.100'),
|
|
31
45
|
},
|
|
32
46
|
});
|
|
33
47
|
```
|
|
34
48
|
|
|
35
49
|
### Correct
|
|
36
50
|
|
|
37
|
-
```
|
|
51
|
+
```tsx
|
|
38
52
|
import { css } from '@compiled/react';
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
53
|
+
import { token } from '@atlaskit/tokens';
|
|
54
|
+
|
|
55
|
+
const headingStyles = css({
|
|
56
|
+
font: token('font.heading.large'),
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const Component = () => (
|
|
60
|
+
<div>
|
|
61
|
+
<h2 css={headingStyles}>Heading</h2>
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
import { css } from '@compiled/react';
|
|
68
|
+
import { token } from '@atlaskit/tokens';
|
|
69
|
+
|
|
70
|
+
const tableStyles = css({
|
|
71
|
+
border: `1px solid ${token('color.border')}`,
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const tdStyles = css({
|
|
75
|
+
padding: token('space.100'),
|
|
42
76
|
});
|
|
43
77
|
```
|
|
44
78
|
|
|
45
79
|
## Options
|
|
46
80
|
|
|
47
|
-
### importSources
|
|
81
|
+
### `importSources: string[]`
|
|
48
82
|
|
|
49
|
-
By default, this rule will check
|
|
83
|
+
By default, this rule will check styles using:
|
|
50
84
|
|
|
51
85
|
- `@atlaskit/css`
|
|
52
86
|
- `@atlaskit/primitives`
|
|
@@ -56,5 +90,4 @@ By default, this rule will check `css` usages from:
|
|
|
56
90
|
- `@emotion/styled`
|
|
57
91
|
- `styled-components`
|
|
58
92
|
|
|
59
|
-
|
|
60
|
-
array of package names (strings).
|
|
93
|
+
Override this list with the `importSources` option, which accepts an array of package names.
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
Blocks the `styled` API, which creates unnecessary indirection.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This indirection:
|
|
4
|
+
|
|
5
|
+
- obfuscates which tag is being rendered
|
|
6
|
+
- adds linting complexity
|
|
7
|
+
- promotes exported styles
|
|
8
|
+
- can complicate refactoring
|
|
9
|
+
|
|
10
|
+
Use the `css` API instead. It has better performance and clarity.
|
|
4
11
|
|
|
5
12
|
## Examples
|
|
6
13
|
|
|
@@ -49,8 +56,9 @@ export default styled.div.attrs((props) => ({ 'data-testid': props.testId }))`
|
|
|
49
56
|
|
|
50
57
|
```tsx
|
|
51
58
|
import { css, jsx } from '@emotion/react';
|
|
59
|
+
import { token } from '@atlaskit/tokens';
|
|
52
60
|
|
|
53
|
-
const styles = css({ color: '
|
|
61
|
+
const styles = css({ color: token('color.text.subtlest') });
|
|
54
62
|
|
|
55
63
|
const Component = ({ children }) => {
|
|
56
64
|
return <div css={styles}>{children}</div>;
|
|
@@ -58,7 +66,6 @@ const Component = ({ children }) => {
|
|
|
58
66
|
```
|
|
59
67
|
|
|
60
68
|
```tsx
|
|
61
|
-
// Using Primitives
|
|
62
69
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
63
70
|
|
|
64
71
|
const styles = xcss({
|
|
@@ -72,16 +79,12 @@ const Component = ({ children }) => {
|
|
|
72
79
|
|
|
73
80
|
## FAQ
|
|
74
81
|
|
|
75
|
-
###
|
|
82
|
+
### How will I extend like `styled(Button)`?
|
|
76
83
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
`<div css={…}>` syntax is more performant and clear.
|
|
84
|
+
Don't modify the styles of components you don't own, unless they provide an explicit bounded
|
|
85
|
+
interface for doing so — such as the `xcss` prop.
|
|
80
86
|
|
|
81
|
-
|
|
87
|
+
Use props (excluding `className` which is prohibited) to modify component styles instead.
|
|
82
88
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
removed `styled(Button)` interactivity in our latest variants because they are unsafe for us to
|
|
86
|
-
evolve the system with. Instead, make use of reusable component patterns to pass props around which
|
|
87
|
-
impact the styles of that component.
|
|
89
|
+
The Atlassian Design System, for example, no longer supports `styled(Button)` because it is unsafe
|
|
90
|
+
for us to evolve the system with.
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
Blocks unsafe CSS selectors.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
APIs.
|
|
5
|
-
|
|
6
|
-
Use this rule alongside
|
|
3
|
+
Use alongside
|
|
7
4
|
[no-nested-selectors](https://atlassian.design/components/eslint-plugin-ui-styling-standard/no-nested-selectors/usage)
|
|
8
|
-
|
|
5
|
+
which blocks nested CSS selectors.
|
|
6
|
+
|
|
7
|
+
Blocking unsafe selectors enables static analysis and also prevents regressions and incidents when
|
|
8
|
+
migrating styles at scale.
|
|
9
9
|
|
|
10
10
|
## Examples
|
|
11
11
|
|
|
12
|
-
###
|
|
12
|
+
### Keyframes
|
|
13
|
+
|
|
14
|
+
#### Incorrect
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
Don't use `@keyframes` at-rules in styles.
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
```tsx
|
|
19
|
+
import { css } from '@compiled/react';
|
|
17
20
|
|
|
18
|
-
```ts
|
|
19
21
|
css({
|
|
20
22
|
'@keyframes fadeIn': {
|
|
21
23
|
from: {
|
|
@@ -25,41 +27,102 @@ css({
|
|
|
25
27
|
opacity: 1,
|
|
26
28
|
},
|
|
27
29
|
},
|
|
30
|
+
animation: '1s ease-in fadeIn',
|
|
28
31
|
});
|
|
29
32
|
```
|
|
30
33
|
|
|
31
|
-
|
|
34
|
+
#### Correct
|
|
35
|
+
|
|
36
|
+
Use the `keyframes` API.
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import { css, keyframes } from '@compiled/react';
|
|
40
|
+
|
|
41
|
+
const fadeIn = keyframes({
|
|
42
|
+
from: {
|
|
43
|
+
opacity: 0,
|
|
44
|
+
},
|
|
45
|
+
to: {
|
|
46
|
+
opacity: 1,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
css({
|
|
51
|
+
animation: `1s ease-in ${fadeIn}`,
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Legacy pseudo-element syntax
|
|
56
|
+
|
|
57
|
+
#### Incorrect
|
|
58
|
+
|
|
59
|
+
Don't use the legacy single colon syntax for pseudo-elements.
|
|
32
60
|
|
|
33
|
-
|
|
61
|
+
This issue is autofixable.
|
|
34
62
|
|
|
35
|
-
|
|
63
|
+
```tsx
|
|
64
|
+
import { css } from '@compiled/react';
|
|
36
65
|
|
|
37
|
-
```ts
|
|
38
66
|
css({
|
|
39
|
-
'
|
|
67
|
+
'&:after': {
|
|
40
68
|
content: '""',
|
|
41
|
-
width: 100,
|
|
42
|
-
height: 100,
|
|
43
|
-
backgroundColor: 'red',
|
|
44
69
|
},
|
|
45
70
|
});
|
|
46
71
|
```
|
|
47
72
|
|
|
48
|
-
|
|
73
|
+
#### Correct
|
|
49
74
|
|
|
50
|
-
Use
|
|
75
|
+
Use the double colon syntax for pseudo-elements.
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
import { css } from '@compiled/react';
|
|
79
|
+
|
|
80
|
+
css({
|
|
81
|
+
'&::after': {
|
|
82
|
+
content: '""',
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Increased specificity selectors
|
|
88
|
+
|
|
89
|
+
#### Incorrect
|
|
90
|
+
|
|
91
|
+
Don't use the nesting selector to increase specificity of styles.
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
import { css } from '@compiled/react';
|
|
95
|
+
import { token } from '@atlaskit/tokens';
|
|
51
96
|
|
|
52
|
-
```ts
|
|
53
97
|
css({
|
|
54
98
|
'&&': {
|
|
55
|
-
color: '
|
|
99
|
+
color: token('color.text'),
|
|
56
100
|
},
|
|
57
101
|
});
|
|
58
102
|
```
|
|
59
103
|
|
|
60
|
-
|
|
104
|
+
#### Correct
|
|
105
|
+
|
|
106
|
+
Use styles that do not require increased specificity.
|
|
107
|
+
|
|
108
|
+
```tsx
|
|
109
|
+
import { css } from '@compiled/react';
|
|
110
|
+
import { token } from '@atlaskit/tokens';
|
|
111
|
+
|
|
112
|
+
css({
|
|
113
|
+
color: token('color.text'),
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### At-rules
|
|
118
|
+
|
|
119
|
+
#### Incorrect
|
|
120
|
+
|
|
121
|
+
Don't use at-rules in styles (see **Correct** below for exceptions).
|
|
122
|
+
|
|
123
|
+
```tsx
|
|
124
|
+
import { css } from '@compiled/react';
|
|
61
125
|
|
|
62
|
-
```ts
|
|
63
126
|
css({
|
|
64
127
|
'@scope (.article-body) to (figure)': {
|
|
65
128
|
img: {
|
|
@@ -69,34 +132,89 @@ css({
|
|
|
69
132
|
});
|
|
70
133
|
```
|
|
71
134
|
|
|
72
|
-
|
|
135
|
+
#### Correct
|
|
136
|
+
|
|
137
|
+
Use only allowed at-rules:
|
|
138
|
+
|
|
139
|
+
- `@media` (through our
|
|
140
|
+
[breakpoints](https://atlassian.design/components/primitives/responsive/breakpoints/examples))
|
|
141
|
+
- `@property`
|
|
142
|
+
- `@supports`
|
|
143
|
+
|
|
144
|
+
```tsx
|
|
145
|
+
import { css } from '@compiled/react';
|
|
146
|
+
import { media } from '@atlaskit/primitives/responsive';
|
|
147
|
+
|
|
148
|
+
css({
|
|
149
|
+
[media.above.sm]: {
|
|
150
|
+
display: 'block',
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Restricted pseudo-selectors
|
|
156
|
+
|
|
157
|
+
#### Incorrect
|
|
158
|
+
|
|
159
|
+
Don't use pseudo-classes which take arguments or implicitly rely on external context.
|
|
160
|
+
|
|
161
|
+
```tsx
|
|
162
|
+
import { css } from '@compiled/react';
|
|
163
|
+
import { token } from '@atlaskit/tokens';
|
|
73
164
|
|
|
74
|
-
```ts
|
|
75
165
|
css({
|
|
166
|
+
'&:hover': {
|
|
167
|
+
backgroundColor: token('color.background.neutral.hovered'),
|
|
168
|
+
},
|
|
169
|
+
'&:not(:hover)': {
|
|
170
|
+
backgroundColor: token('color.background.neutral'),
|
|
171
|
+
}
|
|
76
172
|
'&:first-child': {
|
|
77
|
-
|
|
173
|
+
fontWeight: token('font.weight.bold'),
|
|
78
174
|
},
|
|
79
175
|
});
|
|
80
176
|
```
|
|
81
177
|
|
|
82
|
-
|
|
178
|
+
#### Correct
|
|
83
179
|
|
|
84
|
-
|
|
85
|
-
|
|
180
|
+
```tsx
|
|
181
|
+
import { css } from '@compiled/react';
|
|
182
|
+
import { token } from '@atlaskit/tokens';
|
|
86
183
|
|
|
87
|
-
|
|
88
|
-
pseudo-selectors. This is often the desired behavior.
|
|
184
|
+
type Props = { isFirstChild: boolean };
|
|
89
185
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
186
|
+
const baseStyles = css({
|
|
187
|
+
backgroundColor: token('color.background.neutral'),
|
|
188
|
+
'&:hover': {
|
|
189
|
+
backgroundColor: token('color.background.neutral.hovered'),
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
const firstChildStyles = css({
|
|
194
|
+
fontWeight: token('font.weight.bold'),
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
const Component = ({ isFirstChild }: Props) => (
|
|
198
|
+
<div css={[baseStyles, isFirstChild && firstChildStyles]} />
|
|
199
|
+
);
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Ambiguous pseudo-selectors
|
|
203
|
+
|
|
204
|
+
#### Incorrect
|
|
205
|
+
|
|
206
|
+
Don't use pseudo-selectors without a leading selector, as they are ambiguous and interpreted
|
|
207
|
+
differently between contexts.
|
|
208
|
+
|
|
209
|
+
For example some contexts will treat `:hover` as `&:hover` while others will treat it as `& :hover`
|
|
210
|
+
(which targets descendants).
|
|
93
211
|
|
|
94
|
-
|
|
212
|
+
This issue is autofixable. By default a nesting selector `&` is added unless the
|
|
213
|
+
`shouldAlwaysInsertNestingSelectorForAmbiguousPseudos` option is disabled.
|
|
95
214
|
|
|
96
|
-
|
|
97
|
-
|
|
215
|
+
```tsx
|
|
216
|
+
import { css } from '@compiled/react';
|
|
98
217
|
|
|
99
|
-
```ts
|
|
100
218
|
css({
|
|
101
219
|
/**
|
|
102
220
|
* This pseudo-class has no leading selector and is ambiguous.
|
|
@@ -119,13 +237,24 @@ css({
|
|
|
119
237
|
});
|
|
120
238
|
```
|
|
121
239
|
|
|
122
|
-
|
|
240
|
+
#### Correct
|
|
123
241
|
|
|
124
|
-
Do not
|
|
242
|
+
Use explicit selectors. Do not rely on implicit or undefined behavior for pseudo-selectors.
|
|
125
243
|
|
|
126
|
-
|
|
244
|
+
```tsx
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Grouped at-rules
|
|
249
|
+
|
|
250
|
+
#### Incorrect
|
|
127
251
|
|
|
128
|
-
|
|
252
|
+
Don't group at-rules with the `cssMap` API.
|
|
253
|
+
|
|
254
|
+
````tsx
|
|
255
|
+
import { cssMap } from '@compiled/react';
|
|
256
|
+
|
|
257
|
+
```tsx
|
|
129
258
|
cssMap({
|
|
130
259
|
success: {
|
|
131
260
|
'@media': {
|
|
@@ -134,15 +263,13 @@ cssMap({
|
|
|
134
263
|
},
|
|
135
264
|
},
|
|
136
265
|
});
|
|
137
|
-
|
|
266
|
+
````
|
|
138
267
|
|
|
139
|
-
|
|
268
|
+
#### Correct
|
|
140
269
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
Refactor your styles so it is not required.
|
|
270
|
+
Write flattened at-rules instead.
|
|
144
271
|
|
|
145
|
-
```
|
|
272
|
+
```tsx
|
|
146
273
|
cssMap({
|
|
147
274
|
success: {
|
|
148
275
|
selectors: {
|
|
@@ -156,7 +283,7 @@ cssMap({
|
|
|
156
283
|
|
|
157
284
|
### Correct
|
|
158
285
|
|
|
159
|
-
```
|
|
286
|
+
```tsx
|
|
160
287
|
const fadeIn = keyframes({
|
|
161
288
|
from: {
|
|
162
289
|
opacity: 0,
|
|
@@ -171,7 +298,7 @@ css({
|
|
|
171
298
|
});
|
|
172
299
|
```
|
|
173
300
|
|
|
174
|
-
```
|
|
301
|
+
```tsx
|
|
175
302
|
css({
|
|
176
303
|
'::after': {
|
|
177
304
|
content: '""',
|
|
@@ -182,7 +309,7 @@ css({
|
|
|
182
309
|
});
|
|
183
310
|
```
|
|
184
311
|
|
|
185
|
-
```
|
|
312
|
+
```tsx
|
|
186
313
|
css({
|
|
187
314
|
'&:first-of-type': {
|
|
188
315
|
width: 100,
|
|
@@ -190,13 +317,13 @@ css({
|
|
|
190
317
|
});
|
|
191
318
|
```
|
|
192
319
|
|
|
193
|
-
```
|
|
320
|
+
```tsx
|
|
194
321
|
css({
|
|
195
322
|
'&:hover': {},
|
|
196
323
|
});
|
|
197
324
|
```
|
|
198
325
|
|
|
199
|
-
```
|
|
326
|
+
```tsx
|
|
200
327
|
cssMap({
|
|
201
328
|
success: {
|
|
202
329
|
'@media (min-width: 900px)': {},
|
|
@@ -205,7 +332,7 @@ cssMap({
|
|
|
205
332
|
});
|
|
206
333
|
```
|
|
207
334
|
|
|
208
|
-
```
|
|
335
|
+
```tsx
|
|
209
336
|
cssMap({
|
|
210
337
|
success: {
|
|
211
338
|
backgroundColor: 'white',
|
|
@@ -220,7 +347,7 @@ cssMap({
|
|
|
220
347
|
|
|
221
348
|
### `importSources: string[]`
|
|
222
349
|
|
|
223
|
-
By default, this rule will check
|
|
350
|
+
By default, this rule will check styles using:
|
|
224
351
|
|
|
225
352
|
- `@atlaskit/css`
|
|
226
353
|
- `@atlaskit/primitives`
|
|
@@ -230,8 +357,7 @@ By default, this rule will check `css` usages from:
|
|
|
230
357
|
- `@emotion/styled`
|
|
231
358
|
- `styled-components`
|
|
232
359
|
|
|
233
|
-
|
|
234
|
-
array of package names (strings). This will override the built-in allow-list.
|
|
360
|
+
Override this list with the `importSources` option, which accepts an array of package names.
|
|
235
361
|
|
|
236
362
|
### `shouldAlwaysInsertNestingSelectorForAmbiguousPseudos: boolean`
|
|
237
363
|
|