@atlaskit/eslint-plugin-design-system 10.19.0 → 10.21.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 +16 -0
  2. package/README.md +1 -0
  3. package/dist/cjs/presets/all.codegen.js +2 -1
  4. package/dist/cjs/rules/index.codegen.js +3 -1
  5. package/dist/cjs/rules/no-dark-theme-vr-tests/index.js +65 -0
  6. package/dist/cjs/rules/use-latest-xcss-syntax-typography/config/index.js +1 -1
  7. package/dist/cjs/rules/use-latest-xcss-syntax-typography/index.js +13 -0
  8. package/dist/cjs/rules/use-latest-xcss-syntax-typography/linters/common.js +6 -1
  9. package/dist/cjs/rules/use-latest-xcss-syntax-typography/linters/index.js +7 -0
  10. package/dist/cjs/rules/use-latest-xcss-syntax-typography/linters/restricted-capitalisation.js +37 -0
  11. package/dist/cjs/rules/use-latest-xcss-syntax-typography/linters/restricted-property.js +2 -1
  12. package/dist/es2019/presets/all.codegen.js +2 -1
  13. package/dist/es2019/rules/index.codegen.js +3 -1
  14. package/dist/es2019/rules/no-dark-theme-vr-tests/index.js +51 -0
  15. package/dist/es2019/rules/use-latest-xcss-syntax-typography/config/index.js +1 -1
  16. package/dist/es2019/rules/use-latest-xcss-syntax-typography/index.js +10 -1
  17. package/dist/es2019/rules/use-latest-xcss-syntax-typography/linters/common.js +4 -1
  18. package/dist/es2019/rules/use-latest-xcss-syntax-typography/linters/index.js +1 -0
  19. package/dist/es2019/rules/use-latest-xcss-syntax-typography/linters/restricted-capitalisation.js +33 -0
  20. package/dist/es2019/rules/use-latest-xcss-syntax-typography/linters/restricted-property.js +2 -1
  21. package/dist/esm/presets/all.codegen.js +2 -1
  22. package/dist/esm/rules/index.codegen.js +3 -1
  23. package/dist/esm/rules/no-dark-theme-vr-tests/index.js +58 -0
  24. package/dist/esm/rules/use-latest-xcss-syntax-typography/config/index.js +1 -1
  25. package/dist/esm/rules/use-latest-xcss-syntax-typography/index.js +14 -1
  26. package/dist/esm/rules/use-latest-xcss-syntax-typography/linters/common.js +4 -1
  27. package/dist/esm/rules/use-latest-xcss-syntax-typography/linters/index.js +1 -0
  28. package/dist/esm/rules/use-latest-xcss-syntax-typography/linters/restricted-capitalisation.js +31 -0
  29. package/dist/esm/rules/use-latest-xcss-syntax-typography/linters/restricted-property.js +2 -1
  30. package/dist/types/index.codegen.d.ts +1 -0
  31. package/dist/types/presets/all.codegen.d.ts +2 -1
  32. package/dist/types/rules/index.codegen.d.ts +1 -0
  33. package/dist/types/rules/no-dark-theme-vr-tests/index.d.ts +3 -0
  34. package/dist/types/rules/use-latest-xcss-syntax-typography/config/index.d.ts +1 -1
  35. package/dist/types/rules/use-latest-xcss-syntax-typography/linters/common.d.ts +1 -0
  36. package/dist/types/rules/use-latest-xcss-syntax-typography/linters/index.d.ts +1 -0
  37. package/dist/types/rules/use-latest-xcss-syntax-typography/linters/restricted-capitalisation.d.ts +6 -0
  38. package/dist/types-ts4.5/index.codegen.d.ts +1 -0
  39. package/dist/types-ts4.5/presets/all.codegen.d.ts +2 -1
  40. package/dist/types-ts4.5/rules/index.codegen.d.ts +1 -0
  41. package/dist/types-ts4.5/rules/no-dark-theme-vr-tests/index.d.ts +3 -0
  42. package/dist/types-ts4.5/rules/use-latest-xcss-syntax-typography/config/index.d.ts +1 -1
  43. package/dist/types-ts4.5/rules/use-latest-xcss-syntax-typography/linters/common.d.ts +1 -0
  44. package/dist/types-ts4.5/rules/use-latest-xcss-syntax-typography/linters/index.d.ts +1 -0
  45. package/dist/types-ts4.5/rules/use-latest-xcss-syntax-typography/linters/restricted-capitalisation.d.ts +6 -0
  46. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/eslint-plugin-design-system
2
2
 
3
+ ## 10.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#142522](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/142522)
8
+ [`42f1b0abdb783`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/42f1b0abdb783) -
9
+ Disallow ALL CAPS styles in XCSS using the `use-latest-xcss-syntax-typography` rule.
10
+
11
+ ## 10.20.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#142315](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/142315)
16
+ [`4810530a99092`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4810530a99092) -
17
+ Add `no-dark-theme-vr-tests` rule
18
+
3
19
  ## 10.19.0
4
20
 
5
21
  ### Minor Changes
package/README.md CHANGED
@@ -57,6 +57,7 @@ module.exports = {
57
57
  | <a href="./src/rules/no-banned-imports/README.md">no-banned-imports</a> | Disallow importing banned modules. | Yes | | |
58
58
  | <a href="./src/rules/no-css-tagged-template-expression/README.md">no-css-tagged-template-expression</a> | Disallows any `css` tagged template expressions that originate from Emotion, Styled Components or Compiled | | Yes | |
59
59
  | <a href="./src/rules/no-custom-icons/README.md">no-custom-icons</a> | Enforces custom glyph icons are used. | | | |
60
+ | <a href="./src/rules/no-dark-theme-vr-tests/README.md">no-dark-theme-vr-tests</a> | Disallow using dark colorScheme in VR tests. | | Yes | |
60
61
  | <a href="./src/rules/no-deprecated-apis/README.md">no-deprecated-apis</a> | Disallow using deprecated APIs. | Yes | | |
61
62
  | <a href="./src/rules/no-deprecated-design-token-usage/README.md">no-deprecated-design-token-usage</a> | Disallow using deprecated design tokens. | Yes | Yes | |
62
63
  | <a href="./src/rules/no-deprecated-imports/README.md">no-deprecated-imports</a> | Disallow importing deprecated modules. | Yes | | |
@@ -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::be4dfc6cd2ee9af2084965a89f8b8a91>>
9
+ * @codegen <<SignedSource::310e184a1b8eca0da1246cfe8d128e2c>>
10
10
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
11
11
  */
12
12
  var _default = exports.default = {
@@ -20,6 +20,7 @@ var _default = exports.default = {
20
20
  '@atlaskit/design-system/no-banned-imports': 'error',
21
21
  '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
22
22
  '@atlaskit/design-system/no-custom-icons': 'warn',
23
+ '@atlaskit/design-system/no-dark-theme-vr-tests': 'error',
23
24
  '@atlaskit/design-system/no-deprecated-apis': 'error',
24
25
  '@atlaskit/design-system/no-deprecated-design-token-usage': 'warn',
25
26
  '@atlaskit/design-system/no-deprecated-imports': 'error',
@@ -13,6 +13,7 @@ var _iconLabel = _interopRequireDefault(require("./icon-label"));
13
13
  var _noBannedImports = _interopRequireDefault(require("./no-banned-imports"));
14
14
  var _noCssTaggedTemplateExpression = _interopRequireDefault(require("./no-css-tagged-template-expression"));
15
15
  var _noCustomIcons = _interopRequireDefault(require("./no-custom-icons"));
16
+ var _noDarkThemeVrTests = _interopRequireDefault(require("./no-dark-theme-vr-tests"));
16
17
  var _noDeprecatedApis = _interopRequireDefault(require("./no-deprecated-apis"));
17
18
  var _noDeprecatedDesignTokenUsage = _interopRequireDefault(require("./no-deprecated-design-token-usage"));
18
19
  var _noDeprecatedImports = _interopRequireDefault(require("./no-deprecated-imports"));
@@ -50,7 +51,7 @@ var _useTokensTypography = _interopRequireDefault(require("./use-tokens-typograp
50
51
  var _useVisuallyHidden = _interopRequireDefault(require("./use-visually-hidden"));
51
52
  /**
52
53
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
53
- * @codegen <<SignedSource::4c05727190930e765289a0d292c2928f>>
54
+ * @codegen <<SignedSource::2c61c8c9aa86b4fb1d11e0bcba9d83a1>>
54
55
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
55
56
  */
56
57
  var _default = exports.default = {
@@ -62,6 +63,7 @@ var _default = exports.default = {
62
63
  'no-banned-imports': _noBannedImports.default,
63
64
  'no-css-tagged-template-expression': _noCssTaggedTemplateExpression.default,
64
65
  'no-custom-icons': _noCustomIcons.default,
66
+ 'no-dark-theme-vr-tests': _noDarkThemeVrTests.default,
65
67
  'no-deprecated-apis': _noDeprecatedApis.default,
66
68
  'no-deprecated-design-token-usage': _noDeprecatedDesignTokenUsage.default,
67
69
  'no-deprecated-imports': _noDeprecatedImports.default,
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
+ var _createRule = require("../utils/create-rule");
10
+ var rule = (0, _createRule.createLintRule)({
11
+ meta: {
12
+ name: 'no-dark-theme-vr-tests',
13
+ type: 'problem',
14
+ fixable: 'code',
15
+ docs: {
16
+ description: 'Disallow using dark colorScheme in VR tests.',
17
+ recommended: false,
18
+ severity: 'error'
19
+ },
20
+ messages: {
21
+ noDarkThemeVR: "Redundant dark theme VR tests are not allowed. Check out this [RFC](https://hello.atlassian.net/wiki/spaces/DST/pages/4083370233/DSTRFC-022+-+Intent+to+remove+dark+VR+tests+from+AFM)"
22
+ }
23
+ },
24
+ create: function create(context) {
25
+ var importSources = [];
26
+ return {
27
+ ImportDeclaration: function ImportDeclaration(node) {
28
+ if (node.source.type === 'Literal' && typeof node.source.value === 'string') {
29
+ importSources.push(node.source.value);
30
+ }
31
+ },
32
+ ObjectExpression: function ObjectExpression(node) {
33
+ if (importSources.every(function (source) {
34
+ return ['@af/visual-regression', '@atlassian/jira-vr-testing', '@atlassian/gemini'].includes(source);
35
+ })) {
36
+ return {};
37
+ }
38
+ node.properties.forEach(function (prop) {
39
+ var environmentProperty = prop.type === 'Property' && prop.key.type === 'Identifier' && prop.key.name === 'environment' ? prop : null;
40
+ if (environmentProperty && environmentProperty.value.type === 'ObjectExpression') {
41
+ var colorSchemeProperty = environmentProperty.value.properties.find(function (path) {
42
+ return path.type === 'Property' && path.key.type === 'Identifier' && path.key.name === 'colorScheme';
43
+ });
44
+ if (colorSchemeProperty && colorSchemeProperty.type === 'Property' && colorSchemeProperty.value.type === 'Literal' && colorSchemeProperty.value.value === 'dark') {
45
+ context.report({
46
+ node: node,
47
+ messageId: 'noDarkThemeVR',
48
+ fix: function fix(fixer) {
49
+ if (node.range) {
50
+ var _node$range = (0, _slicedToArray2.default)(node.range, 2),
51
+ start = _node$range[0],
52
+ end = _node$range[1];
53
+ return fixer.removeRange([start, end + 1]);
54
+ }
55
+ return null;
56
+ }
57
+ });
58
+ }
59
+ }
60
+ });
61
+ }
62
+ };
63
+ }
64
+ });
65
+ var _default = exports.default = rule;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getConfig = void 0;
7
7
  var defaults = {
8
8
  failSilently: false,
9
- patterns: ['restricted-property', 'wrapped-token-value']
9
+ patterns: ['restricted-property', 'wrapped-token-value', 'restricted-capitalisation']
10
10
  };
11
11
  var getConfig = exports.getConfig = function getConfig(overrides) {
12
12
  return Object.assign({}, defaults, overrides);
@@ -23,6 +23,7 @@ var rule = (0, _createRule.createLintRule)({
23
23
  messages: {
24
24
  noRestrictedTypographyProperties: "Don't set '{{ property }}' on xcss as it allows invalid combinations of typography tokens. ".concat(typescriptErrorMessage),
25
25
  noRestrictedTypographyPropertiesHeading: "Don't set '{{ property }}' on xcss in combination with 'font' heading tokens. ".concat(typescriptErrorMessage),
26
+ noRestrictedCapitalisation: "Avoid using ALL CAPS as it reduces readability and is bad for accessibility.",
26
27
  noWrappedTokenTypographyValues: "Don't wrap typography tokens in xcss. ".concat(typescriptErrorMessage)
27
28
  }
28
29
  },
@@ -41,6 +42,18 @@ var rule = (0, _createRule.createLintRule)({
41
42
  config: config
42
43
  });
43
44
  },
45
+ 'CallExpression[callee.name="xcss"] ObjectExpression > Property > Identifier[name=textTransform]': function CallExpressionCalleeNameXcssObjectExpressionPropertyIdentifierNameTextTransform(node) {
46
+ return _linters.RestrictedCapitalisation.lint(node, {
47
+ context: context,
48
+ config: config
49
+ });
50
+ },
51
+ 'CallExpression[callee.name="xcss"] ObjectExpression > Property > Literal[value=textTransform]': function CallExpressionCalleeNameXcssObjectExpressionPropertyLiteralValueTextTransform(node) {
52
+ return _linters.RestrictedCapitalisation.lint(node, {
53
+ context: context,
54
+ config: config
55
+ });
56
+ },
44
57
  'CallExpression[callee.name="xcss"] ObjectExpression > Property > Identifier[name=/(font|fontFamily|fontWeight)/]': function CallExpressionCalleeNameXcssObjectExpressionPropertyIdentifierNameFontFontFamilyFontWeight(node) {
45
58
  return _linters.WrappedTokenValue.lint(node, {
46
59
  context: context,
@@ -2,4 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
- });
5
+ });
6
+ exports.isPropertyName = isPropertyName;
7
+ var _eslintCodemodUtils = require("eslint-codemod-utils");
8
+ function isPropertyName(node, name) {
9
+ return (0, _eslintCodemodUtils.isNodeOfType)(node, 'Identifier') && node.name === name || (0, _eslintCodemodUtils.isNodeOfType)(node, 'Literal') && node.value === name;
10
+ }
@@ -3,6 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "RestrictedCapitalisation", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _restrictedCapitalisation.RestrictedCapitalisation;
10
+ }
11
+ });
6
12
  Object.defineProperty(exports, "RestrictedProperty", {
7
13
  enumerable: true,
8
14
  get: function get() {
@@ -16,4 +22,5 @@ Object.defineProperty(exports, "WrappedTokenValue", {
16
22
  }
17
23
  });
18
24
  var _restrictedProperty = require("./restricted-property");
25
+ var _restrictedCapitalisation = require("./restricted-capitalisation");
19
26
  var _wrappedTokenValue = require("./wrapped-token-value");
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.RestrictedCapitalisation = void 0;
7
+ var _eslintCodemodUtils = require("eslint-codemod-utils");
8
+ var _common = require("./common");
9
+ /* eslint-disable @repo/internal/react/require-jsdoc */
10
+
11
+ var RestrictedCapitalisation = exports.RestrictedCapitalisation = {
12
+ lint: function lint(node, _ref) {
13
+ var context = _ref.context,
14
+ config = _ref.config;
15
+ if (RestrictedCapitalisation._check(node, {
16
+ context: context,
17
+ config: config
18
+ })) {
19
+ context.report({
20
+ node: node,
21
+ messageId: 'noRestrictedCapitalisation'
22
+ });
23
+ }
24
+ },
25
+ _check: function _check(node, _ref2) {
26
+ var config = _ref2.config;
27
+ if (!config.patterns.includes('restricted-capitalisation')) {
28
+ return false;
29
+ }
30
+
31
+ // Prevent text transform being used to uppercase all characters
32
+ if ((0, _common.isPropertyName)(node, 'textTransform') && (0, _eslintCodemodUtils.isNodeOfType)(node.parent, 'Property') && (0, _eslintCodemodUtils.isNodeOfType)(node.parent.value, 'Literal')) {
33
+ return node.parent.value.value === 'uppercase';
34
+ }
35
+ return true;
36
+ }
37
+ };
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.RestrictedProperty = void 0;
7
7
  var _eslintCodemodUtils = require("eslint-codemod-utils");
8
+ var _common = require("./common");
8
9
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, 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 o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
9
10
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
10
11
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /* eslint-disable @repo/internal/react/require-jsdoc */
@@ -38,7 +39,7 @@ var RestrictedProperty = exports.RestrictedProperty = {
38
39
  }
39
40
 
40
41
  // Prevent font weight being used in combination with heading tokens
41
- if ((0, _eslintCodemodUtils.isNodeOfType)(node, 'Identifier') && node.name === 'fontWeight' || (0, _eslintCodemodUtils.isNodeOfType)(node, 'Literal') && node.value === 'fontWeight') {
42
+ if ((0, _common.isPropertyName)(node, 'fontWeight')) {
42
43
  if ((0, _eslintCodemodUtils.isNodeOfType)(node.parent.parent, 'ObjectExpression')) {
43
44
  var _iterator = _createForOfIteratorHelper(node.parent.parent.properties),
44
45
  _step;
@@ -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::be4dfc6cd2ee9af2084965a89f8b8a91>>
3
+ * @codegen <<SignedSource::310e184a1b8eca0da1246cfe8d128e2c>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
  export default {
@@ -14,6 +14,7 @@ export default {
14
14
  '@atlaskit/design-system/no-banned-imports': 'error',
15
15
  '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
16
16
  '@atlaskit/design-system/no-custom-icons': 'warn',
17
+ '@atlaskit/design-system/no-dark-theme-vr-tests': 'error',
17
18
  '@atlaskit/design-system/no-deprecated-apis': 'error',
18
19
  '@atlaskit/design-system/no-deprecated-design-token-usage': 'warn',
19
20
  '@atlaskit/design-system/no-deprecated-imports': '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::4c05727190930e765289a0d292c2928f>>
3
+ * @codegen <<SignedSource::2c61c8c9aa86b4fb1d11e0bcba9d83a1>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
  import consistentCssPropUsage from './consistent-css-prop-usage';
@@ -11,6 +11,7 @@ import iconLabel from './icon-label';
11
11
  import noBannedImports from './no-banned-imports';
12
12
  import noCssTaggedTemplateExpression from './no-css-tagged-template-expression';
13
13
  import noCustomIcons from './no-custom-icons';
14
+ import noDarkThemeVrTests from './no-dark-theme-vr-tests';
14
15
  import noDeprecatedApis from './no-deprecated-apis';
15
16
  import noDeprecatedDesignTokenUsage from './no-deprecated-design-token-usage';
16
17
  import noDeprecatedImports from './no-deprecated-imports';
@@ -55,6 +56,7 @@ export default {
55
56
  'no-banned-imports': noBannedImports,
56
57
  'no-css-tagged-template-expression': noCssTaggedTemplateExpression,
57
58
  'no-custom-icons': noCustomIcons,
59
+ 'no-dark-theme-vr-tests': noDarkThemeVrTests,
58
60
  'no-deprecated-apis': noDeprecatedApis,
59
61
  'no-deprecated-design-token-usage': noDeprecatedDesignTokenUsage,
60
62
  'no-deprecated-imports': noDeprecatedImports,
@@ -0,0 +1,51 @@
1
+ import { createLintRule } from '../utils/create-rule';
2
+ const rule = createLintRule({
3
+ meta: {
4
+ name: 'no-dark-theme-vr-tests',
5
+ type: 'problem',
6
+ fixable: 'code',
7
+ docs: {
8
+ description: 'Disallow using dark colorScheme in VR tests.',
9
+ recommended: false,
10
+ severity: 'error'
11
+ },
12
+ messages: {
13
+ noDarkThemeVR: `Redundant dark theme VR tests are not allowed. Check out this [RFC](https://hello.atlassian.net/wiki/spaces/DST/pages/4083370233/DSTRFC-022+-+Intent+to+remove+dark+VR+tests+from+AFM)`
14
+ }
15
+ },
16
+ create(context) {
17
+ let importSources = [];
18
+ return {
19
+ ImportDeclaration(node) {
20
+ if (node.source.type === 'Literal' && typeof node.source.value === 'string') {
21
+ importSources.push(node.source.value);
22
+ }
23
+ },
24
+ ObjectExpression(node) {
25
+ if (importSources.every(source => ['@af/visual-regression', '@atlassian/jira-vr-testing', '@atlassian/gemini'].includes(source))) {
26
+ return {};
27
+ }
28
+ node.properties.forEach(prop => {
29
+ const environmentProperty = prop.type === 'Property' && prop.key.type === 'Identifier' && prop.key.name === 'environment' ? prop : null;
30
+ if (environmentProperty && environmentProperty.value.type === 'ObjectExpression') {
31
+ const colorSchemeProperty = environmentProperty.value.properties.find(path => path.type === 'Property' && path.key.type === 'Identifier' && path.key.name === 'colorScheme');
32
+ if (colorSchemeProperty && colorSchemeProperty.type === 'Property' && colorSchemeProperty.value.type === 'Literal' && colorSchemeProperty.value.value === 'dark') {
33
+ context.report({
34
+ node: node,
35
+ messageId: 'noDarkThemeVR',
36
+ fix: fixer => {
37
+ if (node.range) {
38
+ const [start, end] = node.range;
39
+ return fixer.removeRange([start, end + 1]);
40
+ }
41
+ return null;
42
+ }
43
+ });
44
+ }
45
+ }
46
+ });
47
+ }
48
+ };
49
+ }
50
+ });
51
+ export default rule;
@@ -1,6 +1,6 @@
1
1
  const defaults = {
2
2
  failSilently: false,
3
- patterns: ['restricted-property', 'wrapped-token-value']
3
+ patterns: ['restricted-property', 'wrapped-token-value', 'restricted-capitalisation']
4
4
  };
5
5
  export const getConfig = overrides => {
6
6
  return Object.assign({}, defaults, overrides);
@@ -1,7 +1,7 @@
1
1
  import { createLintRule } from '../utils/create-rule';
2
2
  import { errorBoundary } from '../utils/error-boundary';
3
3
  import { getConfig } from './config';
4
- import { RestrictedProperty, WrappedTokenValue } from './linters';
4
+ import { RestrictedCapitalisation, RestrictedProperty, WrappedTokenValue } from './linters';
5
5
  const typescriptErrorMessage = 'There is ongoing work to make this a TypeScript error. Once that happens, you will have to delete/refactor anyway.';
6
6
  const rule = createLintRule({
7
7
  meta: {
@@ -17,6 +17,7 @@ const rule = createLintRule({
17
17
  messages: {
18
18
  noRestrictedTypographyProperties: `Don't set '{{ property }}' on xcss as it allows invalid combinations of typography tokens. ${typescriptErrorMessage}`,
19
19
  noRestrictedTypographyPropertiesHeading: `Don't set '{{ property }}' on xcss in combination with 'font' heading tokens. ${typescriptErrorMessage}`,
20
+ noRestrictedCapitalisation: `Avoid using ALL CAPS as it reduces readability and is bad for accessibility.`,
20
21
  noWrappedTokenTypographyValues: `Don't wrap typography tokens in xcss. ${typescriptErrorMessage}`
21
22
  }
22
23
  },
@@ -31,6 +32,14 @@ const rule = createLintRule({
31
32
  context,
32
33
  config
33
34
  }),
35
+ 'CallExpression[callee.name="xcss"] ObjectExpression > Property > Identifier[name=textTransform]': node => RestrictedCapitalisation.lint(node, {
36
+ context,
37
+ config
38
+ }),
39
+ 'CallExpression[callee.name="xcss"] ObjectExpression > Property > Literal[value=textTransform]': node => RestrictedCapitalisation.lint(node, {
40
+ context,
41
+ config
42
+ }),
34
43
  'CallExpression[callee.name="xcss"] ObjectExpression > Property > Identifier[name=/(font|fontFamily|fontWeight)/]': node => WrappedTokenValue.lint(node, {
35
44
  context,
36
45
  config
@@ -1 +1,4 @@
1
- export {};
1
+ import { isNodeOfType } from 'eslint-codemod-utils';
2
+ export function isPropertyName(node, name) {
3
+ return isNodeOfType(node, 'Identifier') && node.name === name || isNodeOfType(node, 'Literal') && node.value === name;
4
+ }
@@ -1,2 +1,3 @@
1
1
  export { RestrictedProperty } from './restricted-property';
2
+ export { RestrictedCapitalisation } from './restricted-capitalisation';
2
3
  export { WrappedTokenValue } from './wrapped-token-value';
@@ -0,0 +1,33 @@
1
+ /* eslint-disable @repo/internal/react/require-jsdoc */
2
+
3
+ import { isNodeOfType } from 'eslint-codemod-utils';
4
+ import { isPropertyName } from './common';
5
+ export const RestrictedCapitalisation = {
6
+ lint(node, {
7
+ context,
8
+ config
9
+ }) {
10
+ if (RestrictedCapitalisation._check(node, {
11
+ context,
12
+ config
13
+ })) {
14
+ context.report({
15
+ node,
16
+ messageId: 'noRestrictedCapitalisation'
17
+ });
18
+ }
19
+ },
20
+ _check(node, {
21
+ config
22
+ }) {
23
+ if (!config.patterns.includes('restricted-capitalisation')) {
24
+ return false;
25
+ }
26
+
27
+ // Prevent text transform being used to uppercase all characters
28
+ if (isPropertyName(node, 'textTransform') && isNodeOfType(node.parent, 'Property') && isNodeOfType(node.parent.value, 'Literal')) {
29
+ return node.parent.value.value === 'uppercase';
30
+ }
31
+ return true;
32
+ }
33
+ };
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable @repo/internal/react/require-jsdoc */
2
2
 
3
3
  import { isNodeOfType } from 'eslint-codemod-utils';
4
+ import { isPropertyName } from './common';
4
5
  export const RestrictedProperty = {
5
6
  lint(node, {
6
7
  context,
@@ -33,7 +34,7 @@ export const RestrictedProperty = {
33
34
  }
34
35
 
35
36
  // Prevent font weight being used in combination with heading tokens
36
- if (isNodeOfType(node, 'Identifier') && node.name === 'fontWeight' || isNodeOfType(node, 'Literal') && node.value === 'fontWeight') {
37
+ if (isPropertyName(node, 'fontWeight')) {
37
38
  if (isNodeOfType(node.parent.parent, 'ObjectExpression')) {
38
39
  for (const property of node.parent.parent.properties) {
39
40
  var _property$value$value;
@@ -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::be4dfc6cd2ee9af2084965a89f8b8a91>>
3
+ * @codegen <<SignedSource::310e184a1b8eca0da1246cfe8d128e2c>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
  export default {
@@ -14,6 +14,7 @@ export default {
14
14
  '@atlaskit/design-system/no-banned-imports': 'error',
15
15
  '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
16
16
  '@atlaskit/design-system/no-custom-icons': 'warn',
17
+ '@atlaskit/design-system/no-dark-theme-vr-tests': 'error',
17
18
  '@atlaskit/design-system/no-deprecated-apis': 'error',
18
19
  '@atlaskit/design-system/no-deprecated-design-token-usage': 'warn',
19
20
  '@atlaskit/design-system/no-deprecated-imports': '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::4c05727190930e765289a0d292c2928f>>
3
+ * @codegen <<SignedSource::2c61c8c9aa86b4fb1d11e0bcba9d83a1>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
  import consistentCssPropUsage from './consistent-css-prop-usage';
@@ -11,6 +11,7 @@ import iconLabel from './icon-label';
11
11
  import noBannedImports from './no-banned-imports';
12
12
  import noCssTaggedTemplateExpression from './no-css-tagged-template-expression';
13
13
  import noCustomIcons from './no-custom-icons';
14
+ import noDarkThemeVrTests from './no-dark-theme-vr-tests';
14
15
  import noDeprecatedApis from './no-deprecated-apis';
15
16
  import noDeprecatedDesignTokenUsage from './no-deprecated-design-token-usage';
16
17
  import noDeprecatedImports from './no-deprecated-imports';
@@ -55,6 +56,7 @@ export default {
55
56
  'no-banned-imports': noBannedImports,
56
57
  'no-css-tagged-template-expression': noCssTaggedTemplateExpression,
57
58
  'no-custom-icons': noCustomIcons,
59
+ 'no-dark-theme-vr-tests': noDarkThemeVrTests,
58
60
  'no-deprecated-apis': noDeprecatedApis,
59
61
  'no-deprecated-design-token-usage': noDeprecatedDesignTokenUsage,
60
62
  'no-deprecated-imports': noDeprecatedImports,
@@ -0,0 +1,58 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import { createLintRule } from '../utils/create-rule';
3
+ var rule = createLintRule({
4
+ meta: {
5
+ name: 'no-dark-theme-vr-tests',
6
+ type: 'problem',
7
+ fixable: 'code',
8
+ docs: {
9
+ description: 'Disallow using dark colorScheme in VR tests.',
10
+ recommended: false,
11
+ severity: 'error'
12
+ },
13
+ messages: {
14
+ noDarkThemeVR: "Redundant dark theme VR tests are not allowed. Check out this [RFC](https://hello.atlassian.net/wiki/spaces/DST/pages/4083370233/DSTRFC-022+-+Intent+to+remove+dark+VR+tests+from+AFM)"
15
+ }
16
+ },
17
+ create: function create(context) {
18
+ var importSources = [];
19
+ return {
20
+ ImportDeclaration: function ImportDeclaration(node) {
21
+ if (node.source.type === 'Literal' && typeof node.source.value === 'string') {
22
+ importSources.push(node.source.value);
23
+ }
24
+ },
25
+ ObjectExpression: function ObjectExpression(node) {
26
+ if (importSources.every(function (source) {
27
+ return ['@af/visual-regression', '@atlassian/jira-vr-testing', '@atlassian/gemini'].includes(source);
28
+ })) {
29
+ return {};
30
+ }
31
+ node.properties.forEach(function (prop) {
32
+ var environmentProperty = prop.type === 'Property' && prop.key.type === 'Identifier' && prop.key.name === 'environment' ? prop : null;
33
+ if (environmentProperty && environmentProperty.value.type === 'ObjectExpression') {
34
+ var colorSchemeProperty = environmentProperty.value.properties.find(function (path) {
35
+ return path.type === 'Property' && path.key.type === 'Identifier' && path.key.name === 'colorScheme';
36
+ });
37
+ if (colorSchemeProperty && colorSchemeProperty.type === 'Property' && colorSchemeProperty.value.type === 'Literal' && colorSchemeProperty.value.value === 'dark') {
38
+ context.report({
39
+ node: node,
40
+ messageId: 'noDarkThemeVR',
41
+ fix: function fix(fixer) {
42
+ if (node.range) {
43
+ var _node$range = _slicedToArray(node.range, 2),
44
+ start = _node$range[0],
45
+ end = _node$range[1];
46
+ return fixer.removeRange([start, end + 1]);
47
+ }
48
+ return null;
49
+ }
50
+ });
51
+ }
52
+ }
53
+ });
54
+ }
55
+ };
56
+ }
57
+ });
58
+ export default rule;
@@ -1,6 +1,6 @@
1
1
  var defaults = {
2
2
  failSilently: false,
3
- patterns: ['restricted-property', 'wrapped-token-value']
3
+ patterns: ['restricted-property', 'wrapped-token-value', 'restricted-capitalisation']
4
4
  };
5
5
  export var getConfig = function getConfig(overrides) {
6
6
  return Object.assign({}, defaults, overrides);
@@ -1,7 +1,7 @@
1
1
  import { createLintRule } from '../utils/create-rule';
2
2
  import { errorBoundary } from '../utils/error-boundary';
3
3
  import { getConfig } from './config';
4
- import { RestrictedProperty, WrappedTokenValue } from './linters';
4
+ import { RestrictedCapitalisation, RestrictedProperty, WrappedTokenValue } from './linters';
5
5
  var typescriptErrorMessage = 'There is ongoing work to make this a TypeScript error. Once that happens, you will have to delete/refactor anyway.';
6
6
  var rule = createLintRule({
7
7
  meta: {
@@ -17,6 +17,7 @@ var rule = createLintRule({
17
17
  messages: {
18
18
  noRestrictedTypographyProperties: "Don't set '{{ property }}' on xcss as it allows invalid combinations of typography tokens. ".concat(typescriptErrorMessage),
19
19
  noRestrictedTypographyPropertiesHeading: "Don't set '{{ property }}' on xcss in combination with 'font' heading tokens. ".concat(typescriptErrorMessage),
20
+ noRestrictedCapitalisation: "Avoid using ALL CAPS as it reduces readability and is bad for accessibility.",
20
21
  noWrappedTokenTypographyValues: "Don't wrap typography tokens in xcss. ".concat(typescriptErrorMessage)
21
22
  }
22
23
  },
@@ -35,6 +36,18 @@ var rule = createLintRule({
35
36
  config: config
36
37
  });
37
38
  },
39
+ 'CallExpression[callee.name="xcss"] ObjectExpression > Property > Identifier[name=textTransform]': function CallExpressionCalleeNameXcssObjectExpressionPropertyIdentifierNameTextTransform(node) {
40
+ return RestrictedCapitalisation.lint(node, {
41
+ context: context,
42
+ config: config
43
+ });
44
+ },
45
+ 'CallExpression[callee.name="xcss"] ObjectExpression > Property > Literal[value=textTransform]': function CallExpressionCalleeNameXcssObjectExpressionPropertyLiteralValueTextTransform(node) {
46
+ return RestrictedCapitalisation.lint(node, {
47
+ context: context,
48
+ config: config
49
+ });
50
+ },
38
51
  'CallExpression[callee.name="xcss"] ObjectExpression > Property > Identifier[name=/(font|fontFamily|fontWeight)/]': function CallExpressionCalleeNameXcssObjectExpressionPropertyIdentifierNameFontFontFamilyFontWeight(node) {
39
52
  return WrappedTokenValue.lint(node, {
40
53
  context: context,
@@ -1 +1,4 @@
1
- export {};
1
+ import { isNodeOfType } from 'eslint-codemod-utils';
2
+ export function isPropertyName(node, name) {
3
+ return isNodeOfType(node, 'Identifier') && node.name === name || isNodeOfType(node, 'Literal') && node.value === name;
4
+ }
@@ -1,2 +1,3 @@
1
1
  export { RestrictedProperty } from './restricted-property';
2
+ export { RestrictedCapitalisation } from './restricted-capitalisation';
2
3
  export { WrappedTokenValue } from './wrapped-token-value';
@@ -0,0 +1,31 @@
1
+ /* eslint-disable @repo/internal/react/require-jsdoc */
2
+
3
+ import { isNodeOfType } from 'eslint-codemod-utils';
4
+ import { isPropertyName } from './common';
5
+ export var RestrictedCapitalisation = {
6
+ lint: function lint(node, _ref) {
7
+ var context = _ref.context,
8
+ config = _ref.config;
9
+ if (RestrictedCapitalisation._check(node, {
10
+ context: context,
11
+ config: config
12
+ })) {
13
+ context.report({
14
+ node: node,
15
+ messageId: 'noRestrictedCapitalisation'
16
+ });
17
+ }
18
+ },
19
+ _check: function _check(node, _ref2) {
20
+ var config = _ref2.config;
21
+ if (!config.patterns.includes('restricted-capitalisation')) {
22
+ return false;
23
+ }
24
+
25
+ // Prevent text transform being used to uppercase all characters
26
+ if (isPropertyName(node, 'textTransform') && isNodeOfType(node.parent, 'Property') && isNodeOfType(node.parent.value, 'Literal')) {
27
+ return node.parent.value.value === 'uppercase';
28
+ }
29
+ return true;
30
+ }
31
+ };
@@ -4,6 +4,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
4
4
  /* eslint-disable @repo/internal/react/require-jsdoc */
5
5
 
6
6
  import { isNodeOfType } from 'eslint-codemod-utils';
7
+ import { isPropertyName } from './common';
7
8
  export var RestrictedProperty = {
8
9
  lint: function lint(node, _ref) {
9
10
  var context = _ref.context,
@@ -34,7 +35,7 @@ export var RestrictedProperty = {
34
35
  }
35
36
 
36
37
  // Prevent font weight being used in combination with heading tokens
37
- if (isNodeOfType(node, 'Identifier') && node.name === 'fontWeight' || isNodeOfType(node, 'Literal') && node.value === 'fontWeight') {
38
+ if (isPropertyName(node, 'fontWeight')) {
38
39
  if (isNodeOfType(node.parent.parent, 'ObjectExpression')) {
39
40
  var _iterator = _createForOfIteratorHelper(node.parent.parent.properties),
40
41
  _step;
@@ -11,6 +11,7 @@ export declare const configs: {
11
11
  '@atlaskit/design-system/no-banned-imports': string;
12
12
  '@atlaskit/design-system/no-css-tagged-template-expression': string;
13
13
  '@atlaskit/design-system/no-custom-icons': string;
14
+ '@atlaskit/design-system/no-dark-theme-vr-tests': string;
14
15
  '@atlaskit/design-system/no-deprecated-apis': string;
15
16
  '@atlaskit/design-system/no-deprecated-design-token-usage': string;
16
17
  '@atlaskit/design-system/no-deprecated-imports': 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::be4dfc6cd2ee9af2084965a89f8b8a91>>
3
+ * @codegen <<SignedSource::310e184a1b8eca0da1246cfe8d128e2c>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
  declare const _default: {
@@ -14,6 +14,7 @@ declare const _default: {
14
14
  '@atlaskit/design-system/no-banned-imports': string;
15
15
  '@atlaskit/design-system/no-css-tagged-template-expression': string;
16
16
  '@atlaskit/design-system/no-custom-icons': string;
17
+ '@atlaskit/design-system/no-dark-theme-vr-tests': string;
17
18
  '@atlaskit/design-system/no-deprecated-apis': string;
18
19
  '@atlaskit/design-system/no-deprecated-design-token-usage': string;
19
20
  '@atlaskit/design-system/no-deprecated-imports': string;
@@ -7,6 +7,7 @@ declare const _default: {
7
7
  'no-banned-imports': import("eslint").Rule.RuleModule;
8
8
  'no-css-tagged-template-expression': import("eslint").Rule.RuleModule;
9
9
  'no-custom-icons': import("eslint").Rule.RuleModule;
10
+ 'no-dark-theme-vr-tests': import("eslint").Rule.RuleModule;
10
11
  'no-deprecated-apis': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<string, [{
11
12
  deprecatedConfig: import("./utils/types").DeprecatedConfig;
12
13
  }], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
@@ -0,0 +1,3 @@
1
+ import type { Rule } from 'eslint';
2
+ declare const rule: Rule.RuleModule;
3
+ export default rule;
@@ -1,4 +1,4 @@
1
- type Pattern = 'restricted-property' | 'wrapped-token-value';
1
+ type Pattern = 'restricted-property' | 'wrapped-token-value' | 'restricted-capitalisation';
2
2
  export interface RuleConfig {
3
3
  failSilently: boolean;
4
4
  patterns: Pattern[];
@@ -4,3 +4,4 @@ export type MetaData = {
4
4
  context: Rule.RuleContext;
5
5
  config: RuleConfig;
6
6
  };
7
+ export declare function isPropertyName(node: Rule.Node, name: string): boolean;
@@ -1,2 +1,3 @@
1
1
  export { RestrictedProperty } from './restricted-property';
2
+ export { RestrictedCapitalisation } from './restricted-capitalisation';
2
3
  export { WrappedTokenValue } from './wrapped-token-value';
@@ -0,0 +1,6 @@
1
+ import type { Rule } from 'eslint';
2
+ import { type MetaData } from './common';
3
+ export declare const RestrictedCapitalisation: {
4
+ lint(node: Rule.Node, { context, config }: MetaData): void;
5
+ _check(node: Rule.Node, { config }: MetaData): boolean;
6
+ };
@@ -11,6 +11,7 @@ export declare const configs: {
11
11
  '@atlaskit/design-system/no-banned-imports': string;
12
12
  '@atlaskit/design-system/no-css-tagged-template-expression': string;
13
13
  '@atlaskit/design-system/no-custom-icons': string;
14
+ '@atlaskit/design-system/no-dark-theme-vr-tests': string;
14
15
  '@atlaskit/design-system/no-deprecated-apis': string;
15
16
  '@atlaskit/design-system/no-deprecated-design-token-usage': string;
16
17
  '@atlaskit/design-system/no-deprecated-imports': 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::be4dfc6cd2ee9af2084965a89f8b8a91>>
3
+ * @codegen <<SignedSource::310e184a1b8eca0da1246cfe8d128e2c>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-design-system codegen
5
5
  */
6
6
  declare const _default: {
@@ -14,6 +14,7 @@ declare const _default: {
14
14
  '@atlaskit/design-system/no-banned-imports': string;
15
15
  '@atlaskit/design-system/no-css-tagged-template-expression': string;
16
16
  '@atlaskit/design-system/no-custom-icons': string;
17
+ '@atlaskit/design-system/no-dark-theme-vr-tests': string;
17
18
  '@atlaskit/design-system/no-deprecated-apis': string;
18
19
  '@atlaskit/design-system/no-deprecated-design-token-usage': string;
19
20
  '@atlaskit/design-system/no-deprecated-imports': string;
@@ -7,6 +7,7 @@ declare const _default: {
7
7
  'no-banned-imports': import("eslint").Rule.RuleModule;
8
8
  'no-css-tagged-template-expression': import("eslint").Rule.RuleModule;
9
9
  'no-custom-icons': import("eslint").Rule.RuleModule;
10
+ 'no-dark-theme-vr-tests': import("eslint").Rule.RuleModule;
10
11
  'no-deprecated-apis': import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<string, [
11
12
  {
12
13
  deprecatedConfig: import("./utils/types").DeprecatedConfig;
@@ -0,0 +1,3 @@
1
+ import type { Rule } from 'eslint';
2
+ declare const rule: Rule.RuleModule;
3
+ export default rule;
@@ -1,4 +1,4 @@
1
- type Pattern = 'restricted-property' | 'wrapped-token-value';
1
+ type Pattern = 'restricted-property' | 'wrapped-token-value' | 'restricted-capitalisation';
2
2
  export interface RuleConfig {
3
3
  failSilently: boolean;
4
4
  patterns: Pattern[];
@@ -4,3 +4,4 @@ export type MetaData = {
4
4
  context: Rule.RuleContext;
5
5
  config: RuleConfig;
6
6
  };
7
+ export declare function isPropertyName(node: Rule.Node, name: string): boolean;
@@ -1,2 +1,3 @@
1
1
  export { RestrictedProperty } from './restricted-property';
2
+ export { RestrictedCapitalisation } from './restricted-capitalisation';
2
3
  export { WrappedTokenValue } from './wrapped-token-value';
@@ -0,0 +1,6 @@
1
+ import type { Rule } from 'eslint';
2
+ import { type MetaData } from './common';
3
+ export declare const RestrictedCapitalisation: {
4
+ lint(node: Rule.Node, { context, config }: MetaData): void;
5
+ _check(node: Rule.Node, { config }: MetaData): boolean;
6
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
3
  "description": "The essential plugin for use with the Atlassian Design System.",
4
- "version": "10.19.0",
4
+ "version": "10.21.0",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
7
7
  "publishConfig": {