@atlaskit/eslint-plugin-ui-styling-standard 3.0.1 → 3.0.3
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/README.md +19 -19
- package/dist/cjs/presets/all-flat.codegen.js +1 -2
- package/dist/cjs/presets/all.codegen.js +1 -2
- package/dist/cjs/presets/recommended-flat.codegen.js +1 -2
- package/dist/cjs/presets/recommended.codegen.js +1 -2
- package/dist/cjs/rules/atlaskit-theme/index.js +1 -2
- package/dist/cjs/rules/enforce-style-prop/index.js +1 -1
- 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-atlaskit-theme/index.js +1 -1
- package/dist/cjs/rules/no-classname-prop/index.js +1 -1
- package/dist/cjs/rules/no-container-queries/index.js +5 -5
- 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 +2 -2
- 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 +11 -11
- package/dist/cjs/rules/no-unused-cssmap-properties/index.js +1 -1
- package/dist/cjs/rules/use-compiled/index.js +1 -1
- package/dist/es2019/presets/all-flat.codegen.js +1 -2
- package/dist/es2019/presets/all.codegen.js +1 -2
- package/dist/es2019/presets/recommended-flat.codegen.js +1 -2
- package/dist/es2019/presets/recommended.codegen.js +1 -2
- package/dist/es2019/rules/atlaskit-theme/index.js +1 -2
- package/dist/es2019/rules/enforce-style-prop/index.js +1 -1
- 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-atlaskit-theme/index.js +1 -1
- package/dist/es2019/rules/no-classname-prop/index.js +1 -1
- package/dist/es2019/rules/no-container-queries/index.js +5 -5
- 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 +2 -2
- 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 +11 -11
- package/dist/es2019/rules/no-unused-cssmap-properties/index.js +1 -1
- package/dist/es2019/rules/use-compiled/index.js +1 -1
- package/dist/esm/presets/all-flat.codegen.js +1 -2
- package/dist/esm/presets/all.codegen.js +1 -2
- package/dist/esm/presets/recommended-flat.codegen.js +1 -2
- package/dist/esm/presets/recommended.codegen.js +1 -2
- package/dist/esm/rules/atlaskit-theme/index.js +1 -2
- package/dist/esm/rules/enforce-style-prop/index.js +1 -1
- 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-atlaskit-theme/index.js +1 -1
- package/dist/esm/rules/no-classname-prop/index.js +1 -1
- package/dist/esm/rules/no-container-queries/index.js +5 -5
- 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 +2 -2
- 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 +11 -11
- package/dist/esm/rules/no-unused-cssmap-properties/index.js +1 -1
- package/dist/esm/rules/use-compiled/index.js +1 -1
- package/dist/types/presets/all-flat.codegen.d.ts +1 -1
- package/dist/types/presets/all.codegen.d.ts +1 -1
- package/dist/types/presets/recommended-flat.codegen.d.ts +1 -1
- package/dist/types/presets/recommended.codegen.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/eslint-plugin-ui-styling-standard
|
|
2
2
|
|
|
3
|
+
## 3.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`64ee18b2949bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/64ee18b2949bf) -
|
|
8
|
+
Give styling rule diagnostics concrete migration and recovery steps, and replace stale Emotion
|
|
9
|
+
guidance with Compiled examples.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.0.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`8769f20fe2ebd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8769f20fe2ebd) -
|
|
17
|
+
Disable the legacy `atlaskit-theme` rule in generated presets.
|
|
18
|
+
|
|
3
19
|
## 3.0.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -42,25 +42,25 @@ module.exports = {
|
|
|
42
42
|
|
|
43
43
|
| Rule | Description | Recommended | Fixable | Suggestions |
|
|
44
44
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | ------- | ----------- |
|
|
45
|
-
| <a href="./src/rules/atlaskit-theme/README.md">atlaskit-theme</a>
|
|
46
|
-
| <a href="./src/rules/convert-props-syntax/README.md">convert-props-syntax</a>
|
|
47
|
-
| <a href="./src/rules/enforce-style-prop/README.md">enforce-style-prop</a>
|
|
48
|
-
| <a href="./src/rules/local-cx-xcss/README.md">local-cx-xcss</a>
|
|
49
|
-
| <a href="./src/rules/no-array-arguments/README.md">no-array-arguments</a>
|
|
50
|
-
| <a href="./src/rules/no-atlaskit-theme/README.md">no-atlaskit-theme</a>
|
|
51
|
-
| <a href="./src/rules/no-classname-prop/README.md">no-classname-prop</a>
|
|
52
|
-
| <a href="./src/rules/no-container-queries/README.md">no-container-queries</a>
|
|
53
|
-
| <a href="./src/rules/no-dynamic-styles/README.md">no-dynamic-styles</a>
|
|
54
|
-
| <a href="./src/rules/no-exported-styles/README.md">no-exported-styles</a>
|
|
55
|
-
| <a href="./src/rules/no-global-styles/README.md">no-global-styles</a>
|
|
56
|
-
| <a href="./src/rules/no-important-styles/README.md">no-important-styles</a>
|
|
57
|
-
| <a href="./src/rules/no-imported-style-values/README.md">no-imported-style-values</a>
|
|
58
|
-
| <a href="./src/rules/no-nested-selectors/README.md">no-nested-selectors</a>
|
|
59
|
-
| <a href="./src/rules/no-styled/README.md">no-styled</a>
|
|
60
|
-
| <a href="./src/rules/no-unsafe-selectors/README.md">no-unsafe-selectors</a>
|
|
61
|
-
| <a href="./src/rules/no-unsafe-values/README.md">no-unsafe-values</a>
|
|
62
|
-
| <a href="./src/rules/no-unused-cssmap-properties/README.md">no-unused-cssmap-properties</a>
|
|
63
|
-
| <a href="./src/rules/use-compiled/README.md">use-compiled</a>
|
|
45
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/atlaskit-theme/README.md">atlaskit-theme</a> | Ban certain usages of `@atlaskit/theme` that `@compiled/react` does not understand | | | |
|
|
46
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/convert-props-syntax/README.md">convert-props-syntax</a> | Convert props syntax that is unsupported by styled-components@<4 or @emotion/styled to props syntax that is supported. This is useful when used in conjunction with `no-styled-tagged-template-expression`, as output from the latter may use props syntax unsupported by those libraries. | Yes | Yes | |
|
|
47
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/enforce-style-prop/README.md">enforce-style-prop</a> | Disallows usage of static styles in the `style` attribute in components | Yes | | |
|
|
48
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/local-cx-xcss/README.md">local-cx-xcss</a> | 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. | Yes | | |
|
|
49
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-array-arguments/README.md">no-array-arguments</a> | Prevents usage of array arguments to style declaration functions | Yes | Yes | |
|
|
50
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-atlaskit-theme/README.md">no-atlaskit-theme</a> | Disallow imports from `@atlaskit/theme` | Yes | | |
|
|
51
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-classname-prop/README.md">no-classname-prop</a> | Disallows usage of the `className` prop in JSX | Yes | | |
|
|
52
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-container-queries/README.md">no-container-queries</a> | Prevents usage of @container query within css styling | Yes | | |
|
|
53
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-dynamic-styles/README.md">no-dynamic-styles</a> | Disallows use of dynamic styles in CSS-in-JS calls | Yes | | |
|
|
54
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-exported-styles/README.md">no-exported-styles</a> | Disallows exports of css, keyframes, styled and xcss | Yes | | |
|
|
55
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-global-styles/README.md">no-global-styles</a> | Prevents global styles through CSS-in-JS or CSS module imports | Yes | | |
|
|
56
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-important-styles/README.md">no-important-styles</a> | Disallows important style declarations | Yes | | |
|
|
57
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-imported-style-values/README.md">no-imported-style-values</a> | Disallows imports of style values | Yes | | |
|
|
58
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-nested-selectors/README.md">no-nested-selectors</a> | Prevents usage of nested selectors within css styling | Yes | | |
|
|
59
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-styled/README.md">no-styled</a> | Disallows usage of the `styled` imports | Yes | | |
|
|
60
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-unsafe-selectors/README.md">no-unsafe-selectors</a> | Disallows use of nested styles in `css` functions. | Yes | Yes | Yes |
|
|
61
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-unsafe-values/README.md">no-unsafe-values</a> | Disallows styles that are difficult/impossible to statically anaylze. | Yes | | |
|
|
62
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/no-unused-cssmap-properties/README.md">no-unused-cssmap-properties</a> | Detects unused properties in cssMap style objects that are not exported. Helps maintain clean code by identifying style variants that are defined but never used. | Yes | | |
|
|
63
|
+
| <a href="./packages/design-system/eslint-plugin-ui-styling-standard/src/rules/use-compiled/README.md">use-compiled</a> | Ensures usage of `@compiled/react` or `@atlaskit/css` instead of other CSS-in-JS libraries | Yes | Yes | |
|
|
64
64
|
| <a href="https://atlassian.design/components/eslint-plugin-ui-styling-standard/consistent-css-prop-usage/usage">@atlaskit/design-system/consistent-css-prop-usage</a> | Ensures consistency with `css` and `xcss` prop usages | Yes | Yes | |
|
|
65
65
|
| <a href="https://atlassian.design/components/eslint-plugin-ui-styling-standard/no-css-tagged-template-expression/usage">@atlaskit/design-system/no-css-tagged-template-expression</a> | Disallows any `css` tagged template expressions that originate from Emotion, Styled Components or Compiled | Yes | Yes | |
|
|
66
66
|
| <a href="https://atlassian.design/components/eslint-plugin-ui-styling-standard/no-keyframes-tagged-template-expression/usage">@atlaskit/design-system/no-keyframes-tagged-template-expression</a> | Disallows any `keyframe` tagged template expressions that originate from Emotion, Styled Components or Compiled | Yes | Yes | |
|
|
@@ -9,7 +9,7 @@ var atlaskitDesignSystemPlugin = _interopRequireWildcard(require("@atlaskit/esli
|
|
|
9
9
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
10
10
|
/**
|
|
11
11
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
12
|
-
* @codegen <<SignedSource::
|
|
12
|
+
* @codegen <<SignedSource::856ecaae15d6d75373055852fa8db5f0>>
|
|
13
13
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
14
14
|
*/
|
|
15
15
|
|
|
@@ -19,7 +19,6 @@ var config = {
|
|
|
19
19
|
'@atlaskit/design-system': atlaskitDesignSystemPlugin
|
|
20
20
|
},
|
|
21
21
|
rules: {
|
|
22
|
-
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
23
22
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
24
23
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
25
24
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
@@ -6,14 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
9
|
-
* @codegen <<SignedSource::
|
|
9
|
+
* @codegen <<SignedSource::a0cc99967725d4babf6875fef77b6f62>>
|
|
10
10
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
var config = {
|
|
14
14
|
plugins: ['@atlaskit/ui-styling-standard', '@atlaskit/design-system'],
|
|
15
15
|
rules: {
|
|
16
|
-
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
17
16
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
18
17
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
19
18
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
@@ -9,7 +9,7 @@ var atlaskitDesignSystemPlugin = _interopRequireWildcard(require("@atlaskit/esli
|
|
|
9
9
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
10
10
|
/**
|
|
11
11
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
12
|
-
* @codegen <<SignedSource::
|
|
12
|
+
* @codegen <<SignedSource::856ecaae15d6d75373055852fa8db5f0>>
|
|
13
13
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
14
14
|
*/
|
|
15
15
|
|
|
@@ -19,7 +19,6 @@ var config = {
|
|
|
19
19
|
'@atlaskit/design-system': atlaskitDesignSystemPlugin
|
|
20
20
|
},
|
|
21
21
|
rules: {
|
|
22
|
-
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
23
22
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
24
23
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
25
24
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
@@ -6,14 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
9
|
-
* @codegen <<SignedSource::
|
|
9
|
+
* @codegen <<SignedSource::a0cc99967725d4babf6875fef77b6f62>>
|
|
10
10
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
var config = {
|
|
14
14
|
plugins: ['@atlaskit/ui-styling-standard', '@atlaskit/design-system'],
|
|
15
15
|
rules: {
|
|
16
|
-
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
17
16
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
18
17
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
19
18
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
@@ -130,8 +130,7 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
130
130
|
name: 'atlaskit-theme',
|
|
131
131
|
docs: {
|
|
132
132
|
description: 'Ban certain usages of `@atlaskit/theme` that `@compiled/react` does not understand',
|
|
133
|
-
|
|
134
|
-
severity: 'error'
|
|
133
|
+
removeFromPresets: true
|
|
135
134
|
},
|
|
136
135
|
messages: {
|
|
137
136
|
usingTypography: 'Typography does not work with Compiled. Please utilise alternatives like Heading or tokens instead and see https://atlassian.design/components/eslint-plugin-ui-styling-standard/atlaskit-theme/usage',
|
|
@@ -184,7 +184,7 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
184
184
|
severity: 'error'
|
|
185
185
|
},
|
|
186
186
|
messages: {
|
|
187
|
-
'enforce-style-prop':
|
|
187
|
+
'enforce-style-prop': "Move static style values into module-scoped cssMap() or css() declarations and apply them with css or xcss; keep only runtime values in style."
|
|
188
188
|
},
|
|
189
189
|
type: 'problem'
|
|
190
190
|
},
|
|
@@ -27,7 +27,7 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
27
27
|
severity: 'error'
|
|
28
28
|
},
|
|
29
29
|
messages: {
|
|
30
|
-
'local-cx-xcss':
|
|
30
|
+
'local-cx-xcss': "Call cx() directly inside the xcss prop, for example xcss={cx(styles.base, active && styles.active)}, instead of storing its result elsewhere."
|
|
31
31
|
},
|
|
32
32
|
type: 'problem'
|
|
33
33
|
},
|
|
@@ -31,7 +31,7 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
31
31
|
severity: 'error'
|
|
32
32
|
},
|
|
33
33
|
messages: {
|
|
34
|
-
'no-array-arguments': "
|
|
34
|
+
'no-array-arguments': "Pass style objects as separate arguments instead of wrapping arguments in an array; delete an empty array argument."
|
|
35
35
|
},
|
|
36
36
|
type: 'problem',
|
|
37
37
|
fixable: 'code',
|
|
@@ -14,7 +14,7 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
14
14
|
severity: 'error'
|
|
15
15
|
},
|
|
16
16
|
messages: {
|
|
17
|
-
'no-atlaskit-theme':
|
|
17
|
+
'no-atlaskit-theme': "Replace @atlaskit/theme imports with semantic token() values from @atlaskit/tokens or the matching ADS component; migrate each imported helper before removing the import."
|
|
18
18
|
},
|
|
19
19
|
type: 'problem'
|
|
20
20
|
},
|
|
@@ -21,7 +21,7 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
21
21
|
severity: 'error'
|
|
22
22
|
},
|
|
23
23
|
messages: {
|
|
24
|
-
'no-classname-prop':
|
|
24
|
+
'no-classname-prop': "Apply local styles through css instead of className. Use supported component props or its bounded xcss interface for component customization."
|
|
25
25
|
},
|
|
26
26
|
type: 'problem'
|
|
27
27
|
},
|
|
@@ -116,11 +116,11 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
116
116
|
severity: 'error'
|
|
117
117
|
},
|
|
118
118
|
messages: {
|
|
119
|
-
'no-container-queries':
|
|
120
|
-
'no-container-style-queries':
|
|
121
|
-
'no-unbound-container-queries':
|
|
122
|
-
'no-mismatched-container-name':
|
|
123
|
-
'no-non-dimension-container-queries':
|
|
119
|
+
'no-container-queries': "Use a named container declared in this file and a width/height condition; type the static query key with satisfies and the default Container import from @atlaskit/css/at-rules/container.",
|
|
120
|
+
'no-container-style-queries': "Replace the style query with an explicit prop and local cssMap variant, or use a width/height-based query when size is the intended condition.",
|
|
121
|
+
'no-unbound-container-queries': "Name the container in the same file and reference it in the query, for example containerName: \"card\" with \"@container card (min-width: 30rem)\".",
|
|
122
|
+
'no-mismatched-container-name': "Use the same container name in this @container query and the containerName declaration in this file; rename the mismatched declaration or query.",
|
|
123
|
+
'no-non-dimension-container-queries': "Use a width/height condition for this named local container. Represent other conditions as explicit props selecting local styles."
|
|
124
124
|
},
|
|
125
125
|
type: 'problem',
|
|
126
126
|
schema: schema
|
|
@@ -34,7 +34,7 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
34
34
|
},
|
|
35
35
|
schema: schema,
|
|
36
36
|
messages: {
|
|
37
|
-
'no-dynamic-styles':
|
|
37
|
+
'no-dynamic-styles': "Declare static variants with cssMap() and select the variant in JSX; pass values known only at runtime through the style prop."
|
|
38
38
|
},
|
|
39
39
|
type: 'problem'
|
|
40
40
|
},
|
|
@@ -29,7 +29,7 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
29
29
|
severity: 'error'
|
|
30
30
|
},
|
|
31
31
|
messages: {
|
|
32
|
-
'no-exported-styles':
|
|
32
|
+
'no-exported-styles': "Keep css, cssMap, keyframes, styled and xcss declarations in the file that uses them. Export a component to share its styling instead of exporting style values."
|
|
33
33
|
},
|
|
34
34
|
type: 'problem',
|
|
35
35
|
schema: schema
|
|
@@ -26,8 +26,8 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
26
26
|
severity: 'error'
|
|
27
27
|
},
|
|
28
28
|
messages: {
|
|
29
|
-
'no-global-styles':
|
|
30
|
-
'no-css-modules':
|
|
29
|
+
'no-global-styles': "Move global declarations into local cssMap() or css() styles on their owning elements. Use @atlaskit/css-reset only for the supported global reset.",
|
|
30
|
+
'no-css-modules': "Replace the CSS-file import with local cssMap() or css() declarations from @atlaskit/css and apply them on the owning elements; preserve the imported styles during migration."
|
|
31
31
|
},
|
|
32
32
|
type: 'problem'
|
|
33
33
|
},
|
|
@@ -18,7 +18,7 @@ var rule = (0, _createRuleWithTypedConfig.createLintRuleWithTypedConfig)({
|
|
|
18
18
|
severity: 'error'
|
|
19
19
|
},
|
|
20
20
|
messages: {
|
|
21
|
-
'no-important-styles':
|
|
21
|
+
'no-important-styles': "Remove !important and apply the intended style directly to the owning element; resolve conflicting declarations through local style composition."
|
|
22
22
|
},
|
|
23
23
|
type: 'problem',
|
|
24
24
|
schema: {
|
|
@@ -123,7 +123,7 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
123
123
|
severity: 'error'
|
|
124
124
|
},
|
|
125
125
|
messages: {
|
|
126
|
-
'no-imported-style-values':
|
|
126
|
+
'no-imported-style-values': "Declare and use these styles in the same file. Share a component across files instead of importing css, cssMap, styled, keyframes or xcss values."
|
|
127
127
|
},
|
|
128
128
|
type: 'problem',
|
|
129
129
|
schema: schema
|
|
@@ -63,7 +63,7 @@ var rule = (0, _createRuleWithTypedConfig.createLintRuleWithTypedConfig)({
|
|
|
63
63
|
severity: 'error'
|
|
64
64
|
},
|
|
65
65
|
messages: {
|
|
66
|
-
'no-nested-selectors':
|
|
66
|
+
'no-nested-selectors': "Apply local styles directly to the child element instead of selecting it through a parent or external context; pass explicit props for conditional variants."
|
|
67
67
|
},
|
|
68
68
|
type: 'problem',
|
|
69
69
|
schema: {
|
|
@@ -16,7 +16,7 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
16
16
|
severity: 'error'
|
|
17
17
|
},
|
|
18
18
|
messages: {
|
|
19
|
-
'no-styled': "
|
|
19
|
+
'no-styled': "Replace styled with module-scoped cssMap() or css() from @atlaskit/css and apply styles on the element; pass runtime-only values through style."
|
|
20
20
|
},
|
|
21
21
|
type: 'problem'
|
|
22
22
|
},
|
|
@@ -101,23 +101,23 @@ var rule = (0, _createRuleWithTypedConfig.createLintRuleWithTypedConfig)({
|
|
|
101
101
|
/**
|
|
102
102
|
* Selector messages
|
|
103
103
|
*/
|
|
104
|
-
'no-ambiguous-pseudos':
|
|
105
|
-
'no-increased-specificity':
|
|
106
|
-
'no-restricted-pseudos':
|
|
107
|
-
'no-legacy-pseudo-element-syntax':
|
|
108
|
-
'no-unparsable-selectors': "The selector '{{selectorText}}' could not be parsed
|
|
109
|
-
'no-selectors-object':
|
|
104
|
+
'no-ambiguous-pseudos': "Prefix the pseudo-selector with & when it targets this element (for example &:hover); apply descendant styles directly to the child instead.",
|
|
105
|
+
'no-increased-specificity': "Replace chained nesting selectors such as && with one & selector, then resolve competing styles through local composition.",
|
|
106
|
+
'no-restricted-pseudos': "The {{pseudo}} pseudo-selector is unsupported. Use an allowed local pseudo such as &:hover, or pass explicit state as a prop and select a local cssMap variant.",
|
|
107
|
+
'no-legacy-pseudo-element-syntax': "Use a double colon for pseudo-elements, for example &::before or &::after, instead of the legacy single-colon syntax.",
|
|
108
|
+
'no-unparsable-selectors': "The selector '{{selectorText}}' could not be parsed. Correct its CSS syntax; if it is valid, report the selector and reproduction to #help-ui-styling-standard.",
|
|
109
|
+
'no-selectors-object': "Move selectors out of the selectors object into supported local style keys; apply child styles directly to each child element.",
|
|
110
110
|
/**
|
|
111
111
|
* At-rule messages
|
|
112
112
|
*/
|
|
113
|
-
'no-keyframes-at-rules':
|
|
114
|
-
'no-restricted-at-rules':
|
|
115
|
-
'no-grouped-at-rules':
|
|
116
|
-
'no-noncanonical-media-query':
|
|
113
|
+
'no-keyframes-at-rules': "Replace the @keyframes at-rule with keyframes() from @compiled/react and reference its result through animationName.",
|
|
114
|
+
'no-restricted-at-rules': "{{atRule}} is unsupported. Use a supported @media, @supports or @property rule; for runtime conditions select a local style variant in JavaScript.",
|
|
115
|
+
'no-grouped-at-rules': "Flatten grouped at-rules into complete keys, for example \"@media (min-width: 48rem)\" instead of an \"@media\" object containing conditions.",
|
|
116
|
+
'no-noncanonical-media-query': "Match the literal query to its imported @atlaskit/css/at-rules type, including the exact breakpoint, units and comparison operator.",
|
|
117
117
|
/**
|
|
118
118
|
* Suggestion messages
|
|
119
119
|
*/
|
|
120
|
-
'insert-nesting-selector':
|
|
120
|
+
'insert-nesting-selector': "Insert & before this pseudo-selector to target the element itself, for example &:hover."
|
|
121
121
|
},
|
|
122
122
|
schema: {
|
|
123
123
|
type: 'object',
|
|
@@ -77,7 +77,7 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
77
77
|
severity: 'warn'
|
|
78
78
|
},
|
|
79
79
|
messages: {
|
|
80
|
-
'unused-property':
|
|
80
|
+
'unused-property': "The \"{{propertyName}}\" style is never used. Remove it from cssMap, or apply it to the intended element if the style is still required."
|
|
81
81
|
},
|
|
82
82
|
type: 'problem'
|
|
83
83
|
},
|
|
@@ -60,7 +60,7 @@ var rule = (0, _createRule.createLintRule)({
|
|
|
60
60
|
severity: 'error'
|
|
61
61
|
},
|
|
62
62
|
messages: {
|
|
63
|
-
'use-compiled': "
|
|
63
|
+
'use-compiled': "Migrate '{{importSource}}' styling to @atlaskit/css or @compiled/react, updating imports and usages together. Verify the component rather than mixing styling engines on it."
|
|
64
64
|
},
|
|
65
65
|
schema: schema
|
|
66
66
|
},
|
|
@@ -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::856ecaae15d6d75373055852fa8db5f0>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -11,7 +11,6 @@ const config = {
|
|
|
11
11
|
'@atlaskit/design-system': atlaskitDesignSystemPlugin
|
|
12
12
|
},
|
|
13
13
|
rules: {
|
|
14
|
-
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
15
14
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
16
15
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
17
16
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::a0cc99967725d4babf6875fef77b6f62>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
const config = {
|
|
8
8
|
plugins: ['@atlaskit/ui-styling-standard', '@atlaskit/design-system'],
|
|
9
9
|
rules: {
|
|
10
|
-
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
11
10
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
12
11
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
13
12
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
@@ -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::856ecaae15d6d75373055852fa8db5f0>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -11,7 +11,6 @@ const config = {
|
|
|
11
11
|
'@atlaskit/design-system': atlaskitDesignSystemPlugin
|
|
12
12
|
},
|
|
13
13
|
rules: {
|
|
14
|
-
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
15
14
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
16
15
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
17
16
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::a0cc99967725d4babf6875fef77b6f62>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
const config = {
|
|
8
8
|
plugins: ['@atlaskit/ui-styling-standard', '@atlaskit/design-system'],
|
|
9
9
|
rules: {
|
|
10
|
-
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
11
10
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
12
11
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
13
12
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
@@ -91,8 +91,7 @@ const rule = createLintRule({
|
|
|
91
91
|
name: 'atlaskit-theme',
|
|
92
92
|
docs: {
|
|
93
93
|
description: 'Ban certain usages of `@atlaskit/theme` that `@compiled/react` does not understand',
|
|
94
|
-
|
|
95
|
-
severity: 'error'
|
|
94
|
+
removeFromPresets: true
|
|
96
95
|
},
|
|
97
96
|
messages: {
|
|
98
97
|
usingTypography: 'Typography does not work with Compiled. Please utilise alternatives like Heading or tokens instead and see https://atlassian.design/components/eslint-plugin-ui-styling-standard/atlaskit-theme/usage',
|
|
@@ -180,7 +180,7 @@ const rule = createLintRule({
|
|
|
180
180
|
severity: 'error'
|
|
181
181
|
},
|
|
182
182
|
messages: {
|
|
183
|
-
'enforce-style-prop':
|
|
183
|
+
'enforce-style-prop': "Move static style values into module-scoped cssMap() or css() declarations and apply them with css or xcss; keep only runtime values in style."
|
|
184
184
|
},
|
|
185
185
|
type: 'problem'
|
|
186
186
|
},
|
|
@@ -21,7 +21,7 @@ const rule = createLintRule({
|
|
|
21
21
|
severity: 'error'
|
|
22
22
|
},
|
|
23
23
|
messages: {
|
|
24
|
-
'local-cx-xcss':
|
|
24
|
+
'local-cx-xcss': "Call cx() directly inside the xcss prop, for example xcss={cx(styles.base, active && styles.active)}, instead of storing its result elsewhere."
|
|
25
25
|
},
|
|
26
26
|
type: 'problem'
|
|
27
27
|
},
|
|
@@ -22,7 +22,7 @@ const rule = createLintRule({
|
|
|
22
22
|
severity: 'error'
|
|
23
23
|
},
|
|
24
24
|
messages: {
|
|
25
|
-
'no-array-arguments': "
|
|
25
|
+
'no-array-arguments': "Pass style objects as separate arguments instead of wrapping arguments in an array; delete an empty array argument."
|
|
26
26
|
},
|
|
27
27
|
type: 'problem',
|
|
28
28
|
fixable: 'code',
|
|
@@ -8,7 +8,7 @@ const rule = createLintRule({
|
|
|
8
8
|
severity: 'error'
|
|
9
9
|
},
|
|
10
10
|
messages: {
|
|
11
|
-
'no-atlaskit-theme':
|
|
11
|
+
'no-atlaskit-theme': "Replace @atlaskit/theme imports with semantic token() values from @atlaskit/tokens or the matching ADS component; migrate each imported helper before removing the import."
|
|
12
12
|
},
|
|
13
13
|
type: 'problem'
|
|
14
14
|
},
|
|
@@ -15,7 +15,7 @@ const rule = createLintRule({
|
|
|
15
15
|
severity: 'error'
|
|
16
16
|
},
|
|
17
17
|
messages: {
|
|
18
|
-
'no-classname-prop':
|
|
18
|
+
'no-classname-prop': "Apply local styles through css instead of className. Use supported component props or its bounded xcss interface for component customization."
|
|
19
19
|
},
|
|
20
20
|
type: 'problem'
|
|
21
21
|
},
|
|
@@ -99,11 +99,11 @@ const rule = createLintRule({
|
|
|
99
99
|
severity: 'error'
|
|
100
100
|
},
|
|
101
101
|
messages: {
|
|
102
|
-
'no-container-queries':
|
|
103
|
-
'no-container-style-queries':
|
|
104
|
-
'no-unbound-container-queries':
|
|
105
|
-
'no-mismatched-container-name':
|
|
106
|
-
'no-non-dimension-container-queries':
|
|
102
|
+
'no-container-queries': "Use a named container declared in this file and a width/height condition; type the static query key with satisfies and the default Container import from @atlaskit/css/at-rules/container.",
|
|
103
|
+
'no-container-style-queries': "Replace the style query with an explicit prop and local cssMap variant, or use a width/height-based query when size is the intended condition.",
|
|
104
|
+
'no-unbound-container-queries': "Name the container in the same file and reference it in the query, for example containerName: \"card\" with \"@container card (min-width: 30rem)\".",
|
|
105
|
+
'no-mismatched-container-name': "Use the same container name in this @container query and the containerName declaration in this file; rename the mismatched declaration or query.",
|
|
106
|
+
'no-non-dimension-container-queries': "Use a width/height condition for this named local container. Represent other conditions as explicit props selecting local styles."
|
|
107
107
|
},
|
|
108
108
|
type: 'problem',
|
|
109
109
|
schema
|
|
@@ -24,7 +24,7 @@ const rule = createLintRule({
|
|
|
24
24
|
},
|
|
25
25
|
schema,
|
|
26
26
|
messages: {
|
|
27
|
-
'no-dynamic-styles':
|
|
27
|
+
'no-dynamic-styles': "Declare static variants with cssMap() and select the variant in JSX; pass values known only at runtime through the style prop."
|
|
28
28
|
},
|
|
29
29
|
type: 'problem'
|
|
30
30
|
},
|
|
@@ -23,7 +23,7 @@ const rule = createLintRule({
|
|
|
23
23
|
severity: 'error'
|
|
24
24
|
},
|
|
25
25
|
messages: {
|
|
26
|
-
'no-exported-styles':
|
|
26
|
+
'no-exported-styles': "Keep css, cssMap, keyframes, styled and xcss declarations in the file that uses them. Export a component to share its styling instead of exporting style values."
|
|
27
27
|
},
|
|
28
28
|
type: 'problem',
|
|
29
29
|
schema
|
|
@@ -17,8 +17,8 @@ const rule = createLintRule({
|
|
|
17
17
|
severity: 'error'
|
|
18
18
|
},
|
|
19
19
|
messages: {
|
|
20
|
-
'no-global-styles':
|
|
21
|
-
'no-css-modules':
|
|
20
|
+
'no-global-styles': "Move global declarations into local cssMap() or css() styles on their owning elements. Use @atlaskit/css-reset only for the supported global reset.",
|
|
21
|
+
'no-css-modules': "Replace the CSS-file import with local cssMap() or css() declarations from @atlaskit/css and apply them on the owning elements; preserve the imported styles during migration."
|
|
22
22
|
},
|
|
23
23
|
type: 'problem'
|
|
24
24
|
},
|
|
@@ -12,7 +12,7 @@ const rule = createLintRuleWithTypedConfig({
|
|
|
12
12
|
severity: 'error'
|
|
13
13
|
},
|
|
14
14
|
messages: {
|
|
15
|
-
'no-important-styles':
|
|
15
|
+
'no-important-styles': "Remove !important and apply the intended style directly to the owning element; resolve conflicting declarations through local style composition."
|
|
16
16
|
},
|
|
17
17
|
type: 'problem',
|
|
18
18
|
schema: {
|
|
@@ -112,7 +112,7 @@ const rule = createLintRule({
|
|
|
112
112
|
severity: 'error'
|
|
113
113
|
},
|
|
114
114
|
messages: {
|
|
115
|
-
'no-imported-style-values':
|
|
115
|
+
'no-imported-style-values': "Declare and use these styles in the same file. Share a component across files instead of importing css, cssMap, styled, keyframes or xcss values."
|
|
116
116
|
},
|
|
117
117
|
type: 'problem',
|
|
118
118
|
schema
|
|
@@ -48,7 +48,7 @@ const rule = createLintRuleWithTypedConfig({
|
|
|
48
48
|
severity: 'error'
|
|
49
49
|
},
|
|
50
50
|
messages: {
|
|
51
|
-
'no-nested-selectors':
|
|
51
|
+
'no-nested-selectors': "Apply local styles directly to the child element instead of selecting it through a parent or external context; pass explicit props for conditional variants."
|
|
52
52
|
},
|
|
53
53
|
type: 'problem',
|
|
54
54
|
schema: {
|
|
@@ -10,7 +10,7 @@ const rule = createLintRule({
|
|
|
10
10
|
severity: 'error'
|
|
11
11
|
},
|
|
12
12
|
messages: {
|
|
13
|
-
'no-styled': "
|
|
13
|
+
'no-styled': "Replace styled with module-scoped cssMap() or css() from @atlaskit/css and apply styles on the element; pass runtime-only values through style."
|
|
14
14
|
},
|
|
15
15
|
type: 'problem'
|
|
16
16
|
},
|
|
@@ -74,23 +74,23 @@ const rule = createLintRuleWithTypedConfig({
|
|
|
74
74
|
/**
|
|
75
75
|
* Selector messages
|
|
76
76
|
*/
|
|
77
|
-
'no-ambiguous-pseudos':
|
|
78
|
-
'no-increased-specificity':
|
|
79
|
-
'no-restricted-pseudos':
|
|
80
|
-
'no-legacy-pseudo-element-syntax':
|
|
81
|
-
'no-unparsable-selectors': "The selector '{{selectorText}}' could not be parsed
|
|
82
|
-
'no-selectors-object':
|
|
77
|
+
'no-ambiguous-pseudos': "Prefix the pseudo-selector with & when it targets this element (for example &:hover); apply descendant styles directly to the child instead.",
|
|
78
|
+
'no-increased-specificity': "Replace chained nesting selectors such as && with one & selector, then resolve competing styles through local composition.",
|
|
79
|
+
'no-restricted-pseudos': "The {{pseudo}} pseudo-selector is unsupported. Use an allowed local pseudo such as &:hover, or pass explicit state as a prop and select a local cssMap variant.",
|
|
80
|
+
'no-legacy-pseudo-element-syntax': "Use a double colon for pseudo-elements, for example &::before or &::after, instead of the legacy single-colon syntax.",
|
|
81
|
+
'no-unparsable-selectors': "The selector '{{selectorText}}' could not be parsed. Correct its CSS syntax; if it is valid, report the selector and reproduction to #help-ui-styling-standard.",
|
|
82
|
+
'no-selectors-object': "Move selectors out of the selectors object into supported local style keys; apply child styles directly to each child element.",
|
|
83
83
|
/**
|
|
84
84
|
* At-rule messages
|
|
85
85
|
*/
|
|
86
|
-
'no-keyframes-at-rules':
|
|
87
|
-
'no-restricted-at-rules':
|
|
88
|
-
'no-grouped-at-rules':
|
|
89
|
-
'no-noncanonical-media-query':
|
|
86
|
+
'no-keyframes-at-rules': "Replace the @keyframes at-rule with keyframes() from @compiled/react and reference its result through animationName.",
|
|
87
|
+
'no-restricted-at-rules': "{{atRule}} is unsupported. Use a supported @media, @supports or @property rule; for runtime conditions select a local style variant in JavaScript.",
|
|
88
|
+
'no-grouped-at-rules': "Flatten grouped at-rules into complete keys, for example \"@media (min-width: 48rem)\" instead of an \"@media\" object containing conditions.",
|
|
89
|
+
'no-noncanonical-media-query': "Match the literal query to its imported @atlaskit/css/at-rules type, including the exact breakpoint, units and comparison operator.",
|
|
90
90
|
/**
|
|
91
91
|
* Suggestion messages
|
|
92
92
|
*/
|
|
93
|
-
'insert-nesting-selector':
|
|
93
|
+
'insert-nesting-selector': "Insert & before this pseudo-selector to target the element itself, for example &:hover."
|
|
94
94
|
},
|
|
95
95
|
schema: {
|
|
96
96
|
type: 'object',
|
|
@@ -69,7 +69,7 @@ const rule = createLintRule({
|
|
|
69
69
|
severity: 'warn'
|
|
70
70
|
},
|
|
71
71
|
messages: {
|
|
72
|
-
'unused-property':
|
|
72
|
+
'unused-property': "The \"{{propertyName}}\" style is never used. Remove it from cssMap, or apply it to the intended element if the style is still required."
|
|
73
73
|
},
|
|
74
74
|
type: 'problem'
|
|
75
75
|
},
|
|
@@ -48,7 +48,7 @@ const rule = createLintRule({
|
|
|
48
48
|
severity: 'error'
|
|
49
49
|
},
|
|
50
50
|
messages: {
|
|
51
|
-
'use-compiled':
|
|
51
|
+
'use-compiled': "Migrate '{{importSource}}' styling to @atlaskit/css or @compiled/react, updating imports and usages together. Verify the component rather than mixing styling engines on it."
|
|
52
52
|
},
|
|
53
53
|
schema
|
|
54
54
|
},
|
|
@@ -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::856ecaae15d6d75373055852fa8db5f0>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -11,7 +11,6 @@ var config = {
|
|
|
11
11
|
'@atlaskit/design-system': atlaskitDesignSystemPlugin
|
|
12
12
|
},
|
|
13
13
|
rules: {
|
|
14
|
-
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
15
14
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
16
15
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
17
16
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::a0cc99967725d4babf6875fef77b6f62>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
var config = {
|
|
8
8
|
plugins: ['@atlaskit/ui-styling-standard', '@atlaskit/design-system'],
|
|
9
9
|
rules: {
|
|
10
|
-
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
11
10
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
12
11
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
13
12
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
@@ -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::856ecaae15d6d75373055852fa8db5f0>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -11,7 +11,6 @@ var config = {
|
|
|
11
11
|
'@atlaskit/design-system': atlaskitDesignSystemPlugin
|
|
12
12
|
},
|
|
13
13
|
rules: {
|
|
14
|
-
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
15
14
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
16
15
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
17
16
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::a0cc99967725d4babf6875fef77b6f62>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
var config = {
|
|
8
8
|
plugins: ['@atlaskit/ui-styling-standard', '@atlaskit/design-system'],
|
|
9
9
|
rules: {
|
|
10
|
-
'@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
|
|
11
10
|
'@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
|
|
12
11
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
13
12
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
@@ -123,8 +123,7 @@ var rule = createLintRule({
|
|
|
123
123
|
name: 'atlaskit-theme',
|
|
124
124
|
docs: {
|
|
125
125
|
description: 'Ban certain usages of `@atlaskit/theme` that `@compiled/react` does not understand',
|
|
126
|
-
|
|
127
|
-
severity: 'error'
|
|
126
|
+
removeFromPresets: true
|
|
128
127
|
},
|
|
129
128
|
messages: {
|
|
130
129
|
usingTypography: 'Typography does not work with Compiled. Please utilise alternatives like Heading or tokens instead and see https://atlassian.design/components/eslint-plugin-ui-styling-standard/atlaskit-theme/usage',
|
|
@@ -178,7 +178,7 @@ var rule = createLintRule({
|
|
|
178
178
|
severity: 'error'
|
|
179
179
|
},
|
|
180
180
|
messages: {
|
|
181
|
-
'enforce-style-prop':
|
|
181
|
+
'enforce-style-prop': "Move static style values into module-scoped cssMap() or css() declarations and apply them with css or xcss; keep only runtime values in style."
|
|
182
182
|
},
|
|
183
183
|
type: 'problem'
|
|
184
184
|
},
|
|
@@ -21,7 +21,7 @@ var rule = createLintRule({
|
|
|
21
21
|
severity: 'error'
|
|
22
22
|
},
|
|
23
23
|
messages: {
|
|
24
|
-
'local-cx-xcss':
|
|
24
|
+
'local-cx-xcss': "Call cx() directly inside the xcss prop, for example xcss={cx(styles.base, active && styles.active)}, instead of storing its result elsewhere."
|
|
25
25
|
},
|
|
26
26
|
type: 'problem'
|
|
27
27
|
},
|
|
@@ -25,7 +25,7 @@ var rule = createLintRule({
|
|
|
25
25
|
severity: 'error'
|
|
26
26
|
},
|
|
27
27
|
messages: {
|
|
28
|
-
'no-array-arguments': "
|
|
28
|
+
'no-array-arguments': "Pass style objects as separate arguments instead of wrapping arguments in an array; delete an empty array argument."
|
|
29
29
|
},
|
|
30
30
|
type: 'problem',
|
|
31
31
|
fixable: 'code',
|
|
@@ -8,7 +8,7 @@ var rule = createLintRule({
|
|
|
8
8
|
severity: 'error'
|
|
9
9
|
},
|
|
10
10
|
messages: {
|
|
11
|
-
'no-atlaskit-theme':
|
|
11
|
+
'no-atlaskit-theme': "Replace @atlaskit/theme imports with semantic token() values from @atlaskit/tokens or the matching ADS component; migrate each imported helper before removing the import."
|
|
12
12
|
},
|
|
13
13
|
type: 'problem'
|
|
14
14
|
},
|
|
@@ -15,7 +15,7 @@ var rule = createLintRule({
|
|
|
15
15
|
severity: 'error'
|
|
16
16
|
},
|
|
17
17
|
messages: {
|
|
18
|
-
'no-classname-prop':
|
|
18
|
+
'no-classname-prop': "Apply local styles through css instead of className. Use supported component props or its bounded xcss interface for component customization."
|
|
19
19
|
},
|
|
20
20
|
type: 'problem'
|
|
21
21
|
},
|
|
@@ -109,11 +109,11 @@ var rule = createLintRule({
|
|
|
109
109
|
severity: 'error'
|
|
110
110
|
},
|
|
111
111
|
messages: {
|
|
112
|
-
'no-container-queries':
|
|
113
|
-
'no-container-style-queries':
|
|
114
|
-
'no-unbound-container-queries':
|
|
115
|
-
'no-mismatched-container-name':
|
|
116
|
-
'no-non-dimension-container-queries':
|
|
112
|
+
'no-container-queries': "Use a named container declared in this file and a width/height condition; type the static query key with satisfies and the default Container import from @atlaskit/css/at-rules/container.",
|
|
113
|
+
'no-container-style-queries': "Replace the style query with an explicit prop and local cssMap variant, or use a width/height-based query when size is the intended condition.",
|
|
114
|
+
'no-unbound-container-queries': "Name the container in the same file and reference it in the query, for example containerName: \"card\" with \"@container card (min-width: 30rem)\".",
|
|
115
|
+
'no-mismatched-container-name': "Use the same container name in this @container query and the containerName declaration in this file; rename the mismatched declaration or query.",
|
|
116
|
+
'no-non-dimension-container-queries': "Use a width/height condition for this named local container. Represent other conditions as explicit props selecting local styles."
|
|
117
117
|
},
|
|
118
118
|
type: 'problem',
|
|
119
119
|
schema: schema
|
|
@@ -27,7 +27,7 @@ var rule = createLintRule({
|
|
|
27
27
|
},
|
|
28
28
|
schema: schema,
|
|
29
29
|
messages: {
|
|
30
|
-
'no-dynamic-styles':
|
|
30
|
+
'no-dynamic-styles': "Declare static variants with cssMap() and select the variant in JSX; pass values known only at runtime through the style prop."
|
|
31
31
|
},
|
|
32
32
|
type: 'problem'
|
|
33
33
|
},
|
|
@@ -23,7 +23,7 @@ var rule = createLintRule({
|
|
|
23
23
|
severity: 'error'
|
|
24
24
|
},
|
|
25
25
|
messages: {
|
|
26
|
-
'no-exported-styles':
|
|
26
|
+
'no-exported-styles': "Keep css, cssMap, keyframes, styled and xcss declarations in the file that uses them. Export a component to share its styling instead of exporting style values."
|
|
27
27
|
},
|
|
28
28
|
type: 'problem',
|
|
29
29
|
schema: schema
|
|
@@ -20,8 +20,8 @@ var rule = createLintRule({
|
|
|
20
20
|
severity: 'error'
|
|
21
21
|
},
|
|
22
22
|
messages: {
|
|
23
|
-
'no-global-styles':
|
|
24
|
-
'no-css-modules':
|
|
23
|
+
'no-global-styles': "Move global declarations into local cssMap() or css() styles on their owning elements. Use @atlaskit/css-reset only for the supported global reset.",
|
|
24
|
+
'no-css-modules': "Replace the CSS-file import with local cssMap() or css() declarations from @atlaskit/css and apply them on the owning elements; preserve the imported styles during migration."
|
|
25
25
|
},
|
|
26
26
|
type: 'problem'
|
|
27
27
|
},
|
|
@@ -12,7 +12,7 @@ var rule = createLintRuleWithTypedConfig({
|
|
|
12
12
|
severity: 'error'
|
|
13
13
|
},
|
|
14
14
|
messages: {
|
|
15
|
-
'no-important-styles':
|
|
15
|
+
'no-important-styles': "Remove !important and apply the intended style directly to the owning element; resolve conflicting declarations through local style composition."
|
|
16
16
|
},
|
|
17
17
|
type: 'problem',
|
|
18
18
|
schema: {
|
|
@@ -116,7 +116,7 @@ var rule = createLintRule({
|
|
|
116
116
|
severity: 'error'
|
|
117
117
|
},
|
|
118
118
|
messages: {
|
|
119
|
-
'no-imported-style-values':
|
|
119
|
+
'no-imported-style-values': "Declare and use these styles in the same file. Share a component across files instead of importing css, cssMap, styled, keyframes or xcss values."
|
|
120
120
|
},
|
|
121
121
|
type: 'problem',
|
|
122
122
|
schema: schema
|
|
@@ -56,7 +56,7 @@ var rule = createLintRuleWithTypedConfig({
|
|
|
56
56
|
severity: 'error'
|
|
57
57
|
},
|
|
58
58
|
messages: {
|
|
59
|
-
'no-nested-selectors':
|
|
59
|
+
'no-nested-selectors': "Apply local styles directly to the child element instead of selecting it through a parent or external context; pass explicit props for conditional variants."
|
|
60
60
|
},
|
|
61
61
|
type: 'problem',
|
|
62
62
|
schema: {
|
|
@@ -10,7 +10,7 @@ var rule = createLintRule({
|
|
|
10
10
|
severity: 'error'
|
|
11
11
|
},
|
|
12
12
|
messages: {
|
|
13
|
-
'no-styled': "
|
|
13
|
+
'no-styled': "Replace styled with module-scoped cssMap() or css() from @atlaskit/css and apply styles on the element; pass runtime-only values through style."
|
|
14
14
|
},
|
|
15
15
|
type: 'problem'
|
|
16
16
|
},
|
|
@@ -95,23 +95,23 @@ var rule = createLintRuleWithTypedConfig({
|
|
|
95
95
|
/**
|
|
96
96
|
* Selector messages
|
|
97
97
|
*/
|
|
98
|
-
'no-ambiguous-pseudos':
|
|
99
|
-
'no-increased-specificity':
|
|
100
|
-
'no-restricted-pseudos':
|
|
101
|
-
'no-legacy-pseudo-element-syntax':
|
|
102
|
-
'no-unparsable-selectors': "The selector '{{selectorText}}' could not be parsed
|
|
103
|
-
'no-selectors-object':
|
|
98
|
+
'no-ambiguous-pseudos': "Prefix the pseudo-selector with & when it targets this element (for example &:hover); apply descendant styles directly to the child instead.",
|
|
99
|
+
'no-increased-specificity': "Replace chained nesting selectors such as && with one & selector, then resolve competing styles through local composition.",
|
|
100
|
+
'no-restricted-pseudos': "The {{pseudo}} pseudo-selector is unsupported. Use an allowed local pseudo such as &:hover, or pass explicit state as a prop and select a local cssMap variant.",
|
|
101
|
+
'no-legacy-pseudo-element-syntax': "Use a double colon for pseudo-elements, for example &::before or &::after, instead of the legacy single-colon syntax.",
|
|
102
|
+
'no-unparsable-selectors': "The selector '{{selectorText}}' could not be parsed. Correct its CSS syntax; if it is valid, report the selector and reproduction to #help-ui-styling-standard.",
|
|
103
|
+
'no-selectors-object': "Move selectors out of the selectors object into supported local style keys; apply child styles directly to each child element.",
|
|
104
104
|
/**
|
|
105
105
|
* At-rule messages
|
|
106
106
|
*/
|
|
107
|
-
'no-keyframes-at-rules':
|
|
108
|
-
'no-restricted-at-rules':
|
|
109
|
-
'no-grouped-at-rules':
|
|
110
|
-
'no-noncanonical-media-query':
|
|
107
|
+
'no-keyframes-at-rules': "Replace the @keyframes at-rule with keyframes() from @compiled/react and reference its result through animationName.",
|
|
108
|
+
'no-restricted-at-rules': "{{atRule}} is unsupported. Use a supported @media, @supports or @property rule; for runtime conditions select a local style variant in JavaScript.",
|
|
109
|
+
'no-grouped-at-rules': "Flatten grouped at-rules into complete keys, for example \"@media (min-width: 48rem)\" instead of an \"@media\" object containing conditions.",
|
|
110
|
+
'no-noncanonical-media-query': "Match the literal query to its imported @atlaskit/css/at-rules type, including the exact breakpoint, units and comparison operator.",
|
|
111
111
|
/**
|
|
112
112
|
* Suggestion messages
|
|
113
113
|
*/
|
|
114
|
-
'insert-nesting-selector':
|
|
114
|
+
'insert-nesting-selector': "Insert & before this pseudo-selector to target the element itself, for example &:hover."
|
|
115
115
|
},
|
|
116
116
|
schema: {
|
|
117
117
|
type: 'object',
|
|
@@ -71,7 +71,7 @@ var rule = createLintRule({
|
|
|
71
71
|
severity: 'warn'
|
|
72
72
|
},
|
|
73
73
|
messages: {
|
|
74
|
-
'unused-property':
|
|
74
|
+
'unused-property': "The \"{{propertyName}}\" style is never used. Remove it from cssMap, or apply it to the intended element if the style is still required."
|
|
75
75
|
},
|
|
76
76
|
type: 'problem'
|
|
77
77
|
},
|
|
@@ -53,7 +53,7 @@ var rule = createLintRule({
|
|
|
53
53
|
severity: 'error'
|
|
54
54
|
},
|
|
55
55
|
messages: {
|
|
56
|
-
'use-compiled': "
|
|
56
|
+
'use-compiled': "Migrate '{{importSource}}' styling to @atlaskit/css or @compiled/react, updating imports and usages together. Verify the component rather than mixing styling engines on it."
|
|
57
57
|
},
|
|
58
58
|
schema: schema
|
|
59
59
|
},
|
|
@@ -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::856ecaae15d6d75373055852fa8db5f0>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { Linter } from 'eslint';
|
|
@@ -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::a0cc99967725d4babf6875fef77b6f62>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { ESLint } from 'eslint';
|
|
@@ -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::856ecaae15d6d75373055852fa8db5f0>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { Linter } from 'eslint';
|
|
@@ -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::a0cc99967725d4babf6875fef77b6f62>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { ESLint } from 'eslint';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/eslint-plugin-ui-styling-standard",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
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",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"atlaskit:src": "src/index.tsx",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/eslint-plugin-design-system": "^16.
|
|
31
|
+
"@atlaskit/eslint-plugin-design-system": "^16.14.0",
|
|
32
32
|
"@atlaskit/eslint-utils": "^3.1.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0",
|
|
34
34
|
"@typescript-eslint/utils": "^8.64.0",
|