@atlaskit/eslint-plugin-design-system 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/eslint-plugin-design-system
2
2
 
3
+ ## 4.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7da1a30902a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7da1a30902a) - Adds missing meta to `ensure-design-token-usage` rule.
8
+
3
9
  ## 4.0.0
4
10
 
5
11
  ### Major Changes
package/dist/cjs/index.js CHANGED
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.configs = exports.rules = void 0;
8
+ exports.rules = exports.configs = void 0;
9
9
 
10
10
  var _ensureDesignTokenUsage = _interopRequireDefault(require("./rules/ensure-design-token-usage"));
11
11
 
@@ -43,6 +43,9 @@ var filterSuggestion = function filterSuggestion(_ref) {
43
43
 
44
44
  var rule = {
45
45
  meta: {
46
+ // We need to upgrade the version of ESLint.
47
+ // @ts-expect-error
48
+ hasSuggestions: true,
46
49
  docs: {
47
50
  recommended: true
48
51
  },
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.isHardCodedColor = exports.includesHardCodedColor = exports.isLegacyNamedColor = exports.isLegacyColor = void 0;
6
+ exports.isLegacyNamedColor = exports.isLegacyColor = exports.isHardCodedColor = exports.includesHardCodedColor = void 0;
7
7
  var namedColors = ['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'];
8
8
  var legacyColors = ['R50', 'R75', 'R100', 'R200', 'R300', 'R400', 'R500', 'Y50', 'Y75', 'Y100', 'Y200', 'Y300', 'Y400', 'Y500', 'G50', 'G75', 'G100', 'G200', 'G300', 'G400', 'G500', 'B50', 'B75', 'B100', 'B200', 'B300', 'B400', 'B500', 'P50', 'P75', 'P100', 'P200', 'P300', 'P400', 'P500', 'T50', 'T75', 'T100', 'T200', 'T300', 'T400', 'T500', 'N0', 'N10', 'N20', 'N30', 'N40', 'N50', 'N60', 'N70', 'N80', 'N90', 'N100', 'N200', 'N300', 'N400', 'N500', 'N600', 'N700', 'N800', 'N900', 'N10A', 'N20A', 'N30A', 'N40A', 'N50A', 'N60A', 'N70A', 'N80A', 'N90A', 'N100A', 'N200A', 'N300A', 'N400A', 'N500A', 'N600A', 'N700A', 'N800A', 'DN900', 'DN800', 'DN700', 'DN600', 'DN500', 'DN400', 'DN300', 'DN200', 'DN100', 'DN90', 'DN80', 'DN70', 'DN60', 'DN50', 'DN40', 'DN30', 'DN20', 'DN10', 'DN0', 'DN800A', 'DN700A', 'DN600A', 'DN500A', 'DN400A', 'DN300A', 'DN200A', 'DN100A', 'DN90A', 'DN80A', 'DN70A', 'DN60A', 'DN50A', 'DN40A', 'DN30A', 'DN20A', 'DN10A'];
9
9
  var legacyColorMixins = ['background', 'backgroundActive', 'backgroundHover', 'backgroundOnLayer', 'text', 'textHover', 'textActive', 'subtleText', 'placeholderText', 'heading', 'subtleHeading', 'codeBlock', 'link', 'linkHover', 'linkActive', 'linkOutline', 'primary', 'blue', 'teal', 'purple', 'red', 'yellow', 'green', 'skeleton'];
@@ -56,7 +56,8 @@ var isHardCodedColor = function isHardCodedColor(value) {
56
56
  return true;
57
57
  }
58
58
 
59
- if (value.startsWith('#') && (value.length === 4 || value.length === 7 || value.length === 9)) {
59
+ if (value.startsWith('#') && ( // short hex, hex, or hex with alpha
60
+ value.length === 4 || value.length === 7 || value.length === 9)) {
60
61
  return true;
61
62
  }
62
63
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.isChildOfType = exports.isDecendantOfStyleBlock = exports.isDecendantOfStyleJsxAttribute = exports.isDecendantOfType = exports.isDecendantOfGlobalToken = void 0;
6
+ exports.isDecendantOfType = exports.isDecendantOfStyleJsxAttribute = exports.isDecendantOfStyleBlock = exports.isDecendantOfGlobalToken = exports.isChildOfType = void 0;
7
7
 
8
8
  var isDecendantOfGlobalToken = function isDecendantOfGlobalToken(node) {
9
9
  if (node.type === 'CallExpression' && node.callee.type === 'Identifier' && node.callee.name === 'token') {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -24,6 +24,9 @@ const filterSuggestion = ({
24
24
 
25
25
  const rule = {
26
26
  meta: {
27
+ // We need to upgrade the version of ESLint.
28
+ // @ts-expect-error
29
+ hasSuggestions: true,
27
30
  docs: {
28
31
  recommended: true
29
32
  },
@@ -37,7 +37,8 @@ export const isHardCodedColor = value => {
37
37
  return true;
38
38
  }
39
39
 
40
- if (value.startsWith('#') && (value.length === 4 || value.length === 7 || value.length === 9)) {
40
+ if (value.startsWith('#') && ( // short hex, hex, or hex with alpha
41
+ value.length === 4 || value.length === 7 || value.length === 9)) {
41
42
  return true;
42
43
  }
43
44
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -33,6 +33,9 @@ var filterSuggestion = function filterSuggestion(_ref) {
33
33
 
34
34
  var rule = {
35
35
  meta: {
36
+ // We need to upgrade the version of ESLint.
37
+ // @ts-expect-error
38
+ hasSuggestions: true,
36
39
  docs: {
37
40
  recommended: true
38
41
  },
@@ -41,7 +41,8 @@ export var isHardCodedColor = function isHardCodedColor(value) {
41
41
  return true;
42
42
  }
43
43
 
44
- if (value.startsWith('#') && (value.length === 4 || value.length === 7 || value.length === 9)) {
44
+ if (value.startsWith('#') && ( // short hex, hex, or hex with alpha
45
+ value.length === 4 || value.length === 7 || value.length === 9)) {
45
46
  return true;
46
47
  }
47
48
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "author": "Atlassian Pty Ltd",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"