@atlaskit/eslint-plugin-ui-styling-standard 0.16.6 → 0.18.0
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/afm-jira/tsconfig.json +2 -3
- package/dist/cjs/presets/all.codegen.js +28 -27
- package/dist/cjs/presets/recommended.codegen.js +28 -27
- package/dist/cjs/rules/enforce-style-prop/index.js +1 -1
- package/dist/cjs/rules/external-rules.js +13 -11
- package/dist/cjs/rules/local-cx-xcss/index.js +1 -1
- package/dist/cjs/rules/no-array-arguments/index.js +1 -1
- package/dist/cjs/rules/no-classname-prop/index.js +1 -1
- package/dist/cjs/rules/no-container-queries/index.js +1 -1
- package/dist/cjs/rules/no-dynamic-styles/index.js +1 -1
- package/dist/cjs/rules/no-exported-styles/index.js +1 -1
- package/dist/cjs/rules/no-global-styles/index.js +1 -1
- package/dist/cjs/rules/no-important-styles/index.js +1 -1
- package/dist/cjs/rules/no-imported-style-values/index.js +1 -1
- package/dist/cjs/rules/no-nested-selectors/index.js +1 -1
- package/dist/cjs/rules/no-styled/index.js +1 -1
- package/dist/cjs/rules/no-unsafe-selectors/index.js +1 -1
- package/dist/cjs/rules/no-unsafe-values/index.js +1 -1
- package/dist/cjs/rules/use-compiled/index.js +1 -1
- package/dist/es2019/presets/all.codegen.js +28 -27
- package/dist/es2019/presets/recommended.codegen.js +28 -27
- package/dist/es2019/rules/enforce-style-prop/index.js +1 -1
- package/dist/es2019/rules/external-rules.js +13 -11
- package/dist/es2019/rules/local-cx-xcss/index.js +1 -1
- package/dist/es2019/rules/no-array-arguments/index.js +1 -1
- package/dist/es2019/rules/no-classname-prop/index.js +1 -1
- package/dist/es2019/rules/no-container-queries/index.js +1 -1
- package/dist/es2019/rules/no-dynamic-styles/index.js +1 -1
- package/dist/es2019/rules/no-exported-styles/index.js +1 -1
- package/dist/es2019/rules/no-global-styles/index.js +1 -1
- package/dist/es2019/rules/no-important-styles/index.js +1 -1
- package/dist/es2019/rules/no-imported-style-values/index.js +1 -1
- package/dist/es2019/rules/no-nested-selectors/index.js +1 -1
- package/dist/es2019/rules/no-styled/index.js +1 -1
- package/dist/es2019/rules/no-unsafe-selectors/index.js +1 -1
- package/dist/es2019/rules/no-unsafe-values/index.js +1 -1
- package/dist/es2019/rules/use-compiled/index.js +1 -1
- package/dist/esm/presets/all.codegen.js +28 -27
- package/dist/esm/presets/recommended.codegen.js +28 -27
- package/dist/esm/rules/enforce-style-prop/index.js +1 -1
- package/dist/esm/rules/external-rules.js +13 -11
- package/dist/esm/rules/local-cx-xcss/index.js +1 -1
- package/dist/esm/rules/no-array-arguments/index.js +1 -1
- package/dist/esm/rules/no-classname-prop/index.js +1 -1
- package/dist/esm/rules/no-container-queries/index.js +1 -1
- package/dist/esm/rules/no-dynamic-styles/index.js +1 -1
- package/dist/esm/rules/no-exported-styles/index.js +1 -1
- package/dist/esm/rules/no-global-styles/index.js +1 -1
- package/dist/esm/rules/no-important-styles/index.js +1 -1
- package/dist/esm/rules/no-imported-style-values/index.js +1 -1
- package/dist/esm/rules/no-nested-selectors/index.js +1 -1
- package/dist/esm/rules/no-styled/index.js +1 -1
- package/dist/esm/rules/no-unsafe-selectors/index.js +1 -1
- package/dist/esm/rules/no-unsafe-values/index.js +1 -1
- package/dist/esm/rules/use-compiled/index.js +1 -1
- package/dist/types/index.codegen.d.ts +2 -0
- package/dist/types/presets/all.codegen.d.ts +2 -1
- package/dist/types/presets/recommended.codegen.d.ts +2 -1
- package/dist/types-ts4.5/index.codegen.d.ts +2 -0
- package/dist/types-ts4.5/presets/all.codegen.d.ts +2 -1
- package/dist/types-ts4.5/presets/recommended.codegen.d.ts +2 -1
- package/package.json +2 -2
- package/src/presets/all.codegen.tsx +29 -26
- package/src/presets/recommended.codegen.tsx +29 -26
- package/src/rules/enforce-style-prop/index.tsx +1 -1
- package/src/rules/external-rules.tsx +12 -10
- package/src/rules/local-cx-xcss/index.tsx +1 -1
- package/src/rules/no-array-arguments/index.tsx +1 -1
- package/src/rules/no-classname-prop/index.tsx +1 -1
- package/src/rules/no-container-queries/index.tsx +1 -1
- package/src/rules/no-dynamic-styles/index.tsx +1 -1
- package/src/rules/no-exported-styles/index.tsx +1 -1
- package/src/rules/no-global-styles/index.tsx +1 -1
- package/src/rules/no-important-styles/index.tsx +1 -1
- package/src/rules/no-imported-style-values/index.tsx +2 -2
- package/src/rules/no-nested-selectors/index.tsx +1 -1
- package/src/rules/no-styled/index.tsx +1 -1
- package/src/rules/no-unsafe-selectors/index.tsx +1 -1
- package/src/rules/no-unsafe-values/index.tsx +1 -1
- package/src/rules/use-compiled/index.tsx +1 -1
|
@@ -45,7 +45,7 @@ export var rule = createLintRule({
|
|
|
45
45
|
docs: {
|
|
46
46
|
description: 'Ensures usage of `@compiled/react` instead of other CSS-in-JS libraries',
|
|
47
47
|
recommended: true,
|
|
48
|
-
severity: '
|
|
48
|
+
severity: 'error'
|
|
49
49
|
},
|
|
50
50
|
messages: {
|
|
51
51
|
'use-compiled': "Use '@compiled/react' instead of '{{importSource}}'"
|
|
@@ -22,6 +22,7 @@ export declare const configs: {
|
|
|
22
22
|
'@atlaskit/ui-styling-standard/use-compiled': string;
|
|
23
23
|
'@atlaskit/design-system/consistent-css-prop-usage': (string | {
|
|
24
24
|
excludeReactComponents: boolean;
|
|
25
|
+
shouldAlwaysCheckXcss: boolean;
|
|
25
26
|
})[];
|
|
26
27
|
'@atlaskit/design-system/no-css-tagged-template-expression': string;
|
|
27
28
|
'@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
|
|
@@ -64,6 +65,7 @@ export declare const configs: {
|
|
|
64
65
|
'@atlaskit/ui-styling-standard/use-compiled': string;
|
|
65
66
|
'@atlaskit/design-system/consistent-css-prop-usage': (string | {
|
|
66
67
|
excludeReactComponents: boolean;
|
|
68
|
+
shouldAlwaysCheckXcss: boolean;
|
|
67
69
|
})[];
|
|
68
70
|
'@atlaskit/design-system/no-css-tagged-template-expression': string;
|
|
69
71
|
'@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
declare const _default: {
|
|
@@ -25,6 +25,7 @@ declare const _default: {
|
|
|
25
25
|
'@atlaskit/ui-styling-standard/use-compiled': string;
|
|
26
26
|
'@atlaskit/design-system/consistent-css-prop-usage': (string | {
|
|
27
27
|
excludeReactComponents: boolean;
|
|
28
|
+
shouldAlwaysCheckXcss: boolean;
|
|
28
29
|
})[];
|
|
29
30
|
'@atlaskit/design-system/no-css-tagged-template-expression': string;
|
|
30
31
|
'@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
declare const _default: {
|
|
@@ -25,6 +25,7 @@ declare const _default: {
|
|
|
25
25
|
'@atlaskit/ui-styling-standard/use-compiled': string;
|
|
26
26
|
'@atlaskit/design-system/consistent-css-prop-usage': (string | {
|
|
27
27
|
excludeReactComponents: boolean;
|
|
28
|
+
shouldAlwaysCheckXcss: boolean;
|
|
28
29
|
})[];
|
|
29
30
|
'@atlaskit/design-system/no-css-tagged-template-expression': string;
|
|
30
31
|
'@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
|
|
@@ -22,6 +22,7 @@ export declare const configs: {
|
|
|
22
22
|
'@atlaskit/ui-styling-standard/use-compiled': string;
|
|
23
23
|
'@atlaskit/design-system/consistent-css-prop-usage': (string | {
|
|
24
24
|
excludeReactComponents: boolean;
|
|
25
|
+
shouldAlwaysCheckXcss: boolean;
|
|
25
26
|
})[];
|
|
26
27
|
'@atlaskit/design-system/no-css-tagged-template-expression': string;
|
|
27
28
|
'@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
|
|
@@ -64,6 +65,7 @@ export declare const configs: {
|
|
|
64
65
|
'@atlaskit/ui-styling-standard/use-compiled': string;
|
|
65
66
|
'@atlaskit/design-system/consistent-css-prop-usage': (string | {
|
|
66
67
|
excludeReactComponents: boolean;
|
|
68
|
+
shouldAlwaysCheckXcss: boolean;
|
|
67
69
|
})[];
|
|
68
70
|
'@atlaskit/design-system/no-css-tagged-template-expression': string;
|
|
69
71
|
'@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
declare const _default: {
|
|
@@ -25,6 +25,7 @@ declare const _default: {
|
|
|
25
25
|
'@atlaskit/ui-styling-standard/use-compiled': string;
|
|
26
26
|
'@atlaskit/design-system/consistent-css-prop-usage': (string | {
|
|
27
27
|
excludeReactComponents: boolean;
|
|
28
|
+
shouldAlwaysCheckXcss: boolean;
|
|
28
29
|
})[];
|
|
29
30
|
'@atlaskit/design-system/no-css-tagged-template-expression': string;
|
|
30
31
|
'@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
declare const _default: {
|
|
@@ -25,6 +25,7 @@ declare const _default: {
|
|
|
25
25
|
'@atlaskit/ui-styling-standard/use-compiled': string;
|
|
26
26
|
'@atlaskit/design-system/consistent-css-prop-usage': (string | {
|
|
27
27
|
excludeReactComponents: boolean;
|
|
28
|
+
shouldAlwaysCheckXcss: boolean;
|
|
28
29
|
})[];
|
|
29
30
|
'@atlaskit/design-system/no-css-tagged-template-expression': string;
|
|
30
31
|
'@atlaskit/design-system/no-keyframes-tagged-template-expression': string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/eslint-plugin-ui-styling-standard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
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",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@af/formatting": "*",
|
|
56
56
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
57
|
-
"@atlaskit/eslint-plugin-design-system": "^10.
|
|
57
|
+
"@atlaskit/eslint-plugin-design-system": "^10.10.0",
|
|
58
58
|
"@atlassian/codegen": "*",
|
|
59
59
|
"@compiled/eslint-plugin": "^0.13.6",
|
|
60
60
|
"@types/eslint": "^8.56.6",
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
export default {
|
|
@@ -8,29 +8,32 @@ export default {
|
|
|
8
8
|
rules: {
|
|
9
9
|
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
10
10
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
11
|
-
'@atlaskit/ui-styling-standard/enforce-style-prop': '
|
|
12
|
-
'@atlaskit/ui-styling-standard/local-cx-xcss': '
|
|
13
|
-
'@atlaskit/ui-styling-standard/no-array-arguments': '
|
|
14
|
-
'@atlaskit/ui-styling-standard/no-classname-prop': '
|
|
15
|
-
'@atlaskit/ui-styling-standard/no-container-queries': '
|
|
16
|
-
'@atlaskit/ui-styling-standard/no-dynamic-styles': '
|
|
17
|
-
'@atlaskit/ui-styling-standard/no-exported-styles': '
|
|
18
|
-
'@atlaskit/ui-styling-standard/no-global-styles': '
|
|
19
|
-
'@atlaskit/ui-styling-standard/no-important-styles': '
|
|
20
|
-
'@atlaskit/ui-styling-standard/no-imported-style-values': '
|
|
21
|
-
'@atlaskit/ui-styling-standard/no-nested-selectors': '
|
|
22
|
-
'@atlaskit/ui-styling-standard/no-styled': '
|
|
23
|
-
'@atlaskit/ui-styling-standard/no-unsafe-selectors': '
|
|
24
|
-
'@atlaskit/ui-styling-standard/no-unsafe-values': '
|
|
25
|
-
'@atlaskit/ui-styling-standard/use-compiled': '
|
|
26
|
-
'@atlaskit/design-system/consistent-css-prop-usage': [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
'@
|
|
31
|
-
'@
|
|
11
|
+
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
12
|
+
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
13
|
+
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
14
|
+
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
15
|
+
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
16
|
+
'@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
|
|
17
|
+
'@atlaskit/ui-styling-standard/no-exported-styles': 'error',
|
|
18
|
+
'@atlaskit/ui-styling-standard/no-global-styles': 'error',
|
|
19
|
+
'@atlaskit/ui-styling-standard/no-important-styles': 'error',
|
|
20
|
+
'@atlaskit/ui-styling-standard/no-imported-style-values': 'error',
|
|
21
|
+
'@atlaskit/ui-styling-standard/no-nested-selectors': 'error',
|
|
22
|
+
'@atlaskit/ui-styling-standard/no-styled': 'error',
|
|
23
|
+
'@atlaskit/ui-styling-standard/no-unsafe-selectors': 'error',
|
|
24
|
+
'@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
|
|
25
|
+
'@atlaskit/ui-styling-standard/use-compiled': 'error',
|
|
26
|
+
'@atlaskit/design-system/consistent-css-prop-usage': [
|
|
27
|
+
'error',
|
|
28
|
+
{ excludeReactComponents: true, shouldAlwaysCheckXcss: true },
|
|
29
|
+
],
|
|
30
|
+
'@atlaskit/design-system/no-css-tagged-template-expression': 'error',
|
|
31
|
+
'@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
|
|
32
|
+
'@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
|
|
33
|
+
'@compiled/no-suppress-xcss': 'error',
|
|
34
|
+
'@compiled/no-js-xcss': 'error',
|
|
32
35
|
'@atlaskit/design-system/no-empty-styled-expression': [
|
|
33
|
-
'
|
|
36
|
+
'error',
|
|
34
37
|
{
|
|
35
38
|
importSources: [
|
|
36
39
|
'@compiled/react',
|
|
@@ -43,7 +46,7 @@ export default {
|
|
|
43
46
|
},
|
|
44
47
|
],
|
|
45
48
|
'@atlaskit/design-system/no-exported-css': [
|
|
46
|
-
'
|
|
49
|
+
'error',
|
|
47
50
|
{
|
|
48
51
|
importSources: [
|
|
49
52
|
'@compiled/react',
|
|
@@ -56,7 +59,7 @@ export default {
|
|
|
56
59
|
},
|
|
57
60
|
],
|
|
58
61
|
'@atlaskit/design-system/no-exported-keyframes': [
|
|
59
|
-
'
|
|
62
|
+
'error',
|
|
60
63
|
{
|
|
61
64
|
importSources: [
|
|
62
65
|
'@compiled/react',
|
|
@@ -69,7 +72,7 @@ export default {
|
|
|
69
72
|
},
|
|
70
73
|
],
|
|
71
74
|
'@atlaskit/design-system/no-invalid-css-map': [
|
|
72
|
-
'
|
|
75
|
+
'error',
|
|
73
76
|
{ allowedFunctionCalls: [['@atlaskit/tokens', 'token']] },
|
|
74
77
|
],
|
|
75
78
|
},
|
|
@@ -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::
|
|
3
|
+
* @codegen <<SignedSource::d6fe3ee209ccee89003da5d8fffba51e>>
|
|
4
4
|
* @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
export default {
|
|
@@ -8,29 +8,32 @@ export default {
|
|
|
8
8
|
rules: {
|
|
9
9
|
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
10
10
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
11
|
-
'@atlaskit/ui-styling-standard/enforce-style-prop': '
|
|
12
|
-
'@atlaskit/ui-styling-standard/local-cx-xcss': '
|
|
13
|
-
'@atlaskit/ui-styling-standard/no-array-arguments': '
|
|
14
|
-
'@atlaskit/ui-styling-standard/no-classname-prop': '
|
|
15
|
-
'@atlaskit/ui-styling-standard/no-container-queries': '
|
|
16
|
-
'@atlaskit/ui-styling-standard/no-dynamic-styles': '
|
|
17
|
-
'@atlaskit/ui-styling-standard/no-exported-styles': '
|
|
18
|
-
'@atlaskit/ui-styling-standard/no-global-styles': '
|
|
19
|
-
'@atlaskit/ui-styling-standard/no-important-styles': '
|
|
20
|
-
'@atlaskit/ui-styling-standard/no-imported-style-values': '
|
|
21
|
-
'@atlaskit/ui-styling-standard/no-nested-selectors': '
|
|
22
|
-
'@atlaskit/ui-styling-standard/no-styled': '
|
|
23
|
-
'@atlaskit/ui-styling-standard/no-unsafe-selectors': '
|
|
24
|
-
'@atlaskit/ui-styling-standard/no-unsafe-values': '
|
|
25
|
-
'@atlaskit/ui-styling-standard/use-compiled': '
|
|
26
|
-
'@atlaskit/design-system/consistent-css-prop-usage': [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
'@
|
|
31
|
-
'@
|
|
11
|
+
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
12
|
+
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
13
|
+
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
14
|
+
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
15
|
+
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
16
|
+
'@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
|
|
17
|
+
'@atlaskit/ui-styling-standard/no-exported-styles': 'error',
|
|
18
|
+
'@atlaskit/ui-styling-standard/no-global-styles': 'error',
|
|
19
|
+
'@atlaskit/ui-styling-standard/no-important-styles': 'error',
|
|
20
|
+
'@atlaskit/ui-styling-standard/no-imported-style-values': 'error',
|
|
21
|
+
'@atlaskit/ui-styling-standard/no-nested-selectors': 'error',
|
|
22
|
+
'@atlaskit/ui-styling-standard/no-styled': 'error',
|
|
23
|
+
'@atlaskit/ui-styling-standard/no-unsafe-selectors': 'error',
|
|
24
|
+
'@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
|
|
25
|
+
'@atlaskit/ui-styling-standard/use-compiled': 'error',
|
|
26
|
+
'@atlaskit/design-system/consistent-css-prop-usage': [
|
|
27
|
+
'error',
|
|
28
|
+
{ excludeReactComponents: true, shouldAlwaysCheckXcss: true },
|
|
29
|
+
],
|
|
30
|
+
'@atlaskit/design-system/no-css-tagged-template-expression': 'error',
|
|
31
|
+
'@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
|
|
32
|
+
'@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
|
|
33
|
+
'@compiled/no-suppress-xcss': 'error',
|
|
34
|
+
'@compiled/no-js-xcss': 'error',
|
|
32
35
|
'@atlaskit/design-system/no-empty-styled-expression': [
|
|
33
|
-
'
|
|
36
|
+
'error',
|
|
34
37
|
{
|
|
35
38
|
importSources: [
|
|
36
39
|
'@compiled/react',
|
|
@@ -43,7 +46,7 @@ export default {
|
|
|
43
46
|
},
|
|
44
47
|
],
|
|
45
48
|
'@atlaskit/design-system/no-exported-css': [
|
|
46
|
-
'
|
|
49
|
+
'error',
|
|
47
50
|
{
|
|
48
51
|
importSources: [
|
|
49
52
|
'@compiled/react',
|
|
@@ -56,7 +59,7 @@ export default {
|
|
|
56
59
|
},
|
|
57
60
|
],
|
|
58
61
|
'@atlaskit/design-system/no-exported-keyframes': [
|
|
59
|
-
'
|
|
62
|
+
'error',
|
|
60
63
|
{
|
|
61
64
|
importSources: [
|
|
62
65
|
'@compiled/react',
|
|
@@ -69,7 +72,7 @@ export default {
|
|
|
69
72
|
},
|
|
70
73
|
],
|
|
71
74
|
'@atlaskit/design-system/no-invalid-css-map': [
|
|
72
|
-
'
|
|
75
|
+
'error',
|
|
73
76
|
{ allowedFunctionCalls: [['@atlaskit/tokens', 'token']] },
|
|
74
77
|
],
|
|
75
78
|
},
|
|
@@ -133,7 +133,7 @@ export const rule = createLintRule({
|
|
|
133
133
|
docs: {
|
|
134
134
|
description: 'Disallows usage of static styles in the `style` attribute in components',
|
|
135
135
|
recommended: true,
|
|
136
|
-
severity: '
|
|
136
|
+
severity: 'error',
|
|
137
137
|
},
|
|
138
138
|
messages: {
|
|
139
139
|
'enforce-style-prop':
|
|
@@ -30,12 +30,14 @@ export const externalRules: ExternalRuleMeta[] = [
|
|
|
30
30
|
externalUrl:
|
|
31
31
|
'https://atlassian.design/components/eslint-plugin-design-system/consistent-css-prop-usage/usage',
|
|
32
32
|
recommended: true,
|
|
33
|
-
severity: '
|
|
33
|
+
severity: 'error',
|
|
34
34
|
pluginConfig: {
|
|
35
35
|
// When passing a css prop to a React component, we don't know whether the component
|
|
36
36
|
// is Emotion or Compiled. Hence it is not safe to run autofixes like wrapping it in
|
|
37
37
|
// a `css` function call.
|
|
38
38
|
excludeReactComponents: true,
|
|
39
|
+
// Ensures that `xcss` prop is still linted even when `excludeReactComponents` is `true`.
|
|
40
|
+
shouldAlwaysCheckXcss: true,
|
|
39
41
|
},
|
|
40
42
|
},
|
|
41
43
|
},
|
|
@@ -51,7 +53,7 @@ export const externalRules: ExternalRuleMeta[] = [
|
|
|
51
53
|
externalUrl:
|
|
52
54
|
'https://atlassian.design/components/eslint-plugin-design-system/no-css-tagged-template-expression/usage',
|
|
53
55
|
recommended: true,
|
|
54
|
-
severity: '
|
|
56
|
+
severity: 'error',
|
|
55
57
|
},
|
|
56
58
|
},
|
|
57
59
|
{
|
|
@@ -66,7 +68,7 @@ export const externalRules: ExternalRuleMeta[] = [
|
|
|
66
68
|
externalUrl:
|
|
67
69
|
'https://atlassian.design/components/eslint-plugin-design-system/no-keyframes-tagged-template-expression/usage',
|
|
68
70
|
recommended: true,
|
|
69
|
-
severity: '
|
|
71
|
+
severity: 'error',
|
|
70
72
|
},
|
|
71
73
|
},
|
|
72
74
|
{
|
|
@@ -81,7 +83,7 @@ export const externalRules: ExternalRuleMeta[] = [
|
|
|
81
83
|
externalUrl:
|
|
82
84
|
'https://atlassian.design/components/eslint-plugin-design-system/no-styled-tagged-template-expression/usage',
|
|
83
85
|
recommended: true,
|
|
84
|
-
severity: '
|
|
86
|
+
severity: 'error',
|
|
85
87
|
},
|
|
86
88
|
},
|
|
87
89
|
{
|
|
@@ -94,7 +96,7 @@ export const externalRules: ExternalRuleMeta[] = [
|
|
|
94
96
|
externalUrl:
|
|
95
97
|
'https://github.com/atlassian-labs/compiled/tree/master/packages/eslint-plugin/src/rules/no-suppress-xcss',
|
|
96
98
|
recommended: true,
|
|
97
|
-
severity: '
|
|
99
|
+
severity: 'error',
|
|
98
100
|
},
|
|
99
101
|
},
|
|
100
102
|
{
|
|
@@ -107,7 +109,7 @@ export const externalRules: ExternalRuleMeta[] = [
|
|
|
107
109
|
externalUrl:
|
|
108
110
|
'https://github.com/atlassian-labs/compiled/tree/master/packages/eslint-plugin/src/rules/no-js-xcss',
|
|
109
111
|
recommended: true,
|
|
110
|
-
severity: '
|
|
112
|
+
severity: 'error',
|
|
111
113
|
},
|
|
112
114
|
},
|
|
113
115
|
{
|
|
@@ -121,7 +123,7 @@ export const externalRules: ExternalRuleMeta[] = [
|
|
|
121
123
|
externalUrl:
|
|
122
124
|
'https://atlassian.design/components/eslint-plugin-design-system/no-empty-styled-expression/usage',
|
|
123
125
|
recommended: true,
|
|
124
|
-
severity: '
|
|
126
|
+
severity: 'error',
|
|
125
127
|
pluginConfig: { importSources },
|
|
126
128
|
},
|
|
127
129
|
},
|
|
@@ -136,7 +138,7 @@ export const externalRules: ExternalRuleMeta[] = [
|
|
|
136
138
|
externalUrl:
|
|
137
139
|
'https://atlassian.design/components/eslint-plugin-design-system/no-exported-css/usage',
|
|
138
140
|
recommended: true,
|
|
139
|
-
severity: '
|
|
141
|
+
severity: 'error',
|
|
140
142
|
pluginConfig: { importSources },
|
|
141
143
|
},
|
|
142
144
|
},
|
|
@@ -151,7 +153,7 @@ export const externalRules: ExternalRuleMeta[] = [
|
|
|
151
153
|
externalUrl:
|
|
152
154
|
'https://atlassian.design/components/eslint-plugin-design-system/no-exported-keyframes/usage',
|
|
153
155
|
recommended: true,
|
|
154
|
-
severity: '
|
|
156
|
+
severity: 'error',
|
|
155
157
|
pluginConfig: { importSources },
|
|
156
158
|
},
|
|
157
159
|
},
|
|
@@ -166,7 +168,7 @@ export const externalRules: ExternalRuleMeta[] = [
|
|
|
166
168
|
externalUrl:
|
|
167
169
|
'https://atlassian.design/components/eslint-plugin-design-system/no-invalid-css-map/usage',
|
|
168
170
|
recommended: true,
|
|
169
|
-
severity: '
|
|
171
|
+
severity: 'error',
|
|
170
172
|
pluginConfig: {
|
|
171
173
|
allowedFunctionCalls: [['@atlaskit/tokens', 'token']],
|
|
172
174
|
},
|
|
@@ -27,7 +27,7 @@ export const rule = createLintRule({
|
|
|
27
27
|
description:
|
|
28
28
|
'Ensures the cx() function, which is part of the XCSS API, is only used within the xcss prop. This aids tracking what styles are applied to a jsx element.',
|
|
29
29
|
recommended: true,
|
|
30
|
-
severity: '
|
|
30
|
+
severity: 'error',
|
|
31
31
|
},
|
|
32
32
|
messages: {
|
|
33
33
|
'local-cx-xcss':
|
|
@@ -21,7 +21,7 @@ export const rule = createLintRule({
|
|
|
21
21
|
docs: {
|
|
22
22
|
description: 'Prevents global styles through CSS-in-JS or CSS module imports',
|
|
23
23
|
recommended: true,
|
|
24
|
-
severity: '
|
|
24
|
+
severity: 'error',
|
|
25
25
|
},
|
|
26
26
|
messages: {
|
|
27
27
|
'no-global-styles': 'Global styles are not allowed.',
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
hasStyleObjectArguments,
|
|
5
5
|
} from '@atlaskit/eslint-utils/is-supported-import';
|
|
6
6
|
import type { JSONSchema4 } from '@typescript-eslint/utils/dist/json-schema';
|
|
7
|
-
import type { AST_NODE_TYPES } from '@typescript-eslint/typescript-estree';
|
|
7
|
+
import type { AST_NODE_TYPES } from '@typescript-eslint/typescript-estree/dist/ts-estree';
|
|
8
8
|
import { findVariable } from '@atlaskit/eslint-utils/find-variable';
|
|
9
9
|
import type { Rule } from 'eslint';
|
|
10
10
|
import {
|
|
@@ -113,7 +113,7 @@ export const rule = createLintRule({
|
|
|
113
113
|
docs: {
|
|
114
114
|
description: 'Disallows imports of style values',
|
|
115
115
|
recommended: true,
|
|
116
|
-
severity: '
|
|
116
|
+
severity: 'error',
|
|
117
117
|
},
|
|
118
118
|
messages: {
|
|
119
119
|
'no-imported-style-values':
|
|
@@ -9,7 +9,7 @@ export const rule = createLintRule({
|
|
|
9
9
|
docs: {
|
|
10
10
|
description: 'Disallows usage of the `styled` imports',
|
|
11
11
|
recommended: true,
|
|
12
|
-
severity: '
|
|
12
|
+
severity: 'error',
|
|
13
13
|
},
|
|
14
14
|
messages: {
|
|
15
15
|
'no-styled': "Avoid usages of styled, eg. styled.div, styled('div'), styled(Component), etc.",
|
|
@@ -65,7 +65,7 @@ export const rule: Rule.RuleModule = createLintRule({
|
|
|
65
65
|
docs: {
|
|
66
66
|
description: 'Ensures usage of `@compiled/react` instead of other CSS-in-JS libraries',
|
|
67
67
|
recommended: true,
|
|
68
|
-
severity: '
|
|
68
|
+
severity: 'error',
|
|
69
69
|
},
|
|
70
70
|
messages: {
|
|
71
71
|
'use-compiled': `Use '@compiled/react' instead of '{{importSource}}'`,
|