@atlaskit/eslint-plugin-ui-styling-standard 0.16.3 → 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 +8 -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/package.json +1 -1
- 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-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-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-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/use-compiled/README.md +8 -8
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
Blocks CSS-in-JS libraries other than `@compiled/react`, including Emotion and styled-components.
|
|
2
2
|
|
|
3
3
|
**WARNING** It may be unsafe to mix usages of `@compiled/react` with other CSS-in-JS libraries on
|
|
4
4
|
the same component. When converting to `@compiled/react` verify ALL changes. For this reason, the
|
|
5
|
-
|
|
5
|
+
autofixer has been disabled by default, but it may be useful to enable to empower a migration.
|
|
6
6
|
|
|
7
7
|
## Examples
|
|
8
8
|
|
|
9
9
|
### Incorrect
|
|
10
10
|
|
|
11
|
-
```
|
|
11
|
+
```tsx
|
|
12
12
|
/** @jsx jsx */
|
|
13
13
|
import { css } from '@emotion/core';
|
|
14
14
|
import { jsx } from '@emotion/react';
|
|
15
15
|
import styled from '@emotion/styled';
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
```
|
|
18
|
+
```tsx
|
|
19
19
|
import styled, { css } from 'styled-components';
|
|
20
20
|
```
|
|
21
21
|
|
|
@@ -24,7 +24,7 @@ import styled, { css } from 'styled-components';
|
|
|
24
24
|
We expect usage of `xcss` with `@atlaskit/primitives` when working with Primitives, and `css` with
|
|
25
25
|
`@compiled/react` when working with custom or native code.
|
|
26
26
|
|
|
27
|
-
```
|
|
27
|
+
```tsx
|
|
28
28
|
/** @jsx jsx */
|
|
29
29
|
import { jsx, css, styled } from '@compiled/react';
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ const styles = css({ color: 'var(--ds-color-text)' });
|
|
|
32
32
|
export default () => <div css={styles}>…</div>;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
```
|
|
35
|
+
```tsx
|
|
36
36
|
import { xcss, Box } from '@atlaskit/primitives';
|
|
37
37
|
|
|
38
38
|
const styles = xcss({ color: 'color.text' });
|
|
@@ -43,10 +43,10 @@ export default () => <Box xcss={styles}>…</Box>;
|
|
|
43
43
|
|
|
44
44
|
### `canAutoFix: boolean`
|
|
45
45
|
|
|
46
|
-
Determines whether or not the
|
|
46
|
+
Determines whether or not the autofixer is enabled.
|
|
47
47
|
|
|
48
48
|
Defaults to `false` due to safety concerns when mixing Compiled and other CSS-in-JS libraries on the
|
|
49
49
|
same component.
|
|
50
50
|
|
|
51
|
-
Even when enabled, the
|
|
51
|
+
Even when enabled, the autofixer will only convert usages that are deemed safe. Currently this is
|
|
52
52
|
limited to purely static styles where all keys and values are simple literals.
|