@atlaskit/eslint-plugin-ui-styling-standard 2.1.10 → 2.2.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 +8 -0
- package/README.md +1 -0
- package/dist/cjs/presets/all-flat.codegen.js +2 -1
- package/dist/cjs/presets/all.codegen.js +2 -1
- package/dist/cjs/presets/recommended-flat.codegen.js +2 -1
- package/dist/cjs/presets/recommended.codegen.js +2 -1
- package/dist/cjs/rules/index.codegen.js +3 -1
- package/dist/cjs/rules/no-atlaskit-theme/index.js +34 -0
- package/dist/es2019/presets/all-flat.codegen.js +2 -1
- package/dist/es2019/presets/all.codegen.js +2 -1
- package/dist/es2019/presets/recommended-flat.codegen.js +2 -1
- package/dist/es2019/presets/recommended.codegen.js +2 -1
- package/dist/es2019/rules/index.codegen.js +3 -1
- package/dist/es2019/rules/no-atlaskit-theme/index.js +28 -0
- package/dist/esm/presets/all-flat.codegen.js +2 -1
- package/dist/esm/presets/all.codegen.js +2 -1
- package/dist/esm/presets/recommended-flat.codegen.js +2 -1
- package/dist/esm/presets/recommended.codegen.js +2 -1
- package/dist/esm/rules/index.codegen.js +3 -1
- package/dist/esm/rules/no-atlaskit-theme/index.js +28 -0
- 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/dist/types/rules/index.codegen.d.ts +1 -1
- package/dist/types/rules/no-atlaskit-theme/index.d.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/eslint-plugin-ui-styling-standard
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a5d06059c9ac7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a5d06059c9ac7) -
|
|
8
|
+
Add the no-atlaskit-theme lint rule and enable it as a warning in the recommended config. Imports
|
|
9
|
+
from @atlaskit/theme are flagged without failing lint.
|
|
10
|
+
|
|
3
11
|
## 2.1.10
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -47,6 +47,7 @@ module.exports = {
|
|
|
47
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
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
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 | | |
|
|
50
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 | | |
|
|
51
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 | | |
|
|
52
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 | | |
|
|
@@ -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::7f3972a0198dc6de5194e21d5f32c3b0>>
|
|
13
13
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
14
14
|
*/
|
|
15
15
|
|
|
@@ -24,6 +24,7 @@ var config = {
|
|
|
24
24
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
25
25
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
26
26
|
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
27
|
+
'@atlaskit/ui-styling-standard/no-atlaskit-theme': 'warn',
|
|
27
28
|
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
28
29
|
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
29
30
|
'@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
|
|
@@ -6,7 +6,7 @@ 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::138a044301c208ca5eecc78433523b0b>>
|
|
10
10
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
11
11
|
*/
|
|
12
12
|
|
|
@@ -18,6 +18,7 @@ var config = {
|
|
|
18
18
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
19
19
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
20
20
|
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
21
|
+
'@atlaskit/ui-styling-standard/no-atlaskit-theme': 'warn',
|
|
21
22
|
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
22
23
|
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
23
24
|
'@atlaskit/ui-styling-standard/no-dynamic-styles': '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::7f3972a0198dc6de5194e21d5f32c3b0>>
|
|
13
13
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
14
14
|
*/
|
|
15
15
|
|
|
@@ -24,6 +24,7 @@ var config = {
|
|
|
24
24
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
25
25
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
26
26
|
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
27
|
+
'@atlaskit/ui-styling-standard/no-atlaskit-theme': 'warn',
|
|
27
28
|
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
28
29
|
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
29
30
|
'@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
|
|
@@ -6,7 +6,7 @@ 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::138a044301c208ca5eecc78433523b0b>>
|
|
10
10
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
11
11
|
*/
|
|
12
12
|
|
|
@@ -18,6 +18,7 @@ var config = {
|
|
|
18
18
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
19
19
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
20
20
|
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
21
|
+
'@atlaskit/ui-styling-standard/no-atlaskit-theme': 'warn',
|
|
21
22
|
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
22
23
|
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
23
24
|
'@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
|
|
@@ -10,6 +10,7 @@ var _convertPropsSyntax = _interopRequireDefault(require("./convert-props-syntax
|
|
|
10
10
|
var _enforceStyleProp = _interopRequireDefault(require("./enforce-style-prop"));
|
|
11
11
|
var _localCxXcss = _interopRequireDefault(require("./local-cx-xcss"));
|
|
12
12
|
var _noArrayArguments = _interopRequireDefault(require("./no-array-arguments"));
|
|
13
|
+
var _noAtlaskitTheme = _interopRequireDefault(require("./no-atlaskit-theme"));
|
|
13
14
|
var _noClassnameProp = _interopRequireDefault(require("./no-classname-prop"));
|
|
14
15
|
var _noContainerQueries = _interopRequireDefault(require("./no-container-queries"));
|
|
15
16
|
var _noDynamicStyles = _interopRequireDefault(require("./no-dynamic-styles"));
|
|
@@ -25,7 +26,7 @@ var _noUnusedCssmapProperties = _interopRequireDefault(require("./no-unused-cssm
|
|
|
25
26
|
var _useCompiled = _interopRequireDefault(require("./use-compiled"));
|
|
26
27
|
/**
|
|
27
28
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
28
|
-
* @codegen <<SignedSource::
|
|
29
|
+
* @codegen <<SignedSource::094f8a058153c7e839c5d98d2718ca4e>>
|
|
29
30
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
30
31
|
*/
|
|
31
32
|
|
|
@@ -35,6 +36,7 @@ var rules = exports.rules = {
|
|
|
35
36
|
'enforce-style-prop': _enforceStyleProp.default,
|
|
36
37
|
'local-cx-xcss': _localCxXcss.default,
|
|
37
38
|
'no-array-arguments': _noArrayArguments.default,
|
|
39
|
+
'no-atlaskit-theme': _noAtlaskitTheme.default,
|
|
38
40
|
'no-classname-prop': _noClassnameProp.default,
|
|
39
41
|
'no-container-queries': _noContainerQueries.default,
|
|
40
42
|
'no-dynamic-styles': _noDynamicStyles.default,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _createRule = require("../utils/create-rule");
|
|
8
|
+
var rule = (0, _createRule.createLintRule)({
|
|
9
|
+
meta: {
|
|
10
|
+
name: 'no-atlaskit-theme',
|
|
11
|
+
docs: {
|
|
12
|
+
description: 'Disallow imports from `@atlaskit/theme`',
|
|
13
|
+
recommended: true,
|
|
14
|
+
severity: 'warn'
|
|
15
|
+
},
|
|
16
|
+
messages: {
|
|
17
|
+
'no-atlaskit-theme': 'Do not import `@atlaskit/theme`. Use `@atlaskit/tokens` or Atlassian Design System components instead.'
|
|
18
|
+
},
|
|
19
|
+
type: 'problem'
|
|
20
|
+
},
|
|
21
|
+
create: function create(context) {
|
|
22
|
+
return {
|
|
23
|
+
// esquery regexes cannot contain a raw `/`, so the path separator is `\x2F`.
|
|
24
|
+
// Unanchored at the end, so this matches `@atlaskit/theme` and any subpath.
|
|
25
|
+
'ImportDeclaration[source.value=/^@atlaskit\\x2Ftheme(\\x2F|$)/]': function ImportDeclarationSourceValue_AtlaskitX2FthemeX2F$_(node) {
|
|
26
|
+
context.report({
|
|
27
|
+
node: node,
|
|
28
|
+
messageId: 'no-atlaskit-theme'
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
var _default = exports.default = rule;
|
|
@@ -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::7f3972a0198dc6de5194e21d5f32c3b0>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -16,6 +16,7 @@ const config = {
|
|
|
16
16
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
17
17
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
18
18
|
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
19
|
+
'@atlaskit/ui-styling-standard/no-atlaskit-theme': 'warn',
|
|
19
20
|
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
20
21
|
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
21
22
|
'@atlaskit/ui-styling-standard/no-dynamic-styles': '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::138a044301c208ca5eecc78433523b0b>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -12,6 +12,7 @@ const config = {
|
|
|
12
12
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
13
13
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
14
14
|
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
15
|
+
'@atlaskit/ui-styling-standard/no-atlaskit-theme': 'warn',
|
|
15
16
|
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
16
17
|
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
17
18
|
'@atlaskit/ui-styling-standard/no-dynamic-styles': '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::7f3972a0198dc6de5194e21d5f32c3b0>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -16,6 +16,7 @@ const config = {
|
|
|
16
16
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
17
17
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
18
18
|
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
19
|
+
'@atlaskit/ui-styling-standard/no-atlaskit-theme': 'warn',
|
|
19
20
|
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
20
21
|
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
21
22
|
'@atlaskit/ui-styling-standard/no-dynamic-styles': '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::138a044301c208ca5eecc78433523b0b>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -12,6 +12,7 @@ const config = {
|
|
|
12
12
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
13
13
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
14
14
|
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
15
|
+
'@atlaskit/ui-styling-standard/no-atlaskit-theme': 'warn',
|
|
15
16
|
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
16
17
|
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
17
18
|
'@atlaskit/ui-styling-standard/no-dynamic-styles': '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::094f8a058153c7e839c5d98d2718ca4e>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -9,6 +9,7 @@ import convertPropsSyntax from './convert-props-syntax';
|
|
|
9
9
|
import enforceStyleProp from './enforce-style-prop';
|
|
10
10
|
import localCxXcss from './local-cx-xcss';
|
|
11
11
|
import noArrayArguments from './no-array-arguments';
|
|
12
|
+
import noAtlaskitTheme from './no-atlaskit-theme';
|
|
12
13
|
import noClassnameProp from './no-classname-prop';
|
|
13
14
|
import noContainerQueries from './no-container-queries';
|
|
14
15
|
import noDynamicStyles from './no-dynamic-styles';
|
|
@@ -28,6 +29,7 @@ export const rules = {
|
|
|
28
29
|
'enforce-style-prop': enforceStyleProp,
|
|
29
30
|
'local-cx-xcss': localCxXcss,
|
|
30
31
|
'no-array-arguments': noArrayArguments,
|
|
32
|
+
'no-atlaskit-theme': noAtlaskitTheme,
|
|
31
33
|
'no-classname-prop': noClassnameProp,
|
|
32
34
|
'no-container-queries': noContainerQueries,
|
|
33
35
|
'no-dynamic-styles': noDynamicStyles,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createLintRule } from '../utils/create-rule';
|
|
2
|
+
const rule = createLintRule({
|
|
3
|
+
meta: {
|
|
4
|
+
name: 'no-atlaskit-theme',
|
|
5
|
+
docs: {
|
|
6
|
+
description: 'Disallow imports from `@atlaskit/theme`',
|
|
7
|
+
recommended: true,
|
|
8
|
+
severity: 'warn'
|
|
9
|
+
},
|
|
10
|
+
messages: {
|
|
11
|
+
'no-atlaskit-theme': 'Do not import `@atlaskit/theme`. Use `@atlaskit/tokens` or Atlassian Design System components instead.'
|
|
12
|
+
},
|
|
13
|
+
type: 'problem'
|
|
14
|
+
},
|
|
15
|
+
create(context) {
|
|
16
|
+
return {
|
|
17
|
+
// esquery regexes cannot contain a raw `/`, so the path separator is `\x2F`.
|
|
18
|
+
// Unanchored at the end, so this matches `@atlaskit/theme` and any subpath.
|
|
19
|
+
'ImportDeclaration[source.value=/^@atlaskit\\x2Ftheme(\\x2F|$)/]'(node) {
|
|
20
|
+
context.report({
|
|
21
|
+
node,
|
|
22
|
+
messageId: 'no-atlaskit-theme'
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export default rule;
|
|
@@ -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::7f3972a0198dc6de5194e21d5f32c3b0>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -16,6 +16,7 @@ var config = {
|
|
|
16
16
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
17
17
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
18
18
|
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
19
|
+
'@atlaskit/ui-styling-standard/no-atlaskit-theme': 'warn',
|
|
19
20
|
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
20
21
|
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
21
22
|
'@atlaskit/ui-styling-standard/no-dynamic-styles': '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::138a044301c208ca5eecc78433523b0b>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -12,6 +12,7 @@ var config = {
|
|
|
12
12
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
13
13
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
14
14
|
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
15
|
+
'@atlaskit/ui-styling-standard/no-atlaskit-theme': 'warn',
|
|
15
16
|
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
16
17
|
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
17
18
|
'@atlaskit/ui-styling-standard/no-dynamic-styles': '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::7f3972a0198dc6de5194e21d5f32c3b0>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -16,6 +16,7 @@ var config = {
|
|
|
16
16
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
17
17
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
18
18
|
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
19
|
+
'@atlaskit/ui-styling-standard/no-atlaskit-theme': 'warn',
|
|
19
20
|
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
20
21
|
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
21
22
|
'@atlaskit/ui-styling-standard/no-dynamic-styles': '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::138a044301c208ca5eecc78433523b0b>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -12,6 +12,7 @@ var config = {
|
|
|
12
12
|
'@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
|
|
13
13
|
'@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
|
|
14
14
|
'@atlaskit/ui-styling-standard/no-array-arguments': 'error',
|
|
15
|
+
'@atlaskit/ui-styling-standard/no-atlaskit-theme': 'warn',
|
|
15
16
|
'@atlaskit/ui-styling-standard/no-classname-prop': 'error',
|
|
16
17
|
'@atlaskit/ui-styling-standard/no-container-queries': 'error',
|
|
17
18
|
'@atlaskit/ui-styling-standard/no-dynamic-styles': '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::094f8a058153c7e839c5d98d2718ca4e>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -9,6 +9,7 @@ import convertPropsSyntax from './convert-props-syntax';
|
|
|
9
9
|
import enforceStyleProp from './enforce-style-prop';
|
|
10
10
|
import localCxXcss from './local-cx-xcss';
|
|
11
11
|
import noArrayArguments from './no-array-arguments';
|
|
12
|
+
import noAtlaskitTheme from './no-atlaskit-theme';
|
|
12
13
|
import noClassnameProp from './no-classname-prop';
|
|
13
14
|
import noContainerQueries from './no-container-queries';
|
|
14
15
|
import noDynamicStyles from './no-dynamic-styles';
|
|
@@ -28,6 +29,7 @@ export var rules = {
|
|
|
28
29
|
'enforce-style-prop': enforceStyleProp,
|
|
29
30
|
'local-cx-xcss': localCxXcss,
|
|
30
31
|
'no-array-arguments': noArrayArguments,
|
|
32
|
+
'no-atlaskit-theme': noAtlaskitTheme,
|
|
31
33
|
'no-classname-prop': noClassnameProp,
|
|
32
34
|
'no-container-queries': noContainerQueries,
|
|
33
35
|
'no-dynamic-styles': noDynamicStyles,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createLintRule } from '../utils/create-rule';
|
|
2
|
+
var rule = createLintRule({
|
|
3
|
+
meta: {
|
|
4
|
+
name: 'no-atlaskit-theme',
|
|
5
|
+
docs: {
|
|
6
|
+
description: 'Disallow imports from `@atlaskit/theme`',
|
|
7
|
+
recommended: true,
|
|
8
|
+
severity: 'warn'
|
|
9
|
+
},
|
|
10
|
+
messages: {
|
|
11
|
+
'no-atlaskit-theme': 'Do not import `@atlaskit/theme`. Use `@atlaskit/tokens` or Atlassian Design System components instead.'
|
|
12
|
+
},
|
|
13
|
+
type: 'problem'
|
|
14
|
+
},
|
|
15
|
+
create: function create(context) {
|
|
16
|
+
return {
|
|
17
|
+
// esquery regexes cannot contain a raw `/`, so the path separator is `\x2F`.
|
|
18
|
+
// Unanchored at the end, so this matches `@atlaskit/theme` and any subpath.
|
|
19
|
+
'ImportDeclaration[source.value=/^@atlaskit\\x2Ftheme(\\x2F|$)/]': function ImportDeclarationSourceValue_AtlaskitX2FthemeX2F$_(node) {
|
|
20
|
+
context.report({
|
|
21
|
+
node: node,
|
|
22
|
+
messageId: 'no-atlaskit-theme'
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export default rule;
|
|
@@ -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::7f3972a0198dc6de5194e21d5f32c3b0>>
|
|
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::138a044301c208ca5eecc78433523b0b>>
|
|
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::7f3972a0198dc6de5194e21d5f32c3b0>>
|
|
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::138a044301c208ca5eecc78433523b0b>>
|
|
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::094f8a058153c7e839c5d98d2718ca4e>>
|
|
4
4
|
* @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
|
|
5
5
|
*/
|
|
6
6
|
import type { Rule } from 'eslint';
|
package/package.json
CHANGED