@atlaskit/eslint-plugin-ui-styling-standard 0.16.3 → 0.16.5

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 (41) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/constellation/atlaskit-theme/usage.mdx +74 -55
  3. package/constellation/convert-props-syntax/usage.mdx +29 -24
  4. package/constellation/enforce-style-prop/usage.mdx +32 -26
  5. package/constellation/local-cx-xcss/usage.mdx +27 -15
  6. package/constellation/no-array-arguments/usage.mdx +12 -9
  7. package/constellation/no-classname-prop/usage.mdx +13 -5
  8. package/constellation/no-container-queries/usage.mdx +65 -16
  9. package/constellation/no-dynamic-styles/usage.mdx +16 -11
  10. package/constellation/no-exported-styles/usage.mdx +25 -30
  11. package/constellation/no-global-styles/usage.mdx +4 -3
  12. package/constellation/no-important-styles/usage.mdx +5 -3
  13. package/constellation/no-imported-style-values/usage.mdx +30 -27
  14. package/constellation/no-nested-selectors/usage.mdx +51 -18
  15. package/constellation/no-styled/usage.mdx +17 -14
  16. package/constellation/no-unsafe-selectors/usage.mdx +184 -58
  17. package/constellation/no-unsafe-values/usage.mdx +150 -48
  18. package/constellation/use-compiled/usage.mdx +8 -8
  19. package/dist/cjs/rules/no-imported-style-values/index.js +50 -2
  20. package/dist/es2019/rules/no-imported-style-values/index.js +49 -2
  21. package/dist/esm/rules/no-imported-style-values/index.js +50 -2
  22. package/package.json +1 -1
  23. package/src/rules/atlaskit-theme/README.md +74 -55
  24. package/src/rules/convert-props-syntax/README.md +29 -24
  25. package/src/rules/enforce-style-prop/README.md +32 -26
  26. package/src/rules/local-cx-xcss/README.md +27 -15
  27. package/src/rules/no-array-arguments/README.md +12 -9
  28. package/src/rules/no-classname-prop/README.md +13 -5
  29. package/src/rules/no-container-queries/README.md +65 -16
  30. package/src/rules/no-dynamic-styles/README.md +16 -11
  31. package/src/rules/no-exported-styles/README.md +25 -30
  32. package/src/rules/no-global-styles/README.md +4 -3
  33. package/src/rules/no-important-styles/README.md +5 -3
  34. package/src/rules/no-imported-style-values/README.md +30 -27
  35. package/src/rules/no-imported-style-values/__tests__/rule.test.tsx +208 -0
  36. package/src/rules/no-imported-style-values/index.tsx +51 -4
  37. package/src/rules/no-nested-selectors/README.md +51 -18
  38. package/src/rules/no-styled/README.md +17 -14
  39. package/src/rules/no-unsafe-selectors/README.md +184 -58
  40. package/src/rules/no-unsafe-values/README.md +150 -48
  41. package/src/rules/use-compiled/README.md +8 -8
@@ -1,21 +1,21 @@
1
- Ensures usage of `@compiled/react` over other CSS-in-JS libraries like Emotion or styled-components.
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
- auto-fixer has been disabled by default, but it may be useful to enable to empower a migration.
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
- ```js
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
- ```js
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
- ```js
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
- ```js
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 auto-fixer is enabled.
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 auto-fixer will only convert usages that are deemed safe. Currently this is
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.