@atlaskit/eslint-plugin-ui-styling-standard 0.12.0 → 0.14.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +2 -0
  3. package/constellation/index/overview.mdx +3 -1
  4. package/constellation/no-global-styles/usage.mdx +59 -0
  5. package/constellation/no-styled/usage.mdx +89 -0
  6. package/constellation/use-compiled/usage.mdx +20 -17
  7. package/dist/cjs/presets/all.codegen.js +3 -1
  8. package/dist/cjs/presets/recommended.codegen.js +3 -1
  9. package/dist/cjs/rules/index.codegen.js +5 -1
  10. package/dist/cjs/rules/no-global-styles/index.js +100 -0
  11. package/dist/cjs/rules/no-styled/index.js +67 -0
  12. package/dist/es2019/presets/all.codegen.js +3 -1
  13. package/dist/es2019/presets/recommended.codegen.js +3 -1
  14. package/dist/es2019/rules/index.codegen.js +5 -1
  15. package/dist/es2019/rules/no-global-styles/index.js +67 -0
  16. package/dist/es2019/rules/no-styled/index.js +45 -0
  17. package/dist/esm/presets/all.codegen.js +3 -1
  18. package/dist/esm/presets/recommended.codegen.js +3 -1
  19. package/dist/esm/rules/index.codegen.js +5 -1
  20. package/dist/esm/rules/no-global-styles/index.js +94 -0
  21. package/dist/esm/rules/no-styled/index.js +61 -0
  22. package/dist/types/index.codegen.d.ts +4 -0
  23. package/dist/types/presets/all.codegen.d.ts +3 -1
  24. package/dist/types/presets/recommended.codegen.d.ts +3 -1
  25. package/dist/types/rules/index.codegen.d.ts +2 -0
  26. package/dist/types/rules/no-global-styles/index.d.ts +2 -0
  27. package/dist/types/rules/no-styled/index.d.ts +2 -0
  28. package/dist/types-ts4.5/index.codegen.d.ts +4 -0
  29. package/dist/types-ts4.5/presets/all.codegen.d.ts +3 -1
  30. package/dist/types-ts4.5/presets/recommended.codegen.d.ts +3 -1
  31. package/dist/types-ts4.5/rules/index.codegen.d.ts +2 -0
  32. package/dist/types-ts4.5/rules/no-global-styles/index.d.ts +2 -0
  33. package/dist/types-ts4.5/rules/no-styled/index.d.ts +2 -0
  34. package/package.json +2 -2
  35. package/src/presets/all.codegen.tsx +3 -1
  36. package/src/presets/recommended.codegen.tsx +3 -1
  37. package/src/rules/index.codegen.tsx +5 -1
  38. package/src/rules/no-global-styles/README.md +56 -0
  39. package/src/rules/no-global-styles/__tests__/no-css-modules.test.tsx +33 -0
  40. package/src/rules/no-global-styles/__tests__/no-global-styles.test.tsx +46 -0
  41. package/src/rules/no-global-styles/index.tsx +85 -0
  42. package/src/rules/no-styled/README.md +82 -0
  43. package/src/rules/no-styled/__tests__/rule.test.tsx +73 -0
  44. package/src/rules/no-styled/index.tsx +52 -0
  45. package/src/rules/use-compiled/README.md +16 -16
  46. package/src/rules/use-compiled/__tests__/imports.test.tsx +24 -0
@@ -0,0 +1,67 @@
1
+ import { createLintRule } from '../utils/create-rule';
2
+ const restrictedFileTypes = ['.css', '.less', '.sass', '.scss'];
3
+ const restrictedImports = {
4
+ '@emotion/core': ['Global'],
5
+ '@emotion/react': ['Global'],
6
+ 'styled-components': ['createGlobalStyle', 'injectGlobal']
7
+ };
8
+ function isRestrictedImportSource(importSource) {
9
+ return importSource in restrictedImports;
10
+ }
11
+ export const rule = createLintRule({
12
+ meta: {
13
+ name: 'no-global-styles',
14
+ docs: {
15
+ description: 'Prevents global styles through CSS-in-JS or CSS module imports',
16
+ recommended: true,
17
+ severity: 'warn'
18
+ },
19
+ messages: {
20
+ 'no-global-styles': 'Global styles are not allowed.',
21
+ 'no-css-modules': 'Importing CSS files is not allowed.'
22
+ },
23
+ type: 'problem'
24
+ },
25
+ create(context) {
26
+ function checkFileType(node) {
27
+ const importSource = node.source.value;
28
+ if (restrictedFileTypes.some(suffix => importSource.endsWith(suffix))) {
29
+ context.report({
30
+ node: node.source,
31
+ messageId: 'no-css-modules'
32
+ });
33
+ }
34
+ }
35
+ function checkImports(node) {
36
+ const importSource = node.source.value;
37
+ if (!isRestrictedImportSource(importSource)) {
38
+ return;
39
+ }
40
+ for (const importName of restrictedImports[importSource]) {
41
+ const specifier = node.specifiers.filter(isImportSpecifier).find(specifier => specifier.imported.name === importName);
42
+ if (specifier) {
43
+ context.report({
44
+ node: specifier,
45
+ messageId: 'no-global-styles'
46
+ });
47
+ }
48
+ }
49
+ }
50
+ return {
51
+ ImportDeclaration(node) {
52
+ checkFileType(node);
53
+ checkImports(node);
54
+ },
55
+ 'JSXOpeningElement[name.name="style"]'(node) {
56
+ context.report({
57
+ node,
58
+ messageId: 'no-global-styles'
59
+ });
60
+ }
61
+ };
62
+ }
63
+ });
64
+ export default rule;
65
+ function isImportSpecifier(node) {
66
+ return node.type === 'ImportSpecifier';
67
+ }
@@ -0,0 +1,45 @@
1
+ import { isStyled, getImportSources } from '@atlaskit/eslint-utils/is-supported-import';
2
+ import { createLintRule } from '../utils/create-rule';
3
+ export const rule = createLintRule({
4
+ meta: {
5
+ name: 'no-styled',
6
+ docs: {
7
+ description: 'Disallows usage of the `styled` imports',
8
+ recommended: true,
9
+ severity: 'warn'
10
+ },
11
+ messages: {
12
+ 'no-styled': "Avoid usages of styled, eg. styled.div, styled('div'), styled(Component), etc."
13
+ },
14
+ type: 'problem'
15
+ },
16
+ create(context) {
17
+ return {
18
+ CallExpression: node => {
19
+ const references = context.getScope().references;
20
+ const importSources = getImportSources(context);
21
+ if (isStyled(node, references, importSources)) {
22
+ context.report({
23
+ node,
24
+ messageId: 'no-styled'
25
+ });
26
+ }
27
+ },
28
+ MemberExpression: node => {
29
+ const references = context.getScope().references;
30
+ const importSources = getImportSources(context);
31
+ if (node.object.type === 'Identifier' && isStyled(node.object, references, importSources)) {
32
+ const parent = context.getAncestors().at(-1);
33
+ if (parent && (parent.type === 'CallExpression' || parent.type === 'MemberExpression')) {
34
+ return;
35
+ }
36
+ context.report({
37
+ node,
38
+ messageId: 'no-styled'
39
+ });
40
+ }
41
+ }
42
+ };
43
+ }
44
+ });
45
+ 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::752a442dd46681814ab73f7fa9c05374>>
3
+ * @codegen <<SignedSource::40bdd5a27731185ba04e0b279fc81ac9>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -15,9 +15,11 @@ export default {
15
15
  '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
16
16
  '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
17
17
  '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
18
+ '@atlaskit/ui-styling-standard/no-global-styles': 'warn',
18
19
  '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
19
20
  '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
20
21
  '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
22
+ '@atlaskit/ui-styling-standard/no-styled': 'warn',
21
23
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
22
24
  '@atlaskit/ui-styling-standard/use-compiled': 'warn',
23
25
  '@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::752a442dd46681814ab73f7fa9c05374>>
3
+ * @codegen <<SignedSource::40bdd5a27731185ba04e0b279fc81ac9>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -15,9 +15,11 @@ export default {
15
15
  '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
16
16
  '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
17
17
  '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
18
+ '@atlaskit/ui-styling-standard/no-global-styles': 'warn',
18
19
  '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
19
20
  '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
20
21
  '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
22
+ '@atlaskit/ui-styling-standard/no-styled': 'warn',
21
23
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
22
24
  '@atlaskit/ui-styling-standard/use-compiled': 'warn',
23
25
  '@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::be177a361ddc1a7a41d843680299e318>>
3
+ * @codegen <<SignedSource::417762b5fc4a56c3b69c22b8ac0d12e7>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  import atlaskitTheme from './atlaskit-theme';
@@ -12,9 +12,11 @@ import noClassnameProp from './no-classname-prop';
12
12
  import noContainerQueries from './no-container-queries';
13
13
  import noDynamicStyles from './no-dynamic-styles';
14
14
  import noExportedStyles from './no-exported-styles';
15
+ import noGlobalStyles from './no-global-styles';
15
16
  import noImportantStyles from './no-important-styles';
16
17
  import noImportedStyleValues from './no-imported-style-values';
17
18
  import noNestedSelectors from './no-nested-selectors';
19
+ import noStyled from './no-styled';
18
20
  import noUnsafeValues from './no-unsafe-values';
19
21
  import useCompiled from './use-compiled';
20
22
  export default {
@@ -27,9 +29,11 @@ export default {
27
29
  'no-container-queries': noContainerQueries,
28
30
  'no-dynamic-styles': noDynamicStyles,
29
31
  'no-exported-styles': noExportedStyles,
32
+ 'no-global-styles': noGlobalStyles,
30
33
  'no-important-styles': noImportantStyles,
31
34
  'no-imported-style-values': noImportedStyleValues,
32
35
  'no-nested-selectors': noNestedSelectors,
36
+ 'no-styled': noStyled,
33
37
  'no-unsafe-values': noUnsafeValues,
34
38
  'use-compiled': useCompiled
35
39
  };
@@ -0,0 +1,94 @@
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
+ var restrictedFileTypes = ['.css', '.less', '.sass', '.scss'];
6
+ var restrictedImports = {
7
+ '@emotion/core': ['Global'],
8
+ '@emotion/react': ['Global'],
9
+ 'styled-components': ['createGlobalStyle', 'injectGlobal']
10
+ };
11
+ function isRestrictedImportSource(importSource) {
12
+ return importSource in restrictedImports;
13
+ }
14
+ export var rule = createLintRule({
15
+ meta: {
16
+ name: 'no-global-styles',
17
+ docs: {
18
+ description: 'Prevents global styles through CSS-in-JS or CSS module imports',
19
+ recommended: true,
20
+ severity: 'warn'
21
+ },
22
+ messages: {
23
+ 'no-global-styles': 'Global styles are not allowed.',
24
+ 'no-css-modules': 'Importing CSS files is not allowed.'
25
+ },
26
+ type: 'problem'
27
+ },
28
+ create: function create(context) {
29
+ function checkFileType(node) {
30
+ var importSource = node.source.value;
31
+ if (restrictedFileTypes.some(function (suffix) {
32
+ return importSource.endsWith(suffix);
33
+ })) {
34
+ context.report({
35
+ node: node.source,
36
+ messageId: 'no-css-modules'
37
+ });
38
+ }
39
+ }
40
+ function checkImports(node) {
41
+ var importSource = node.source.value;
42
+ if (!isRestrictedImportSource(importSource)) {
43
+ return;
44
+ }
45
+ var _iterator = _createForOfIteratorHelper(restrictedImports[importSource]),
46
+ _step;
47
+ try {
48
+ var _loop = function _loop() {
49
+ var importName = _step.value;
50
+ var specifier = node.specifiers.filter(isImportSpecifier).find(function (specifier) {
51
+ return specifier.imported.name === importName;
52
+ });
53
+ if (specifier) {
54
+ context.report({
55
+ node: specifier,
56
+ messageId: 'no-global-styles'
57
+ });
58
+ }
59
+ };
60
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
61
+ _loop();
62
+ }
63
+ } catch (err) {
64
+ _iterator.e(err);
65
+ } finally {
66
+ _iterator.f();
67
+ }
68
+ }
69
+ return {
70
+ ImportDeclaration: function (_ImportDeclaration) {
71
+ function ImportDeclaration(_x) {
72
+ return _ImportDeclaration.apply(this, arguments);
73
+ }
74
+ ImportDeclaration.toString = function () {
75
+ return _ImportDeclaration.toString();
76
+ };
77
+ return ImportDeclaration;
78
+ }(function (node) {
79
+ checkFileType(node);
80
+ checkImports(node);
81
+ }),
82
+ 'JSXOpeningElement[name.name="style"]': function JSXOpeningElementNameNameStyle(node) {
83
+ context.report({
84
+ node: node,
85
+ messageId: 'no-global-styles'
86
+ });
87
+ }
88
+ };
89
+ }
90
+ });
91
+ export default rule;
92
+ function isImportSpecifier(node) {
93
+ return node.type === 'ImportSpecifier';
94
+ }
@@ -0,0 +1,61 @@
1
+ import { isStyled, getImportSources } from '@atlaskit/eslint-utils/is-supported-import';
2
+ import { createLintRule } from '../utils/create-rule';
3
+ export var rule = createLintRule({
4
+ meta: {
5
+ name: 'no-styled',
6
+ docs: {
7
+ description: 'Disallows usage of the `styled` imports',
8
+ recommended: true,
9
+ severity: 'warn'
10
+ },
11
+ messages: {
12
+ 'no-styled': "Avoid usages of styled, eg. styled.div, styled('div'), styled(Component), etc."
13
+ },
14
+ type: 'problem'
15
+ },
16
+ create: function create(context) {
17
+ return {
18
+ CallExpression: function (_CallExpression) {
19
+ function CallExpression(_x) {
20
+ return _CallExpression.apply(this, arguments);
21
+ }
22
+ CallExpression.toString = function () {
23
+ return _CallExpression.toString();
24
+ };
25
+ return CallExpression;
26
+ }(function (node) {
27
+ var references = context.getScope().references;
28
+ var importSources = getImportSources(context);
29
+ if (isStyled(node, references, importSources)) {
30
+ context.report({
31
+ node: node,
32
+ messageId: 'no-styled'
33
+ });
34
+ }
35
+ }),
36
+ MemberExpression: function (_MemberExpression) {
37
+ function MemberExpression(_x2) {
38
+ return _MemberExpression.apply(this, arguments);
39
+ }
40
+ MemberExpression.toString = function () {
41
+ return _MemberExpression.toString();
42
+ };
43
+ return MemberExpression;
44
+ }(function (node) {
45
+ var references = context.getScope().references;
46
+ var importSources = getImportSources(context);
47
+ if (node.object.type === 'Identifier' && isStyled(node.object, references, importSources)) {
48
+ var parent = context.getAncestors().at(-1);
49
+ if (parent && (parent.type === 'CallExpression' || parent.type === 'MemberExpression')) {
50
+ return;
51
+ }
52
+ context.report({
53
+ node: node,
54
+ messageId: 'no-styled'
55
+ });
56
+ }
57
+ })
58
+ };
59
+ }
60
+ });
61
+ export default rule;
@@ -12,9 +12,11 @@ export declare const configs: {
12
12
  '@atlaskit/ui-styling-standard/no-container-queries': string;
13
13
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
14
14
  '@atlaskit/ui-styling-standard/no-exported-styles': string;
15
+ '@atlaskit/ui-styling-standard/no-global-styles': string;
15
16
  '@atlaskit/ui-styling-standard/no-important-styles': string;
16
17
  '@atlaskit/ui-styling-standard/no-imported-style-values': string;
17
18
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
19
+ '@atlaskit/ui-styling-standard/no-styled': string;
18
20
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
19
21
  '@atlaskit/ui-styling-standard/use-compiled': string;
20
22
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
@@ -51,9 +53,11 @@ export declare const configs: {
51
53
  '@atlaskit/ui-styling-standard/no-container-queries': string;
52
54
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
53
55
  '@atlaskit/ui-styling-standard/no-exported-styles': string;
56
+ '@atlaskit/ui-styling-standard/no-global-styles': string;
54
57
  '@atlaskit/ui-styling-standard/no-important-styles': string;
55
58
  '@atlaskit/ui-styling-standard/no-imported-style-values': string;
56
59
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
60
+ '@atlaskit/ui-styling-standard/no-styled': string;
57
61
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
58
62
  '@atlaskit/ui-styling-standard/use-compiled': string;
59
63
  '@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::752a442dd46681814ab73f7fa9c05374>>
3
+ * @codegen <<SignedSource::40bdd5a27731185ba04e0b279fc81ac9>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -15,9 +15,11 @@ declare const _default: {
15
15
  '@atlaskit/ui-styling-standard/no-container-queries': string;
16
16
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
17
17
  '@atlaskit/ui-styling-standard/no-exported-styles': string;
18
+ '@atlaskit/ui-styling-standard/no-global-styles': string;
18
19
  '@atlaskit/ui-styling-standard/no-important-styles': string;
19
20
  '@atlaskit/ui-styling-standard/no-imported-style-values': string;
20
21
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
22
+ '@atlaskit/ui-styling-standard/no-styled': string;
21
23
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
22
24
  '@atlaskit/ui-styling-standard/use-compiled': string;
23
25
  '@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::752a442dd46681814ab73f7fa9c05374>>
3
+ * @codegen <<SignedSource::40bdd5a27731185ba04e0b279fc81ac9>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -15,9 +15,11 @@ declare const _default: {
15
15
  '@atlaskit/ui-styling-standard/no-container-queries': string;
16
16
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
17
17
  '@atlaskit/ui-styling-standard/no-exported-styles': string;
18
+ '@atlaskit/ui-styling-standard/no-global-styles': string;
18
19
  '@atlaskit/ui-styling-standard/no-important-styles': string;
19
20
  '@atlaskit/ui-styling-standard/no-imported-style-values': string;
20
21
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
22
+ '@atlaskit/ui-styling-standard/no-styled': string;
21
23
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
22
24
  '@atlaskit/ui-styling-standard/use-compiled': string;
23
25
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
@@ -8,9 +8,11 @@ declare const _default: {
8
8
  'no-container-queries': import("eslint").Rule.RuleModule;
9
9
  'no-dynamic-styles': import("eslint").Rule.RuleModule;
10
10
  'no-exported-styles': import("eslint").Rule.RuleModule;
11
+ 'no-global-styles': import("eslint").Rule.RuleModule;
11
12
  'no-important-styles': import("eslint").Rule.RuleModule;
12
13
  'no-imported-style-values': import("eslint").Rule.RuleModule;
13
14
  'no-nested-selectors': import("eslint").Rule.RuleModule;
15
+ 'no-styled': import("eslint").Rule.RuleModule;
14
16
  'no-unsafe-values': import("eslint").Rule.RuleModule;
15
17
  'use-compiled': import("eslint").Rule.RuleModule;
16
18
  };
@@ -0,0 +1,2 @@
1
+ export declare const rule: import("eslint").Rule.RuleModule;
2
+ export default rule;
@@ -0,0 +1,2 @@
1
+ export declare const rule: import("eslint").Rule.RuleModule;
2
+ export default rule;
@@ -12,9 +12,11 @@ export declare const configs: {
12
12
  '@atlaskit/ui-styling-standard/no-container-queries': string;
13
13
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
14
14
  '@atlaskit/ui-styling-standard/no-exported-styles': string;
15
+ '@atlaskit/ui-styling-standard/no-global-styles': string;
15
16
  '@atlaskit/ui-styling-standard/no-important-styles': string;
16
17
  '@atlaskit/ui-styling-standard/no-imported-style-values': string;
17
18
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
19
+ '@atlaskit/ui-styling-standard/no-styled': string;
18
20
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
19
21
  '@atlaskit/ui-styling-standard/use-compiled': string;
20
22
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
@@ -51,9 +53,11 @@ export declare const configs: {
51
53
  '@atlaskit/ui-styling-standard/no-container-queries': string;
52
54
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
53
55
  '@atlaskit/ui-styling-standard/no-exported-styles': string;
56
+ '@atlaskit/ui-styling-standard/no-global-styles': string;
54
57
  '@atlaskit/ui-styling-standard/no-important-styles': string;
55
58
  '@atlaskit/ui-styling-standard/no-imported-style-values': string;
56
59
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
60
+ '@atlaskit/ui-styling-standard/no-styled': string;
57
61
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
58
62
  '@atlaskit/ui-styling-standard/use-compiled': string;
59
63
  '@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::752a442dd46681814ab73f7fa9c05374>>
3
+ * @codegen <<SignedSource::40bdd5a27731185ba04e0b279fc81ac9>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -15,9 +15,11 @@ declare const _default: {
15
15
  '@atlaskit/ui-styling-standard/no-container-queries': string;
16
16
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
17
17
  '@atlaskit/ui-styling-standard/no-exported-styles': string;
18
+ '@atlaskit/ui-styling-standard/no-global-styles': string;
18
19
  '@atlaskit/ui-styling-standard/no-important-styles': string;
19
20
  '@atlaskit/ui-styling-standard/no-imported-style-values': string;
20
21
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
22
+ '@atlaskit/ui-styling-standard/no-styled': string;
21
23
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
22
24
  '@atlaskit/ui-styling-standard/use-compiled': string;
23
25
  '@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::752a442dd46681814ab73f7fa9c05374>>
3
+ * @codegen <<SignedSource::40bdd5a27731185ba04e0b279fc81ac9>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -15,9 +15,11 @@ declare const _default: {
15
15
  '@atlaskit/ui-styling-standard/no-container-queries': string;
16
16
  '@atlaskit/ui-styling-standard/no-dynamic-styles': string;
17
17
  '@atlaskit/ui-styling-standard/no-exported-styles': string;
18
+ '@atlaskit/ui-styling-standard/no-global-styles': string;
18
19
  '@atlaskit/ui-styling-standard/no-important-styles': string;
19
20
  '@atlaskit/ui-styling-standard/no-imported-style-values': string;
20
21
  '@atlaskit/ui-styling-standard/no-nested-selectors': string;
22
+ '@atlaskit/ui-styling-standard/no-styled': string;
21
23
  '@atlaskit/ui-styling-standard/no-unsafe-values': string;
22
24
  '@atlaskit/ui-styling-standard/use-compiled': string;
23
25
  '@atlaskit/design-system/consistent-css-prop-usage': (string | {
@@ -8,9 +8,11 @@ declare const _default: {
8
8
  'no-container-queries': import("eslint").Rule.RuleModule;
9
9
  'no-dynamic-styles': import("eslint").Rule.RuleModule;
10
10
  'no-exported-styles': import("eslint").Rule.RuleModule;
11
+ 'no-global-styles': import("eslint").Rule.RuleModule;
11
12
  'no-important-styles': import("eslint").Rule.RuleModule;
12
13
  'no-imported-style-values': import("eslint").Rule.RuleModule;
13
14
  'no-nested-selectors': import("eslint").Rule.RuleModule;
15
+ 'no-styled': import("eslint").Rule.RuleModule;
14
16
  'no-unsafe-values': import("eslint").Rule.RuleModule;
15
17
  'use-compiled': import("eslint").Rule.RuleModule;
16
18
  };
@@ -0,0 +1,2 @@
1
+ export declare const rule: import("eslint").Rule.RuleModule;
2
+ export default rule;
@@ -0,0 +1,2 @@
1
+ export declare const rule: import("eslint").Rule.RuleModule;
2
+ 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.12.0",
3
+ "version": "0.14.0",
4
4
  "author": "Atlassian Pty Ltd",
5
5
  "description": "The eslint plugin to enforce and educate on Atlassian's UI Styling Standard",
6
6
  "license": "Apache-2.0",
@@ -51,7 +51,7 @@
51
51
  "devDependencies": {
52
52
  "@af/formatting": "*",
53
53
  "@atlaskit/ds-lib": "^2.3.0",
54
- "@atlaskit/eslint-plugin-design-system": "^10.1.0",
54
+ "@atlaskit/eslint-plugin-design-system": "^10.2.0",
55
55
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
56
56
  "@atlassian/codegen": "*",
57
57
  "@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::752a442dd46681814ab73f7fa9c05374>>
3
+ * @codegen <<SignedSource::40bdd5a27731185ba04e0b279fc81ac9>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -15,9 +15,11 @@ export default {
15
15
  '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
16
16
  '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
17
17
  '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
18
+ '@atlaskit/ui-styling-standard/no-global-styles': 'warn',
18
19
  '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
19
20
  '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
20
21
  '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
22
+ '@atlaskit/ui-styling-standard/no-styled': 'warn',
21
23
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
22
24
  '@atlaskit/ui-styling-standard/use-compiled': '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::752a442dd46681814ab73f7fa9c05374>>
3
+ * @codegen <<SignedSource::40bdd5a27731185ba04e0b279fc81ac9>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -15,9 +15,11 @@ export default {
15
15
  '@atlaskit/ui-styling-standard/no-container-queries': 'warn',
16
16
  '@atlaskit/ui-styling-standard/no-dynamic-styles': 'warn',
17
17
  '@atlaskit/ui-styling-standard/no-exported-styles': 'warn',
18
+ '@atlaskit/ui-styling-standard/no-global-styles': 'warn',
18
19
  '@atlaskit/ui-styling-standard/no-important-styles': 'warn',
19
20
  '@atlaskit/ui-styling-standard/no-imported-style-values': 'warn',
20
21
  '@atlaskit/ui-styling-standard/no-nested-selectors': 'warn',
22
+ '@atlaskit/ui-styling-standard/no-styled': 'warn',
21
23
  '@atlaskit/ui-styling-standard/no-unsafe-values': 'warn',
22
24
  '@atlaskit/ui-styling-standard/use-compiled': '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::be177a361ddc1a7a41d843680299e318>>
3
+ * @codegen <<SignedSource::417762b5fc4a56c3b69c22b8ac0d12e7>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  import atlaskitTheme from './atlaskit-theme';
@@ -12,9 +12,11 @@ import noClassnameProp from './no-classname-prop';
12
12
  import noContainerQueries from './no-container-queries';
13
13
  import noDynamicStyles from './no-dynamic-styles';
14
14
  import noExportedStyles from './no-exported-styles';
15
+ import noGlobalStyles from './no-global-styles';
15
16
  import noImportantStyles from './no-important-styles';
16
17
  import noImportedStyleValues from './no-imported-style-values';
17
18
  import noNestedSelectors from './no-nested-selectors';
19
+ import noStyled from './no-styled';
18
20
  import noUnsafeValues from './no-unsafe-values';
19
21
  import useCompiled from './use-compiled';
20
22
 
@@ -28,9 +30,11 @@ export default {
28
30
  'no-container-queries': noContainerQueries,
29
31
  'no-dynamic-styles': noDynamicStyles,
30
32
  'no-exported-styles': noExportedStyles,
33
+ 'no-global-styles': noGlobalStyles,
31
34
  'no-important-styles': noImportantStyles,
32
35
  'no-imported-style-values': noImportedStyleValues,
33
36
  'no-nested-selectors': noNestedSelectors,
37
+ 'no-styled': noStyled,
34
38
  'no-unsafe-values': noUnsafeValues,
35
39
  'use-compiled': useCompiled,
36
40
  };