@atlaskit/eslint-plugin-ui-styling-standard 0.11.0 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +2 -0
  3. package/constellation/index/overview.mdx +2 -0
  4. package/constellation/no-exported-styles/usage.mdx +87 -0
  5. package/constellation/no-imported-style-values/usage.mdx +146 -0
  6. package/dist/cjs/presets/all.codegen.js +3 -1
  7. package/dist/cjs/presets/recommended.codegen.js +3 -1
  8. package/dist/cjs/rules/index.codegen.js +5 -1
  9. package/dist/cjs/rules/no-exported-styles/index.js +39 -0
  10. package/dist/cjs/rules/no-imported-style-values/index.js +145 -0
  11. package/dist/es2019/presets/all.codegen.js +3 -1
  12. package/dist/es2019/presets/recommended.codegen.js +3 -1
  13. package/dist/es2019/rules/index.codegen.js +5 -1
  14. package/dist/es2019/rules/no-exported-styles/index.js +33 -0
  15. package/dist/es2019/rules/no-imported-style-values/index.js +125 -0
  16. package/dist/esm/presets/all.codegen.js +3 -1
  17. package/dist/esm/presets/recommended.codegen.js +3 -1
  18. package/dist/esm/rules/index.codegen.js +5 -1
  19. package/dist/esm/rules/no-exported-styles/index.js +33 -0
  20. package/dist/esm/rules/no-imported-style-values/index.js +138 -0
  21. package/dist/types/index.codegen.d.ts +4 -0
  22. package/dist/types/presets/all.codegen.d.ts +3 -1
  23. package/dist/types/presets/recommended.codegen.d.ts +3 -1
  24. package/dist/types/rules/index.codegen.d.ts +2 -0
  25. package/dist/types/rules/no-exported-styles/index.d.ts +2 -0
  26. package/dist/types/rules/no-imported-style-values/index.d.ts +3 -0
  27. package/dist/types-ts4.5/index.codegen.d.ts +4 -0
  28. package/dist/types-ts4.5/presets/all.codegen.d.ts +3 -1
  29. package/dist/types-ts4.5/presets/recommended.codegen.d.ts +3 -1
  30. package/dist/types-ts4.5/rules/index.codegen.d.ts +2 -0
  31. package/dist/types-ts4.5/rules/no-exported-styles/index.d.ts +2 -0
  32. package/dist/types-ts4.5/rules/no-imported-style-values/index.d.ts +3 -0
  33. package/package.json +2 -2
  34. package/src/presets/all.codegen.tsx +3 -1
  35. package/src/presets/recommended.codegen.tsx +3 -1
  36. package/src/rules/index.codegen.tsx +5 -1
  37. package/src/rules/no-exported-styles/README.md +85 -0
  38. package/src/rules/no-exported-styles/__tests__/rule.test.tsx +225 -0
  39. package/src/rules/no-exported-styles/index.tsx +52 -0
  40. package/src/rules/no-imported-style-values/README.md +144 -0
  41. package/src/rules/no-imported-style-values/__tests__/rule.test.tsx +265 -0
  42. package/src/rules/no-imported-style-values/index.tsx +154 -0
@@ -0,0 +1,125 @@
1
+ import { createLintRule } from '../utils/create-rule';
2
+ import { getImportSources, hasStyleObjectArguments } from '@atlaskit/eslint-utils/is-supported-import';
3
+ import { findVariable } from '@atlaskit/eslint-utils/find-variable';
4
+ import { getAllowedDynamicKeys, getAllowedFunctionCalls, isAllowListedVariable } from '@atlaskit/eslint-utils/allowed-function-calls';
5
+ import esquery from 'esquery';
6
+ const schema = [{
7
+ type: 'object',
8
+ properties: {
9
+ importSources: {
10
+ type: 'array',
11
+ items: {
12
+ type: 'string'
13
+ },
14
+ uniqueItems: true
15
+ },
16
+ allowedFunctionCalls: {
17
+ type: 'array',
18
+ items: {
19
+ type: 'array',
20
+ minItems: 2,
21
+ maxItems: 2,
22
+ items: [{
23
+ type: 'string'
24
+ }, {
25
+ type: 'string'
26
+ }]
27
+ },
28
+ uniqueItems: true
29
+ },
30
+ allowedDynamicKeys: {
31
+ type: 'array',
32
+ items: {
33
+ type: 'array',
34
+ minItems: 2,
35
+ maxItems: 2,
36
+ items: [{
37
+ type: 'string'
38
+ }, {
39
+ type: 'string'
40
+ }]
41
+ },
42
+ uniqueItems: true
43
+ }
44
+ }
45
+ }];
46
+ const isIdentifierImported = (identifier, context, functionAllowList, keysAllowList) => {
47
+ const variable = findVariable({
48
+ identifier: identifier,
49
+ sourceCode: context.sourceCode
50
+ });
51
+ if (!variable) {
52
+ return false;
53
+ }
54
+ const isImported = variable.defs.some(definition => definition.type === 'ImportBinding');
55
+
56
+ // check if imported variable is allowed
57
+ return isImported && !isAllowListedVariable({
58
+ allowList: functionAllowList,
59
+ variable
60
+ }) && !isAllowListedVariable({
61
+ allowList: keysAllowList,
62
+ variable
63
+ });
64
+ };
65
+ const checkIdentifier = (identifier, context, functionAllowList, keysAllowList) => {
66
+ if (isIdentifierImported(identifier, context, functionAllowList, keysAllowList)) {
67
+ context.report({
68
+ node: identifier,
69
+ messageId: 'no-imported-style-values'
70
+ });
71
+ }
72
+ };
73
+ export const rule = createLintRule({
74
+ meta: {
75
+ name: 'no-imported-style-values',
76
+ docs: {
77
+ description: 'Disallows imports of style values',
78
+ recommended: true,
79
+ severity: 'warn'
80
+ },
81
+ messages: {
82
+ 'no-imported-style-values': 'Styles should not be imported to use in css, cssMap, styled, keyframes or xcss calls. All styles should be defined and used in the same file instead.'
83
+ },
84
+ type: 'problem',
85
+ schema
86
+ },
87
+ create(context) {
88
+ const importSources = getImportSources(context);
89
+ const functionAllowList = getAllowedFunctionCalls(context.options);
90
+ const keysAllowList = getAllowedDynamicKeys(context.options);
91
+ const checkForIdentifiers = node => {
92
+ const matches = esquery(node, 'Identifier');
93
+ for (const match of matches) {
94
+ if (match.type === 'Identifier') {
95
+ checkIdentifier(match, context, functionAllowList, keysAllowList);
96
+ }
97
+ }
98
+ };
99
+ return {
100
+ // Checking css/cssMap/keyframes/styled/xcss calls
101
+ CallExpression(node) {
102
+ const {
103
+ references
104
+ } = context.sourceCode.getScope(node.callee);
105
+ if (!hasStyleObjectArguments(node.callee, references, importSources)) {
106
+ return;
107
+ }
108
+ node.arguments.forEach(checkForIdentifiers);
109
+ },
110
+ 'JSXAttribute[name.name="css"] Identifier': node => {
111
+ if (node.type !== 'Identifier') {
112
+ return;
113
+ }
114
+ checkIdentifier(node, context, functionAllowList, keysAllowList);
115
+ },
116
+ 'JSXAttribute[name.name="style"] Identifier': node => {
117
+ if (node.type !== 'Identifier') {
118
+ return;
119
+ }
120
+ checkIdentifier(node, context, functionAllowList, keysAllowList);
121
+ }
122
+ };
123
+ }
124
+ });
125
+ 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::544c8b1c0eb0d6329064dcf92e18e45e>>
3
+ * @codegen <<SignedSource::96336e6094dbcbf456aaef313b624fbf>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -13,7 +13,9 @@ export default {
13
13
  '@atlaskit/ui-styling-standard/no-classname-prop': 'warn',
14
14
  '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
15
15
  '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
16
+ '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
16
17
  '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
18
+ '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
17
19
  '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
18
20
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
19
21
  '@atlaskit/design-system/consistent-css-prop-usage': ['warn', {
@@ -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::544c8b1c0eb0d6329064dcf92e18e45e>>
3
+ * @codegen <<SignedSource::96336e6094dbcbf456aaef313b624fbf>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -13,7 +13,9 @@ export default {
13
13
  '@atlaskit/ui-styling-standard/no-classname-prop': 'warn',
14
14
  '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
15
15
  '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
16
+ '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
16
17
  '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
18
+ '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
17
19
  '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
18
20
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
19
21
  '@atlaskit/design-system/consistent-css-prop-usage': ['warn', {
@@ -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::edaedcad824fed1e108f90d909287584>>
3
+ * @codegen <<SignedSource::648acb81f0f43d8ce56f7d6c22db8856>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  import convertPropsSyntax from './convert-props-syntax';
@@ -10,7 +10,9 @@ import noArrayArguments from './no-array-arguments';
10
10
  import noClassnameProp from './no-classname-prop';
11
11
  import noContainerQueries from './no-container-queries';
12
12
  import noDynamicStyles from './no-dynamic-styles';
13
+ import noExportedStyles from './no-exported-styles';
13
14
  import noImportantStyles from './no-important-styles';
15
+ import noImportedStyleValues from './no-imported-style-values';
14
16
  import noNestedSelectors from './no-nested-selectors';
15
17
  import noUnsafeValues from './no-unsafe-values';
16
18
  export default {
@@ -21,7 +23,9 @@ export default {
21
23
  'no-classname-prop': noClassnameProp,
22
24
  'no-container-queries': noContainerQueries,
23
25
  'no-dynamic-styles': noDynamicStyles,
26
+ 'no-exported-styles': noExportedStyles,
24
27
  'no-important-styles': noImportantStyles,
28
+ 'no-imported-style-values': noImportedStyleValues,
25
29
  'no-nested-selectors': noNestedSelectors,
26
30
  'no-unsafe-values': noUnsafeValues
27
31
  };
@@ -0,0 +1,33 @@
1
+ import { createLintRule } from '../utils/create-rule';
2
+ import { isCss, isStyled, isKeyframes, isCssMap, isXcss } from '@atlaskit/eslint-utils/is-supported-import';
3
+ import { createNoExportedRule } from '@atlaskit/eslint-utils/create-no-exported-rule';
4
+ var schema = [{
5
+ type: 'object',
6
+ properties: {
7
+ importSources: {
8
+ type: 'array',
9
+ items: {
10
+ type: 'string'
11
+ },
12
+ uniqueItems: true
13
+ }
14
+ }
15
+ }];
16
+ var supportedImports = [isCss, isCssMap, isKeyframes, isXcss, isStyled];
17
+ export var rule = createLintRule({
18
+ meta: {
19
+ name: 'no-exported-styles',
20
+ docs: {
21
+ description: 'Disallows exports of css, keyframes, styled and xcss',
22
+ recommended: true,
23
+ severity: 'warn'
24
+ },
25
+ messages: {
26
+ 'no-exported-styles': 'Styles from css, cssMap, keyframes, styled and xcss should not be exported. All styles should be defined and used in the same file instead.'
27
+ },
28
+ type: 'problem',
29
+ schema: schema
30
+ },
31
+ create: createNoExportedRule(supportedImports, 'no-exported-styles')
32
+ });
33
+ export default rule;
@@ -0,0 +1,138 @@
1
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4
+ import { createLintRule } from '../utils/create-rule';
5
+ import { getImportSources, hasStyleObjectArguments } from '@atlaskit/eslint-utils/is-supported-import';
6
+ import { findVariable } from '@atlaskit/eslint-utils/find-variable';
7
+ import { getAllowedDynamicKeys, getAllowedFunctionCalls, isAllowListedVariable } from '@atlaskit/eslint-utils/allowed-function-calls';
8
+ import esquery from 'esquery';
9
+ var schema = [{
10
+ type: 'object',
11
+ properties: {
12
+ importSources: {
13
+ type: 'array',
14
+ items: {
15
+ type: 'string'
16
+ },
17
+ uniqueItems: true
18
+ },
19
+ allowedFunctionCalls: {
20
+ type: 'array',
21
+ items: {
22
+ type: 'array',
23
+ minItems: 2,
24
+ maxItems: 2,
25
+ items: [{
26
+ type: 'string'
27
+ }, {
28
+ type: 'string'
29
+ }]
30
+ },
31
+ uniqueItems: true
32
+ },
33
+ allowedDynamicKeys: {
34
+ type: 'array',
35
+ items: {
36
+ type: 'array',
37
+ minItems: 2,
38
+ maxItems: 2,
39
+ items: [{
40
+ type: 'string'
41
+ }, {
42
+ type: 'string'
43
+ }]
44
+ },
45
+ uniqueItems: true
46
+ }
47
+ }
48
+ }];
49
+ var isIdentifierImported = function isIdentifierImported(identifier, context, functionAllowList, keysAllowList) {
50
+ var variable = findVariable({
51
+ identifier: identifier,
52
+ sourceCode: context.sourceCode
53
+ });
54
+ if (!variable) {
55
+ return false;
56
+ }
57
+ var isImported = variable.defs.some(function (definition) {
58
+ return definition.type === 'ImportBinding';
59
+ });
60
+
61
+ // check if imported variable is allowed
62
+ return isImported && !isAllowListedVariable({
63
+ allowList: functionAllowList,
64
+ variable: variable
65
+ }) && !isAllowListedVariable({
66
+ allowList: keysAllowList,
67
+ variable: variable
68
+ });
69
+ };
70
+ var checkIdentifier = function checkIdentifier(identifier, context, functionAllowList, keysAllowList) {
71
+ if (isIdentifierImported(identifier, context, functionAllowList, keysAllowList)) {
72
+ context.report({
73
+ node: identifier,
74
+ messageId: 'no-imported-style-values'
75
+ });
76
+ }
77
+ };
78
+ export var rule = createLintRule({
79
+ meta: {
80
+ name: 'no-imported-style-values',
81
+ docs: {
82
+ description: 'Disallows imports of style values',
83
+ recommended: true,
84
+ severity: 'warn'
85
+ },
86
+ messages: {
87
+ 'no-imported-style-values': 'Styles should not be imported to use in css, cssMap, styled, keyframes or xcss calls. All styles should be defined and used in the same file instead.'
88
+ },
89
+ type: 'problem',
90
+ schema: schema
91
+ },
92
+ create: function create(context) {
93
+ var importSources = getImportSources(context);
94
+ var functionAllowList = getAllowedFunctionCalls(context.options);
95
+ var keysAllowList = getAllowedDynamicKeys(context.options);
96
+ var checkForIdentifiers = function checkForIdentifiers(node) {
97
+ var matches = esquery(node, 'Identifier');
98
+ var _iterator = _createForOfIteratorHelper(matches),
99
+ _step;
100
+ try {
101
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
102
+ var match = _step.value;
103
+ if (match.type === 'Identifier') {
104
+ checkIdentifier(match, context, functionAllowList, keysAllowList);
105
+ }
106
+ }
107
+ } catch (err) {
108
+ _iterator.e(err);
109
+ } finally {
110
+ _iterator.f();
111
+ }
112
+ };
113
+ return {
114
+ // Checking css/cssMap/keyframes/styled/xcss calls
115
+ CallExpression: function CallExpression(node) {
116
+ var _context$sourceCode$g = context.sourceCode.getScope(node.callee),
117
+ references = _context$sourceCode$g.references;
118
+ if (!hasStyleObjectArguments(node.callee, references, importSources)) {
119
+ return;
120
+ }
121
+ node.arguments.forEach(checkForIdentifiers);
122
+ },
123
+ 'JSXAttribute[name.name="css"] Identifier': function JSXAttributeNameNameCssIdentifier(node) {
124
+ if (node.type !== 'Identifier') {
125
+ return;
126
+ }
127
+ checkIdentifier(node, context, functionAllowList, keysAllowList);
128
+ },
129
+ 'JSXAttribute[name.name="style"] Identifier': function JSXAttributeNameNameStyleIdentifier(node) {
130
+ if (node.type !== 'Identifier') {
131
+ return;
132
+ }
133
+ checkIdentifier(node, context, functionAllowList, keysAllowList);
134
+ }
135
+ };
136
+ }
137
+ });
138
+ export default rule;
@@ -10,7 +10,9 @@ export declare const configs: {
10
10
  '@atlaskit/ui-styling-standard/no-classname-prop': string;
11
11
  '@atlaskit/ui-styling-standard/no-container-queries': string;
12
12
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
13
+ '@atlaskit/ui-styling-standard/no-exported-styles': string;
13
14
  '@atlaskit/ui-styling-standard/no-important-styles': string;
15
+ '@atlaskit/ui-styling-standard/no-imported-style-values': string;
14
16
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
15
17
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
16
18
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
@@ -45,7 +47,9 @@ export declare const configs: {
45
47
  '@atlaskit/ui-styling-standard/no-classname-prop': string;
46
48
  '@atlaskit/ui-styling-standard/no-container-queries': string;
47
49
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
50
+ '@atlaskit/ui-styling-standard/no-exported-styles': string;
48
51
  '@atlaskit/ui-styling-standard/no-important-styles': string;
52
+ '@atlaskit/ui-styling-standard/no-imported-style-values': string;
49
53
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
50
54
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
51
55
  '@atlaskit/design-system/consistent-css-prop-usage': (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::544c8b1c0eb0d6329064dcf92e18e45e>>
3
+ * @codegen <<SignedSource::96336e6094dbcbf456aaef313b624fbf>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -13,7 +13,9 @@ declare const _default: {
13
13
  '@atlaskit/ui-styling-standard/no-classname-prop': string;
14
14
  '@atlaskit/ui-styling-standard/no-container-queries': string;
15
15
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
16
+ '@atlaskit/ui-styling-standard/no-exported-styles': string;
16
17
  '@atlaskit/ui-styling-standard/no-important-styles': string;
18
+ '@atlaskit/ui-styling-standard/no-imported-style-values': string;
17
19
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
18
20
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
19
21
  '@atlaskit/design-system/consistent-css-prop-usage': (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::544c8b1c0eb0d6329064dcf92e18e45e>>
3
+ * @codegen <<SignedSource::96336e6094dbcbf456aaef313b624fbf>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -13,7 +13,9 @@ declare const _default: {
13
13
  '@atlaskit/ui-styling-standard/no-classname-prop': string;
14
14
  '@atlaskit/ui-styling-standard/no-container-queries': string;
15
15
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
16
+ '@atlaskit/ui-styling-standard/no-exported-styles': string;
16
17
  '@atlaskit/ui-styling-standard/no-important-styles': string;
18
+ '@atlaskit/ui-styling-standard/no-imported-style-values': string;
17
19
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
18
20
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
19
21
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
@@ -6,7 +6,9 @@ declare const _default: {
6
6
  'no-classname-prop': import("eslint").Rule.RuleModule;
7
7
  'no-container-queries': import("eslint").Rule.RuleModule;
8
8
  'no-dynamic-styles': import("eslint").Rule.RuleModule;
9
+ 'no-exported-styles': import("eslint").Rule.RuleModule;
9
10
  'no-important-styles': import("eslint").Rule.RuleModule;
11
+ 'no-imported-style-values': import("eslint").Rule.RuleModule;
10
12
  'no-nested-selectors': import("eslint").Rule.RuleModule;
11
13
  'no-unsafe-values': import("eslint").Rule.RuleModule;
12
14
  };
@@ -0,0 +1,2 @@
1
+ export declare const rule: import("eslint").Rule.RuleModule;
2
+ export default rule;
@@ -0,0 +1,3 @@
1
+ import type { Rule } from 'eslint';
2
+ export declare const rule: Rule.RuleModule;
3
+ export default rule;
@@ -10,7 +10,9 @@ export declare const configs: {
10
10
  '@atlaskit/ui-styling-standard/no-classname-prop': string;
11
11
  '@atlaskit/ui-styling-standard/no-container-queries': string;
12
12
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
13
+ '@atlaskit/ui-styling-standard/no-exported-styles': string;
13
14
  '@atlaskit/ui-styling-standard/no-important-styles': string;
15
+ '@atlaskit/ui-styling-standard/no-imported-style-values': string;
14
16
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
15
17
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
16
18
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
@@ -45,7 +47,9 @@ export declare const configs: {
45
47
  '@atlaskit/ui-styling-standard/no-classname-prop': string;
46
48
  '@atlaskit/ui-styling-standard/no-container-queries': string;
47
49
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
50
+ '@atlaskit/ui-styling-standard/no-exported-styles': string;
48
51
  '@atlaskit/ui-styling-standard/no-important-styles': string;
52
+ '@atlaskit/ui-styling-standard/no-imported-style-values': string;
49
53
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
50
54
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
51
55
  '@atlaskit/design-system/consistent-css-prop-usage': (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::544c8b1c0eb0d6329064dcf92e18e45e>>
3
+ * @codegen <<SignedSource::96336e6094dbcbf456aaef313b624fbf>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -13,7 +13,9 @@ declare const _default: {
13
13
  '@atlaskit/ui-styling-standard/no-classname-prop': string;
14
14
  '@atlaskit/ui-styling-standard/no-container-queries': string;
15
15
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
16
+ '@atlaskit/ui-styling-standard/no-exported-styles': string;
16
17
  '@atlaskit/ui-styling-standard/no-important-styles': string;
18
+ '@atlaskit/ui-styling-standard/no-imported-style-values': string;
17
19
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
18
20
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
19
21
  '@atlaskit/design-system/consistent-css-prop-usage': (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::544c8b1c0eb0d6329064dcf92e18e45e>>
3
+ * @codegen <<SignedSource::96336e6094dbcbf456aaef313b624fbf>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -13,7 +13,9 @@ declare const _default: {
13
13
  '@atlaskit/ui-styling-standard/no-classname-prop': string;
14
14
  '@atlaskit/ui-styling-standard/no-container-queries': string;
15
15
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
16
+ '@atlaskit/ui-styling-standard/no-exported-styles': string;
16
17
  '@atlaskit/ui-styling-standard/no-important-styles': string;
18
+ '@atlaskit/ui-styling-standard/no-imported-style-values': string;
17
19
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
18
20
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
19
21
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
@@ -6,7 +6,9 @@ declare const _default: {
6
6
  'no-classname-prop': import("eslint").Rule.RuleModule;
7
7
  'no-container-queries': import("eslint").Rule.RuleModule;
8
8
  'no-dynamic-styles': import("eslint").Rule.RuleModule;
9
+ 'no-exported-styles': import("eslint").Rule.RuleModule;
9
10
  'no-important-styles': import("eslint").Rule.RuleModule;
11
+ 'no-imported-style-values': import("eslint").Rule.RuleModule;
10
12
  'no-nested-selectors': import("eslint").Rule.RuleModule;
11
13
  'no-unsafe-values': import("eslint").Rule.RuleModule;
12
14
  };
@@ -0,0 +1,2 @@
1
+ export declare const rule: import("eslint").Rule.RuleModule;
2
+ export default rule;
@@ -0,0 +1,3 @@
1
+ import type { Rule } from 'eslint';
2
+ export declare const rule: Rule.RuleModule;
3
+ export default rule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-ui-styling-standard",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "author": "Atlassian Pty Ltd",
5
5
  "description": "The eslint plugin to enforce and educate on Atlassian's UI Styling Standard",
6
6
  "license": "Apache-2.0",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@atlaskit/ds-lib": "^2.3.0",
53
- "@atlaskit/eslint-plugin-design-system": "^9.5.0",
53
+ "@atlaskit/eslint-plugin-design-system": "^9.6.0",
54
54
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
55
55
  "@atlassian/codegen": "*",
56
56
  "@compiled/eslint-plugin": "^0.13.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::544c8b1c0eb0d6329064dcf92e18e45e>>
3
+ * @codegen <<SignedSource::96336e6094dbcbf456aaef313b624fbf>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -17,7 +17,9 @@ export default {
17
17
  '@atlaskit/ui-styling-standard/no-classname-prop': 'warn',
18
18
  '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
19
19
  '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
20
+ '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
20
21
  '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
22
+ '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
21
23
  '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
22
24
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
23
25
  '@atlaskit/design-system/consistent-css-prop-usage': [
@@ -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::544c8b1c0eb0d6329064dcf92e18e45e>>
3
+ * @codegen <<SignedSource::96336e6094dbcbf456aaef313b624fbf>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -17,7 +17,9 @@ export default {
17
17
  '@atlaskit/ui-styling-standard/no-classname-prop': 'warn',
18
18
  '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
19
19
  '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
20
+ '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
20
21
  '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
22
+ '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
21
23
  '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
22
24
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
23
25
  '@atlaskit/design-system/consistent-css-prop-usage': [
@@ -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::edaedcad824fed1e108f90d909287584>>
3
+ * @codegen <<SignedSource::648acb81f0f43d8ce56f7d6c22db8856>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  import convertPropsSyntax from './convert-props-syntax';
@@ -10,7 +10,9 @@ import noArrayArguments from './no-array-arguments';
10
10
  import noClassnameProp from './no-classname-prop';
11
11
  import noContainerQueries from './no-container-queries';
12
12
  import noDynamicStyles from './no-dynamic-styles';
13
+ import noExportedStyles from './no-exported-styles';
13
14
  import noImportantStyles from './no-important-styles';
15
+ import noImportedStyleValues from './no-imported-style-values';
14
16
  import noNestedSelectors from './no-nested-selectors';
15
17
  import noUnsafeValues from './no-unsafe-values';
16
18
 
@@ -22,7 +24,9 @@ export default {
22
24
  'no-classname-prop': noClassnameProp,
23
25
  'no-container-queries': noContainerQueries,
24
26
  'no-dynamic-styles': noDynamicStyles,
27
+ 'no-exported-styles': noExportedStyles,
25
28
  'no-important-styles': noImportantStyles,
29
+ 'no-imported-style-values': noImportedStyleValues,
26
30
  'no-nested-selectors': noNestedSelectors,
27
31
  'no-unsafe-values': noUnsafeValues,
28
32
  };