@atlaskit/eslint-plugin-ui-styling-standard 0.15.0 → 0.15.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 (56) hide show
  1. package/CHANGELOG.md +189 -172
  2. package/constellation/atlaskit-theme/usage.mdx +17 -17
  3. package/constellation/convert-props-syntax/usage.mdx +14 -14
  4. package/constellation/enforce-style-prop/usage.mdx +17 -17
  5. package/constellation/index/overview.mdx +70 -70
  6. package/constellation/local-cx-xcss/usage.mdx +4 -4
  7. package/constellation/no-array-arguments/usage.mdx +7 -7
  8. package/constellation/no-container-queries/usage.mdx +14 -14
  9. package/constellation/no-dynamic-styles/usage.mdx +19 -19
  10. package/constellation/no-exported-styles/usage.mdx +15 -15
  11. package/constellation/no-global-styles/usage.mdx +13 -13
  12. package/constellation/no-important-styles/usage.mdx +2 -2
  13. package/constellation/no-imported-style-values/usage.mdx +16 -16
  14. package/constellation/no-nested-selectors/usage.mdx +18 -18
  15. package/constellation/no-styled/usage.mdx +6 -6
  16. package/constellation/no-unsafe-selectors/usage.mdx +90 -90
  17. package/constellation/no-unsafe-values/usage.mdx +33 -33
  18. package/dist/cjs/index.codegen.js +1 -1
  19. package/dist/cjs/presets/all.codegen.js +1 -1
  20. package/dist/cjs/presets/recommended.codegen.js +1 -1
  21. package/dist/cjs/rules/index.codegen.js +1 -1
  22. package/dist/cjs/rules/no-nested-selectors/index.js +68 -49
  23. package/dist/cjs/rules/no-unsafe-selectors/index.js +4 -1
  24. package/dist/cjs/rules/no-unsafe-selectors/lint-selector.js +10 -1
  25. package/dist/es2019/index.codegen.js +1 -1
  26. package/dist/es2019/presets/all.codegen.js +1 -1
  27. package/dist/es2019/presets/recommended.codegen.js +1 -1
  28. package/dist/es2019/rules/index.codegen.js +1 -1
  29. package/dist/es2019/rules/no-nested-selectors/index.js +63 -45
  30. package/dist/es2019/rules/no-unsafe-selectors/index.js +4 -1
  31. package/dist/es2019/rules/no-unsafe-selectors/lint-selector.js +10 -1
  32. package/dist/esm/index.codegen.js +1 -1
  33. package/dist/esm/presets/all.codegen.js +1 -1
  34. package/dist/esm/presets/recommended.codegen.js +1 -1
  35. package/dist/esm/rules/index.codegen.js +1 -1
  36. package/dist/esm/rules/no-nested-selectors/index.js +64 -49
  37. package/dist/esm/rules/no-unsafe-selectors/index.js +4 -1
  38. package/dist/esm/rules/no-unsafe-selectors/lint-selector.js +10 -1
  39. package/dist/types/presets/all.codegen.d.ts +1 -1
  40. package/dist/types/presets/recommended.codegen.d.ts +1 -1
  41. package/dist/types/rules/no-unsafe-selectors/lint-selector.d.ts +1 -0
  42. package/dist/types-ts4.5/presets/all.codegen.d.ts +1 -1
  43. package/dist/types-ts4.5/presets/recommended.codegen.d.ts +1 -1
  44. package/dist/types-ts4.5/rules/no-unsafe-selectors/lint-selector.d.ts +1 -0
  45. package/package.json +2 -4
  46. package/src/index.codegen.tsx +3 -3
  47. package/src/presets/all.codegen.tsx +70 -73
  48. package/src/presets/recommended.codegen.tsx +70 -73
  49. package/src/rules/index.codegen.tsx +18 -18
  50. package/src/rules/no-nested-selectors/__tests__/rule.test.tsx +93 -56
  51. package/src/rules/no-nested-selectors/index.tsx +92 -105
  52. package/src/rules/no-unsafe-selectors/__tests__/no-ambiguous-pseudos.test.tsx +211 -201
  53. package/src/rules/no-unsafe-selectors/index.tsx +174 -177
  54. package/src/rules/no-unsafe-selectors/lint-selector.tsx +128 -141
  55. package/tsconfig.app.json +45 -45
  56. package/tsconfig.dev.json +43 -43
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::a4ab25dd4ce24b183125bfbc709e3943>>
3
+ * @codegen <<SignedSource::f240d1cd5b93827327b66c28ad47e698>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::a4ab25dd4ce24b183125bfbc709e3943>>
3
+ * @codegen <<SignedSource::f240d1cd5b93827327b66c28ad47e698>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -8,6 +8,7 @@ type CheckArgs = {
8
8
  config: {
9
9
  shouldAlwaysInsertNestingSelectorForAmbiguousPseudos: boolean;
10
10
  };
11
+ isXcssCall: boolean;
11
12
  };
12
13
  export declare function lintSelector(args: CheckArgs): void;
13
14
  export {};
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::a4ab25dd4ce24b183125bfbc709e3943>>
3
+ * @codegen <<SignedSource::f240d1cd5b93827327b66c28ad47e698>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::a4ab25dd4ce24b183125bfbc709e3943>>
3
+ * @codegen <<SignedSource::f240d1cd5b93827327b66c28ad47e698>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -8,6 +8,7 @@ type CheckArgs = {
8
8
  config: {
9
9
  shouldAlwaysInsertNestingSelectorForAmbiguousPseudos: boolean;
10
10
  };
11
+ isXcssCall: boolean;
11
12
  };
12
13
  export declare function lintSelector(args: CheckArgs): void;
13
14
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-ui-styling-standard",
3
- "version": "0.15.0",
3
+ "version": "0.15.2",
4
4
  "author": "Atlassian Pty Ltd",
5
5
  "description": "The eslint plugin to enforce and educate on Atlassian's UI Styling Standard",
6
6
  "license": "Apache-2.0",
@@ -55,7 +55,6 @@
55
55
  "@af/formatting": "*",
56
56
  "@atlaskit/ds-lib": "^2.3.0",
57
57
  "@atlaskit/eslint-plugin-design-system": "^10.4.0",
58
- "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
59
58
  "@atlassian/codegen": "*",
60
59
  "@compiled/eslint-plugin": "^0.13.6",
61
60
  "@types/eslint": "^8.56.6",
@@ -68,6 +67,5 @@
68
67
  },
69
68
  "scripts": {
70
69
  "codegen": "ts-node -r tsconfig-paths/register ./scripts/codegen.tsx"
71
- },
72
- "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
70
+ }
73
71
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::16a3441765e5a97f9f32de7fd0de17f0>>
3
+ * @codegen <<SignedSource::aff3fad2b8534fad07ba5f0f1b981a55>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  import all from './presets/all.codegen';
@@ -9,6 +9,6 @@ import recommended from './presets/recommended.codegen';
9
9
  export { default as rules } from './rules/index.codegen';
10
10
 
11
11
  export const configs = {
12
- all,
13
- recommended,
12
+ all,
13
+ recommended,
14
14
  };
@@ -1,79 +1,76 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::a4ab25dd4ce24b183125bfbc709e3943>>
3
+ * @codegen <<SignedSource::f240d1cd5b93827327b66c28ad47e698>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
7
- plugins: ['@atlaskit/ui-styling-standard', '@atlaskit/design-system', '@compiled'],
8
- rules: {
9
- '@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
10
- '@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
11
- '@atlaskit/ui-styling-standard/enforce-style-prop': 'warn',
12
- '@atlaskit/ui-styling-standard/local-cx-xcss': 'warn',
13
- '@atlaskit/ui-styling-standard/no-array-arguments': 'warn',
14
- '@atlaskit/ui-styling-standard/no-classname-prop': 'warn',
15
- '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
16
- '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
17
- '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
18
- '@atlaskit/ui-styling-standard/no-global-styles': 'warn',
19
- '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
20
- '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
21
- '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
22
- '@atlaskit/ui-styling-standard/no-styled': 'warn',
23
- '@atlaskit/ui-styling-standard/no-unsafe-selectors': 'warn',
24
- '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
25
- '@atlaskit/ui-styling-standard/use-compiled': 'warn',
26
- '@atlaskit/design-system/consistent-css-prop-usage': [
27
- 'warn',
28
- { excludeReactComponents: true },
29
- ],
30
- '@atlaskit/design-system/no-css-tagged-template-expression': 'warn',
31
- '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'warn',
32
- '@atlaskit/design-system/no-styled-tagged-template-expression': 'warn',
33
- '@compiled/no-suppress-xcss': 'warn',
34
- '@compiled/no-js-xcss': 'warn',
35
- '@atlaskit/design-system/no-empty-styled-expression': [
36
- 'warn',
37
- {
38
- importSources: [
39
- '@compiled/react',
40
- '@atlaskit/css',
41
- '@emotion/core',
42
- '@emotion/react',
43
- '@emotion/styled',
44
- 'styled-components',
45
- ],
46
- },
47
- ],
48
- '@atlaskit/design-system/no-exported-css': [
49
- 'warn',
50
- {
51
- importSources: [
52
- '@compiled/react',
53
- '@atlaskit/css',
54
- '@emotion/core',
55
- '@emotion/react',
56
- '@emotion/styled',
57
- 'styled-components',
58
- ],
59
- },
60
- ],
61
- '@atlaskit/design-system/no-exported-keyframes': [
62
- 'warn',
63
- {
64
- importSources: [
65
- '@compiled/react',
66
- '@atlaskit/css',
67
- '@emotion/core',
68
- '@emotion/react',
69
- '@emotion/styled',
70
- 'styled-components',
71
- ],
72
- },
73
- ],
74
- '@atlaskit/design-system/no-invalid-css-map': [
75
- 'warn',
76
- { allowedFunctionCalls: [['@atlaskit/tokens', 'token']] },
77
- ],
78
- },
7
+ plugins: ['@atlaskit/ui-styling-standard', '@atlaskit/design-system', '@compiled'],
8
+ rules: {
9
+ '@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
10
+ '@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
11
+ '@atlaskit/ui-styling-standard/enforce-style-prop': 'warn',
12
+ '@atlaskit/ui-styling-standard/local-cx-xcss': 'warn',
13
+ '@atlaskit/ui-styling-standard/no-array-arguments': 'warn',
14
+ '@atlaskit/ui-styling-standard/no-classname-prop': 'warn',
15
+ '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
16
+ '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
17
+ '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
18
+ '@atlaskit/ui-styling-standard/no-global-styles': 'warn',
19
+ '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
20
+ '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
21
+ '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
22
+ '@atlaskit/ui-styling-standard/no-styled': 'warn',
23
+ '@atlaskit/ui-styling-standard/no-unsafe-selectors': 'warn',
24
+ '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
25
+ '@atlaskit/ui-styling-standard/use-compiled': 'warn',
26
+ '@atlaskit/design-system/consistent-css-prop-usage': ['warn', { excludeReactComponents: true }],
27
+ '@atlaskit/design-system/no-css-tagged-template-expression': 'warn',
28
+ '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'warn',
29
+ '@atlaskit/design-system/no-styled-tagged-template-expression': 'warn',
30
+ '@compiled/no-suppress-xcss': 'warn',
31
+ '@compiled/no-js-xcss': 'warn',
32
+ '@atlaskit/design-system/no-empty-styled-expression': [
33
+ 'warn',
34
+ {
35
+ importSources: [
36
+ '@compiled/react',
37
+ '@atlaskit/css',
38
+ '@emotion/core',
39
+ '@emotion/react',
40
+ '@emotion/styled',
41
+ 'styled-components',
42
+ ],
43
+ },
44
+ ],
45
+ '@atlaskit/design-system/no-exported-css': [
46
+ 'warn',
47
+ {
48
+ importSources: [
49
+ '@compiled/react',
50
+ '@atlaskit/css',
51
+ '@emotion/core',
52
+ '@emotion/react',
53
+ '@emotion/styled',
54
+ 'styled-components',
55
+ ],
56
+ },
57
+ ],
58
+ '@atlaskit/design-system/no-exported-keyframes': [
59
+ 'warn',
60
+ {
61
+ importSources: [
62
+ '@compiled/react',
63
+ '@atlaskit/css',
64
+ '@emotion/core',
65
+ '@emotion/react',
66
+ '@emotion/styled',
67
+ 'styled-components',
68
+ ],
69
+ },
70
+ ],
71
+ '@atlaskit/design-system/no-invalid-css-map': [
72
+ 'warn',
73
+ { allowedFunctionCalls: [['@atlaskit/tokens', 'token']] },
74
+ ],
75
+ },
79
76
  };
@@ -1,79 +1,76 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::a4ab25dd4ce24b183125bfbc709e3943>>
3
+ * @codegen <<SignedSource::f240d1cd5b93827327b66c28ad47e698>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
7
- plugins: ['@atlaskit/ui-styling-standard', '@atlaskit/design-system', '@compiled'],
8
- rules: {
9
- '@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
10
- '@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
11
- '@atlaskit/ui-styling-standard/enforce-style-prop': 'warn',
12
- '@atlaskit/ui-styling-standard/local-cx-xcss': 'warn',
13
- '@atlaskit/ui-styling-standard/no-array-arguments': 'warn',
14
- '@atlaskit/ui-styling-standard/no-classname-prop': 'warn',
15
- '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
16
- '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
17
- '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
18
- '@atlaskit/ui-styling-standard/no-global-styles': 'warn',
19
- '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
20
- '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
21
- '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
22
- '@atlaskit/ui-styling-standard/no-styled': 'warn',
23
- '@atlaskit/ui-styling-standard/no-unsafe-selectors': 'warn',
24
- '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
25
- '@atlaskit/ui-styling-standard/use-compiled': 'warn',
26
- '@atlaskit/design-system/consistent-css-prop-usage': [
27
- 'warn',
28
- { excludeReactComponents: true },
29
- ],
30
- '@atlaskit/design-system/no-css-tagged-template-expression': 'warn',
31
- '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'warn',
32
- '@atlaskit/design-system/no-styled-tagged-template-expression': 'warn',
33
- '@compiled/no-suppress-xcss': 'warn',
34
- '@compiled/no-js-xcss': 'warn',
35
- '@atlaskit/design-system/no-empty-styled-expression': [
36
- 'warn',
37
- {
38
- importSources: [
39
- '@compiled/react',
40
- '@atlaskit/css',
41
- '@emotion/core',
42
- '@emotion/react',
43
- '@emotion/styled',
44
- 'styled-components',
45
- ],
46
- },
47
- ],
48
- '@atlaskit/design-system/no-exported-css': [
49
- 'warn',
50
- {
51
- importSources: [
52
- '@compiled/react',
53
- '@atlaskit/css',
54
- '@emotion/core',
55
- '@emotion/react',
56
- '@emotion/styled',
57
- 'styled-components',
58
- ],
59
- },
60
- ],
61
- '@atlaskit/design-system/no-exported-keyframes': [
62
- 'warn',
63
- {
64
- importSources: [
65
- '@compiled/react',
66
- '@atlaskit/css',
67
- '@emotion/core',
68
- '@emotion/react',
69
- '@emotion/styled',
70
- 'styled-components',
71
- ],
72
- },
73
- ],
74
- '@atlaskit/design-system/no-invalid-css-map': [
75
- 'warn',
76
- { allowedFunctionCalls: [['@atlaskit/tokens', 'token']] },
77
- ],
78
- },
7
+ plugins: ['@atlaskit/ui-styling-standard', '@atlaskit/design-system', '@compiled'],
8
+ rules: {
9
+ '@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
10
+ '@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
11
+ '@atlaskit/ui-styling-standard/enforce-style-prop': 'warn',
12
+ '@atlaskit/ui-styling-standard/local-cx-xcss': 'warn',
13
+ '@atlaskit/ui-styling-standard/no-array-arguments': 'warn',
14
+ '@atlaskit/ui-styling-standard/no-classname-prop': 'warn',
15
+ '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
16
+ '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
17
+ '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
18
+ '@atlaskit/ui-styling-standard/no-global-styles': 'warn',
19
+ '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
20
+ '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
21
+ '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
22
+ '@atlaskit/ui-styling-standard/no-styled': 'warn',
23
+ '@atlaskit/ui-styling-standard/no-unsafe-selectors': 'warn',
24
+ '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
25
+ '@atlaskit/ui-styling-standard/use-compiled': 'warn',
26
+ '@atlaskit/design-system/consistent-css-prop-usage': ['warn', { excludeReactComponents: true }],
27
+ '@atlaskit/design-system/no-css-tagged-template-expression': 'warn',
28
+ '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'warn',
29
+ '@atlaskit/design-system/no-styled-tagged-template-expression': 'warn',
30
+ '@compiled/no-suppress-xcss': 'warn',
31
+ '@compiled/no-js-xcss': 'warn',
32
+ '@atlaskit/design-system/no-empty-styled-expression': [
33
+ 'warn',
34
+ {
35
+ importSources: [
36
+ '@compiled/react',
37
+ '@atlaskit/css',
38
+ '@emotion/core',
39
+ '@emotion/react',
40
+ '@emotion/styled',
41
+ 'styled-components',
42
+ ],
43
+ },
44
+ ],
45
+ '@atlaskit/design-system/no-exported-css': [
46
+ 'warn',
47
+ {
48
+ importSources: [
49
+ '@compiled/react',
50
+ '@atlaskit/css',
51
+ '@emotion/core',
52
+ '@emotion/react',
53
+ '@emotion/styled',
54
+ 'styled-components',
55
+ ],
56
+ },
57
+ ],
58
+ '@atlaskit/design-system/no-exported-keyframes': [
59
+ 'warn',
60
+ {
61
+ importSources: [
62
+ '@compiled/react',
63
+ '@atlaskit/css',
64
+ '@emotion/core',
65
+ '@emotion/react',
66
+ '@emotion/styled',
67
+ 'styled-components',
68
+ ],
69
+ },
70
+ ],
71
+ '@atlaskit/design-system/no-invalid-css-map': [
72
+ 'warn',
73
+ { allowedFunctionCalls: [['@atlaskit/tokens', 'token']] },
74
+ ],
75
+ },
79
76
  };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::c907cf4b4e11348239dadaefebe80fca>>
3
+ * @codegen <<SignedSource::6ad0de2d4bdac726387f27681ad9fcf4>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  import atlaskitTheme from './atlaskit-theme';
@@ -22,21 +22,21 @@ import noUnsafeValues from './no-unsafe-values';
22
22
  import useCompiled from './use-compiled';
23
23
 
24
24
  export default {
25
- 'atlaskit-theme': atlaskitTheme,
26
- 'convert-props-syntax': convertPropsSyntax,
27
- 'enforce-style-prop': enforceStyleProp,
28
- 'local-cx-xcss': localCxXcss,
29
- 'no-array-arguments': noArrayArguments,
30
- 'no-classname-prop': noClassnameProp,
31
- 'no-container-queries': noContainerQueries,
32
- 'no-dynamic-styles': noDynamicStyles,
33
- 'no-exported-styles': noExportedStyles,
34
- 'no-global-styles': noGlobalStyles,
35
- 'no-important-styles': noImportantStyles,
36
- 'no-imported-style-values': noImportedStyleValues,
37
- 'no-nested-selectors': noNestedSelectors,
38
- 'no-styled': noStyled,
39
- 'no-unsafe-selectors': noUnsafeSelectors,
40
- 'no-unsafe-values': noUnsafeValues,
41
- 'use-compiled': useCompiled,
25
+ 'atlaskit-theme': atlaskitTheme,
26
+ 'convert-props-syntax': convertPropsSyntax,
27
+ 'enforce-style-prop': enforceStyleProp,
28
+ 'local-cx-xcss': localCxXcss,
29
+ 'no-array-arguments': noArrayArguments,
30
+ 'no-classname-prop': noClassnameProp,
31
+ 'no-container-queries': noContainerQueries,
32
+ 'no-dynamic-styles': noDynamicStyles,
33
+ 'no-exported-styles': noExportedStyles,
34
+ 'no-global-styles': noGlobalStyles,
35
+ 'no-important-styles': noImportantStyles,
36
+ 'no-imported-style-values': noImportedStyleValues,
37
+ 'no-nested-selectors': noNestedSelectors,
38
+ 'no-styled': noStyled,
39
+ 'no-unsafe-selectors': noUnsafeSelectors,
40
+ 'no-unsafe-values': noUnsafeValues,
41
+ 'use-compiled': useCompiled,
42
42
  };
@@ -72,28 +72,6 @@ typescriptEslintTester.run(
72
72
  });
73
73
  `,
74
74
  },
75
- {
76
- name: 'Next sibling selector on non-HTML element',
77
- code: `
78
- import { styled } from '@compiled/react';
79
- styled.div({
80
- '& + &': {
81
- color: 'orange'
82
- }
83
- });
84
- `,
85
- },
86
- {
87
- name: 'Subsequent sibling selector on non-HTML element',
88
- code: `
89
- import { styled } from '@compiled/react';
90
- styled.div({
91
- '& ~ &': {
92
- color: 'orange'
93
- }
94
- });
95
- `,
96
- },
97
75
  {
98
76
  name: 'Skips @ queries',
99
77
  code: `
@@ -109,40 +87,6 @@ typescriptEslintTester.run(
109
87
  });
110
88
  `,
111
89
  },
112
- {
113
- name: 'Skip cssMap call',
114
- code: `
115
- import { cssMap } from '@atlaskit/css';
116
-
117
- const styles = cssMap({
118
- success: {
119
- color: 'var(--ds-text-inverse)',
120
- backgroundColor: 'var(--ds-background-success-bold)',
121
- '&:hover': {
122
- backgroundColor: 'var(--ds-background-success-bold-hovered)',
123
- },
124
- '&:active': {
125
- backgroundColor: 'var(--ds-background-success-bold-pressed)',
126
- },
127
- },
128
- });
129
- `,
130
- },
131
- {
132
- name: 'Skip keyframes call',
133
- code: `
134
- import { keyframes } from '@emotion/react';
135
-
136
- const keyFrameStyles = keyframes({
137
- 'from, to': {
138
- opacity: 0,
139
- },
140
- '50%': {
141
- opacity: 1,
142
- },
143
- });
144
- `,
145
- },
146
90
  ],
147
91
  invalid: [
148
92
  {
@@ -256,6 +200,18 @@ typescriptEslintTester.run(
256
200
  `,
257
201
  errors: [{ messageId: 'no-nested-selectors' }],
258
202
  },
203
+ {
204
+ name: 'Child combinator without whitespace',
205
+ code: `
206
+ import { styled } from '@compiled/react';
207
+ styled.div({
208
+ '&>a': {
209
+ color: 'orange'
210
+ }
211
+ });
212
+ `,
213
+ errors: [{ messageId: 'no-nested-selectors' }],
214
+ },
259
215
  {
260
216
  name: 'Column combinator',
261
217
  code: `
@@ -280,6 +236,87 @@ typescriptEslintTester.run(
280
236
  `,
281
237
  errors: [{ messageId: 'no-nested-selectors' }],
282
238
  },
239
+ {
240
+ name: 'Descendant combinator',
241
+ code: `
242
+ import { styled } from '@compiled/react';
243
+ const Component = styled.div({
244
+ '& &:hover': {
245
+ padding: 0,
246
+ }
247
+ });
248
+ `,
249
+ errors: [{ messageId: 'no-nested-selectors' }],
250
+ },
251
+ {
252
+ name: 'cssMap API',
253
+ code: `
254
+ import { cssMap } from '@compiled/react';
255
+
256
+ const styles = cssMap({
257
+ success: {
258
+ '[data-component-selector="my.button"]': {
259
+ color: 'var(--ds-text-inverse)',
260
+ }
261
+ },
262
+ });
263
+ `,
264
+ errors: [{ messageId: 'no-nested-selectors' }],
265
+ },
266
+ {
267
+ name: 'keyframes API',
268
+ code: `
269
+ import { keyframes } from '@emotion/react';
270
+
271
+ const keyFrameStyles = keyframes({
272
+ 'from, to': {
273
+ div: {
274
+ opacity: 0,
275
+ }
276
+ },
277
+ '50%': {
278
+ opacity: 1,
279
+ },
280
+ });
281
+ `,
282
+ errors: [{ messageId: 'no-nested-selectors' }],
283
+ },
284
+ {
285
+ name: 'Next sibling selector',
286
+ code: `
287
+ import { styled } from '@compiled/react';
288
+ styled.div({
289
+ '&+a': {
290
+ color: 'orange'
291
+ }
292
+ });
293
+ `,
294
+ errors: [{ messageId: 'no-nested-selectors' }],
295
+ },
296
+ {
297
+ name: 'Next sibling selector on non-HTML element',
298
+ code: `
299
+ import { styled } from '@compiled/react';
300
+ styled.div({
301
+ '& + &': {
302
+ color: 'orange'
303
+ }
304
+ });
305
+ `,
306
+ errors: [{ messageId: 'no-nested-selectors' }],
307
+ },
308
+ {
309
+ name: 'Subsequent sibling selector on non-HTML element',
310
+ code: `
311
+ import { styled } from '@compiled/react';
312
+ styled.div({
313
+ '& ~ &': {
314
+ color: 'orange'
315
+ }
316
+ });
317
+ `,
318
+ errors: [{ messageId: 'no-nested-selectors' }],
319
+ },
283
320
  ],
284
321
  },
285
322
  );