@atlaskit/eslint-plugin-ui-styling-standard 0.19.0 → 0.20.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 (44) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +1 -0
  3. package/dist/cjs/presets/all.codegen.js +6 -1
  4. package/dist/cjs/presets/recommended.codegen.js +6 -1
  5. package/dist/cjs/rules/convert-props-syntax/index.js +5 -13
  6. package/dist/cjs/rules/external-rules.js +16 -0
  7. package/dist/cjs/rules/no-array-arguments/index.js +3 -3
  8. package/dist/cjs/rules/no-dynamic-styles/index.js +3 -3
  9. package/dist/cjs/rules/no-global-styles/index.js +5 -13
  10. package/dist/cjs/rules/no-important-styles/index.js +3 -3
  11. package/dist/cjs/rules/no-imported-style-values/index.js +3 -3
  12. package/dist/cjs/rules/no-nested-selectors/index.js +1 -1
  13. package/dist/cjs/rules/no-styled/index.js +4 -20
  14. package/dist/cjs/rules/no-unsafe-selectors/constants.js +1 -1
  15. package/dist/cjs/rules/no-unsafe-selectors/index.js +2 -10
  16. package/dist/cjs/rules/no-unsafe-values/utils.js +3 -3
  17. package/dist/cjs/rules/use-compiled/index.js +2 -10
  18. package/dist/es2019/presets/all.codegen.js +6 -1
  19. package/dist/es2019/presets/recommended.codegen.js +6 -1
  20. package/dist/es2019/rules/external-rules.js +16 -0
  21. package/dist/es2019/rules/no-unsafe-selectors/constants.js +1 -1
  22. package/dist/esm/presets/all.codegen.js +6 -1
  23. package/dist/esm/presets/recommended.codegen.js +6 -1
  24. package/dist/esm/rules/convert-props-syntax/index.js +5 -13
  25. package/dist/esm/rules/external-rules.js +16 -0
  26. package/dist/esm/rules/no-array-arguments/index.js +3 -3
  27. package/dist/esm/rules/no-dynamic-styles/index.js +3 -3
  28. package/dist/esm/rules/no-global-styles/index.js +5 -13
  29. package/dist/esm/rules/no-important-styles/index.js +3 -3
  30. package/dist/esm/rules/no-imported-style-values/index.js +3 -3
  31. package/dist/esm/rules/no-styled/index.js +4 -20
  32. package/dist/esm/rules/no-unsafe-selectors/constants.js +1 -1
  33. package/dist/esm/rules/no-unsafe-selectors/index.js +2 -10
  34. package/dist/esm/rules/no-unsafe-values/utils.js +3 -3
  35. package/dist/esm/rules/use-compiled/index.js +2 -10
  36. package/dist/types/index.codegen.d.ts +10 -0
  37. package/dist/types/presets/all.codegen.d.ts +6 -1
  38. package/dist/types/presets/recommended.codegen.d.ts +6 -1
  39. package/dist/types/rules/no-unsafe-selectors/constants.d.ts +1 -1
  40. package/dist/types-ts4.5/index.codegen.d.ts +10 -0
  41. package/dist/types-ts4.5/presets/all.codegen.d.ts +6 -1
  42. package/dist/types-ts4.5/presets/recommended.codegen.d.ts +6 -1
  43. package/dist/types-ts4.5/rules/no-unsafe-selectors/constants.d.ts +2 -1
  44. package/package.json +8 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/eslint-plugin-ui-styling-standard
2
2
 
3
+ ## 0.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#154669](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154669)
8
+ [`20db78434becd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/20db78434becd) -
9
+ Bump to the latest version of @compiled/\*
10
+ - [#154669](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154669)
11
+ [`20db78434becd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/20db78434becd) -
12
+ Add and configure `@compiled/jsx-pragma` in the recommended preset for a better experience with
13
+ `@atlaskit/css` and the JSX pragma.
14
+
15
+ ## 0.19.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [#152862](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152862)
20
+ [`8febdd40a9680`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8febdd40a9680) -
21
+ Added &::-webkit-details-marker CSS psuedo into the allowed set of psuedos in
22
+ @atlaskit/ui-styling-standard/no-unsafe-selectors rule
23
+
3
24
  ## 0.19.0
4
25
 
5
26
  ### Minor Changes
package/README.md CHANGED
@@ -67,5 +67,6 @@ module.exports = {
67
67
  | <a href="https://atlassian.design/components/eslint-plugin-ui-styling-standard/no-js-xcss/usage">@compiled/no-js-xcss</a> | Disallows using xcss prop inside JavaScript files. | Yes | | |
68
68
  | <a href="https://atlassian.design/components/eslint-plugin-ui-styling-standard/no-empty-styled-expression/usage">@atlaskit/design-system/no-empty-styled-expression</a> | Forbids any styled expression to be used when passing empty arguments to styled.div() (or other JSX elements). | Yes | | |
69
69
  | <a href="https://atlassian.design/components/eslint-plugin-ui-styling-standard/no-invalid-css-map/usage">@atlaskit/design-system/no-invalid-css-map</a> | Checks the validity of a CSS map created through cssMap. This is intended to be used alongside TypeScript's type-checking. | Yes | | |
70
+ | <a href="https://atlassian.design/components/eslint-plugin-ui-styling-standard/jsx-pragma/usage">@compiled/jsx-pragma</a> | Ensures that the Compiled JSX pragma is set when using Compiled | Yes | | |
70
71
 
71
72
  <!-- END_RULE_TABLE_CODEGEN -->
@@ -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::330ecd53e03bf78708580ddcfb206876>>
9
+ * @codegen <<SignedSource::11d1ce4c1740cea37e5de3ccba44a8f5>>
10
10
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
11
11
  */
12
12
  var _default = exports.default = {
@@ -43,6 +43,11 @@ var _default = exports.default = {
43
43
  }],
44
44
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
45
45
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
46
+ }],
47
+ '@compiled/jsx-pragma': ['error', {
48
+ runtime: 'classic',
49
+ onlyRunIfImportingCompiled: true,
50
+ importSources: ['@atlaskit/css']
46
51
  }]
47
52
  }
48
53
  };
@@ -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::330ecd53e03bf78708580ddcfb206876>>
9
+ * @codegen <<SignedSource::11d1ce4c1740cea37e5de3ccba44a8f5>>
10
10
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
11
11
  */
12
12
  var _default = exports.default = {
@@ -43,6 +43,11 @@ var _default = exports.default = {
43
43
  }],
44
44
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
45
45
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
46
+ }],
47
+ '@compiled/jsx-pragma': ['error', {
48
+ runtime: 'classic',
49
+ onlyRunIfImportingCompiled: true,
50
+ importSources: ['@atlaskit/css']
46
51
  }]
47
52
  }
48
53
  };
@@ -10,9 +10,9 @@ var _createRule = require("../utils/create-rule");
10
10
  var _isSupportedImport = require("@atlaskit/eslint-utils/is-supported-import");
11
11
  var _estraverse = _interopRequireDefault(require("estraverse"));
12
12
  var _eslintCodemodUtils = require("eslint-codemod-utils");
13
- 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; } } }; }
14
- 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); }
15
- 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; }
13
+ 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; } } }; }
14
+ 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; } }
15
+ 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; }
16
16
  /**
17
17
  * Represents some information about single line that contains some props, e.g.
18
18
  * the arrow function in
@@ -385,15 +385,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
385
385
  },
386
386
  create: function create(context) {
387
387
  return {
388
- CallExpression: function (_CallExpression) {
389
- function CallExpression(_x) {
390
- return _CallExpression.apply(this, arguments);
391
- }
392
- CallExpression.toString = function () {
393
- return _CallExpression.toString();
394
- };
395
- return CallExpression;
396
- }(function (node) {
388
+ CallExpression: function CallExpression(node) {
397
389
  var _node$parent, _node$parent2;
398
390
  var references = context.getScope().references;
399
391
 
@@ -419,7 +411,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
419
411
  return;
420
412
  }
421
413
  lintArguments(context, node.arguments);
422
- })
414
+ }
423
415
  };
424
416
  }
425
417
  });
@@ -116,4 +116,20 @@ var externalRules = exports.externalRules = [{
116
116
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
117
117
  }
118
118
  }
119
+ }, {
120
+ name: '@compiled/jsx-pragma',
121
+ displayName: 'jsx-pragma',
122
+ isExternal: true,
123
+ docs: {
124
+ description: 'Ensures that the Compiled JSX pragma is set when using Compiled',
125
+ url: (0, _createRule.getRuleUrl)('jsx-pragma'),
126
+ externalUrl: 'https://github.com/atlassian-labs/compiled/tree/master/packages/eslint-plugin/src/rules/jsx-pragma',
127
+ recommended: true,
128
+ severity: 'error',
129
+ pluginConfig: {
130
+ runtime: 'classic',
131
+ onlyRunIfImportingCompiled: true,
132
+ importSources: ['@atlaskit/css']
133
+ }
134
+ }
119
135
  }];
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.rule = exports.default = void 0;
7
7
  var _isSupportedImport = require("@atlaskit/eslint-utils/is-supported-import");
8
8
  var _createRule = require("../utils/create-rule");
9
- 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; } } }; }
10
- 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); }
11
- 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; }
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; } } }; }
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; } }
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; }
12
12
  var schema = [{
13
13
  type: 'object',
14
14
  properties: {
@@ -8,9 +8,9 @@ exports.rule = exports.default = void 0;
8
8
  var _esquery = _interopRequireDefault(require("esquery"));
9
9
  var _isSupportedImport = require("@atlaskit/eslint-utils/is-supported-import");
10
10
  var _createRule = require("../utils/create-rule");
11
- 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; } } }; }
12
- 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); }
13
- 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; }
11
+ 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; } } }; }
12
+ 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; } }
13
+ 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; }
14
14
  var schema = [{
15
15
  type: 'object',
16
16
  properties: {
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.rule = exports.default = void 0;
7
7
  var _createRule = require("../utils/create-rule");
8
- 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; } } }; }
9
- 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); }
10
- 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; }
8
+ 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
+ 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
+ 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; }
11
11
  var restrictedFileTypes = ['.css', '.less', '.sass', '.scss'];
12
12
  var restrictedImports = {
13
13
  '@emotion/core': ['Global'],
@@ -73,18 +73,10 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
73
73
  }
74
74
  }
75
75
  return {
76
- ImportDeclaration: function (_ImportDeclaration) {
77
- function ImportDeclaration(_x) {
78
- return _ImportDeclaration.apply(this, arguments);
79
- }
80
- ImportDeclaration.toString = function () {
81
- return _ImportDeclaration.toString();
82
- };
83
- return ImportDeclaration;
84
- }(function (node) {
76
+ ImportDeclaration: function ImportDeclaration(node) {
85
77
  checkFileType(node);
86
78
  checkImports(node);
87
- }),
79
+ },
88
80
  'JSXOpeningElement[name.name="style"]': function JSXOpeningElementNameNameStyle(node) {
89
81
  context.report({
90
82
  node: node,
@@ -9,9 +9,9 @@ var _esquery = _interopRequireDefault(require("esquery"));
9
9
  var _isSupportedImport = require("@atlaskit/eslint-utils/is-supported-import");
10
10
  var _schema = require("@atlaskit/eslint-utils/schema");
11
11
  var _createRuleWithTypedConfig = require("../utils/create-rule-with-typed-config");
12
- 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; } } }; }
13
- 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); }
14
- 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; }
12
+ 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; } } }; }
13
+ 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; } }
14
+ 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; }
15
15
  var rule = exports.rule = (0, _createRuleWithTypedConfig.createLintRuleWithTypedConfig)({
16
16
  meta: {
17
17
  name: 'no-important-styles',
@@ -11,9 +11,9 @@ var _allowedFunctionCalls = require("@atlaskit/eslint-utils/allowed-function-cal
11
11
  var _findVariable = require("@atlaskit/eslint-utils/find-variable");
12
12
  var _isSupportedImport = require("@atlaskit/eslint-utils/is-supported-import");
13
13
  var _createRule = require("../utils/create-rule");
14
- 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; } } }; }
15
- 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); }
16
- 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; }
14
+ 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; } } }; }
15
+ 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; } }
16
+ 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; }
17
17
  var schema = [{
18
18
  type: 'object',
19
19
  properties: {
@@ -12,7 +12,7 @@ var _walkStyleProperties = require("@atlaskit/eslint-utils/walk-style-properties
12
12
  var _schema = require("@atlaskit/eslint-utils/schema");
13
13
  var _createRuleWithTypedConfig = require("../utils/create-rule-with-typed-config");
14
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
16
  var getCssSelector = function getCssSelector(key) {
17
17
  if (key.type === 'Literal' && typeof key.value === 'string') {
18
18
  return key.value;
@@ -21,15 +21,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
21
21
  },
22
22
  create: function create(context) {
23
23
  return {
24
- CallExpression: function (_CallExpression) {
25
- function CallExpression(_x) {
26
- return _CallExpression.apply(this, arguments);
27
- }
28
- CallExpression.toString = function () {
29
- return _CallExpression.toString();
30
- };
31
- return CallExpression;
32
- }(function (node) {
24
+ CallExpression: function CallExpression(node) {
33
25
  var references = context.getScope().references;
34
26
  var importSources = (0, _isSupportedImport.getImportSources)(context);
35
27
  if ((0, _isSupportedImport.isStyled)(node, references, importSources)) {
@@ -38,16 +30,8 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
38
30
  messageId: 'no-styled'
39
31
  });
40
32
  }
41
- }),
42
- MemberExpression: function (_MemberExpression) {
43
- function MemberExpression(_x2) {
44
- return _MemberExpression.apply(this, arguments);
45
- }
46
- MemberExpression.toString = function () {
47
- return _MemberExpression.toString();
48
- };
49
- return MemberExpression;
50
- }(function (node) {
33
+ },
34
+ MemberExpression: function MemberExpression(node) {
51
35
  var references = context.getScope().references;
52
36
  var importSources = (0, _isSupportedImport.getImportSources)(context);
53
37
  if (node.object.type === 'Identifier' && (0, _isSupportedImport.isStyled)(node.object, references, importSources)) {
@@ -60,7 +44,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
60
44
  messageId: 'no-styled'
61
45
  });
62
46
  }
63
- })
47
+ }
64
48
  };
65
49
  }
66
50
  });
@@ -13,7 +13,7 @@ exports.legacyPseudoElements = exports.ignoredAtRules = exports.allowedPseudos =
13
13
  * Exporting this so it isn't considered unused.
14
14
  */
15
15
 
16
- var cssPseudos = ['&:active', '&:autofill', '&:blank', '&:checked', '&:default', '&:defined', '&:disabled', '&:empty', '&:enabled', '&:first', '&:focus', '&:focus-visible', '&:focus-within', '&:fullscreen', '&:hover', '&:in-range', '&:indeterminate', '&:invalid', '&:left', '&:link', '&:local-link', '&:optional', '&:out-of-range', '&:paused', '&:picture-in-picture', '&:placeholder-shown', '&:playing', '&:read-only', '&:read-write', '&:required', '&:right', '&:target', '&:user-invalid', '&:user-valid', '&:valid', '&:visited', '&::after', '&::backdrop', '&::before', '&::cue', '&::cue-region', '&::first-letter', '&::first-line', '&::grammar-error', '&::marker', '&::placeholder', '&::selection', '&::spelling-error', '&::target-text', '&::view-transition'];
16
+ var cssPseudos = ['&:active', '&:autofill', '&:blank', '&:checked', '&:default', '&:defined', '&:disabled', '&:empty', '&:enabled', '&:first', '&:focus', '&:focus-visible', '&:focus-within', '&:fullscreen', '&:hover', '&:in-range', '&:indeterminate', '&:invalid', '&:left', '&:link', '&:local-link', '&:optional', '&:out-of-range', '&:paused', '&:picture-in-picture', '&:placeholder-shown', '&:playing', '&:read-only', '&:read-write', '&:required', '&:right', '&:target', '&:user-invalid', '&:user-valid', '&:valid', '&:visited', '&::after', '&::backdrop', '&::before', '&::cue', '&::cue-region', '&::first-letter', '&::first-line', '&::grammar-error', '&::marker', '&::placeholder', '&::selection', '&::spelling-error', '&::target-text', '&::view-transition', '&::-webkit-details-marker'];
17
17
  var allowedPseudos = exports.allowedPseudos = new Set(
18
18
  /**
19
19
  * The `&` is included above for type checking reasons,
@@ -84,15 +84,7 @@ var rule = (0, _createRuleWithTypedConfig.createLintRuleWithTypedConfig)({
84
84
  }
85
85
  });
86
86
  },
87
- CallExpression: function (_CallExpression) {
88
- function CallExpression(_x) {
89
- return _CallExpression.apply(this, arguments);
90
- }
91
- CallExpression.toString = function () {
92
- return _CallExpression.toString();
93
- };
94
- return CallExpression;
95
- }(function (node) {
87
+ CallExpression: function CallExpression(node) {
96
88
  var _context$getScope = context.getScope(),
97
89
  references = _context$getScope.references;
98
90
  var isXcssCall = (0, _isSupportedImport.isXcss)(node, references, config.importSources);
@@ -154,7 +146,7 @@ var rule = (0, _createRuleWithTypedConfig.createLintRuleWithTypedConfig)({
154
146
  });
155
147
  }
156
148
  });
157
- })
149
+ }
158
150
  };
159
151
  }
160
152
  });
@@ -10,9 +10,9 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
10
10
  var _allowedFunctionCalls = require("@atlaskit/eslint-utils/allowed-function-calls");
11
11
  var _findIdentifierNode = require("@atlaskit/eslint-utils/find-identifier-node");
12
12
  var _findVariable = require("@atlaskit/eslint-utils/find-variable");
13
- 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; } } }; }
14
- 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); }
15
- 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; }
13
+ 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; } } }; }
14
+ 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; } }
15
+ 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; }
16
16
  function isReferenceToCssVar(variable) {
17
17
  var definitions = variable.defs;
18
18
  return definitions.every(function (definition) {
@@ -114,15 +114,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
114
114
  })
115
115
  });
116
116
  },
117
- ImportDeclaration: function (_ImportDeclaration) {
118
- function ImportDeclaration(_x) {
119
- return _ImportDeclaration.apply(this, arguments);
120
- }
121
- ImportDeclaration.toString = function () {
122
- return _ImportDeclaration.toString();
123
- };
124
- return ImportDeclaration;
125
- }(function (node) {
117
+ ImportDeclaration: function ImportDeclaration(node) {
126
118
  var importSource = node.source.value;
127
119
  if (!isSupportedImportSource(importSource)) {
128
120
  return;
@@ -168,7 +160,7 @@ var rule = exports.rule = (0, _createRule.createLintRule)({
168
160
  }, fix);
169
161
  })
170
162
  });
171
- })
163
+ }
172
164
  };
173
165
  }
174
166
  });
@@ -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::330ecd53e03bf78708580ddcfb206876>>
3
+ * @codegen <<SignedSource::11d1ce4c1740cea37e5de3ccba44a8f5>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -37,6 +37,11 @@ export default {
37
37
  }],
38
38
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
39
39
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
40
+ }],
41
+ '@compiled/jsx-pragma': ['error', {
42
+ runtime: 'classic',
43
+ onlyRunIfImportingCompiled: true,
44
+ importSources: ['@atlaskit/css']
40
45
  }]
41
46
  }
42
47
  };
@@ -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::330ecd53e03bf78708580ddcfb206876>>
3
+ * @codegen <<SignedSource::11d1ce4c1740cea37e5de3ccba44a8f5>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -37,6 +37,11 @@ export default {
37
37
  }],
38
38
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
39
39
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
40
+ }],
41
+ '@compiled/jsx-pragma': ['error', {
42
+ runtime: 'classic',
43
+ onlyRunIfImportingCompiled: true,
44
+ importSources: ['@atlaskit/css']
40
45
  }]
41
46
  }
42
47
  };
@@ -111,4 +111,20 @@ export const externalRules = [{
111
111
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
112
112
  }
113
113
  }
114
+ }, {
115
+ name: '@compiled/jsx-pragma',
116
+ displayName: 'jsx-pragma',
117
+ isExternal: true,
118
+ docs: {
119
+ description: 'Ensures that the Compiled JSX pragma is set when using Compiled',
120
+ url: getRuleUrl('jsx-pragma'),
121
+ externalUrl: 'https://github.com/atlassian-labs/compiled/tree/master/packages/eslint-plugin/src/rules/jsx-pragma',
122
+ recommended: true,
123
+ severity: 'error',
124
+ pluginConfig: {
125
+ runtime: 'classic',
126
+ onlyRunIfImportingCompiled: true,
127
+ importSources: ['@atlaskit/css']
128
+ }
129
+ }
114
130
  }];
@@ -7,7 +7,7 @@
7
7
  * Exporting this so it isn't considered unused.
8
8
  */
9
9
 
10
- const cssPseudos = ['&:active', '&:autofill', '&:blank', '&:checked', '&:default', '&:defined', '&:disabled', '&:empty', '&:enabled', '&:first', '&:focus', '&:focus-visible', '&:focus-within', '&:fullscreen', '&:hover', '&:in-range', '&:indeterminate', '&:invalid', '&:left', '&:link', '&:local-link', '&:optional', '&:out-of-range', '&:paused', '&:picture-in-picture', '&:placeholder-shown', '&:playing', '&:read-only', '&:read-write', '&:required', '&:right', '&:target', '&:user-invalid', '&:user-valid', '&:valid', '&:visited', '&::after', '&::backdrop', '&::before', '&::cue', '&::cue-region', '&::first-letter', '&::first-line', '&::grammar-error', '&::marker', '&::placeholder', '&::selection', '&::spelling-error', '&::target-text', '&::view-transition'];
10
+ const cssPseudos = ['&:active', '&:autofill', '&:blank', '&:checked', '&:default', '&:defined', '&:disabled', '&:empty', '&:enabled', '&:first', '&:focus', '&:focus-visible', '&:focus-within', '&:fullscreen', '&:hover', '&:in-range', '&:indeterminate', '&:invalid', '&:left', '&:link', '&:local-link', '&:optional', '&:out-of-range', '&:paused', '&:picture-in-picture', '&:placeholder-shown', '&:playing', '&:read-only', '&:read-write', '&:required', '&:right', '&:target', '&:user-invalid', '&:user-valid', '&:valid', '&:visited', '&::after', '&::backdrop', '&::before', '&::cue', '&::cue-region', '&::first-letter', '&::first-line', '&::grammar-error', '&::marker', '&::placeholder', '&::selection', '&::spelling-error', '&::target-text', '&::view-transition', '&::-webkit-details-marker'];
11
11
  export const allowedPseudos = new Set(
12
12
  /**
13
13
  * The `&` is included above for type checking reasons,
@@ -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::330ecd53e03bf78708580ddcfb206876>>
3
+ * @codegen <<SignedSource::11d1ce4c1740cea37e5de3ccba44a8f5>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -37,6 +37,11 @@ export default {
37
37
  }],
38
38
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
39
39
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
40
+ }],
41
+ '@compiled/jsx-pragma': ['error', {
42
+ runtime: 'classic',
43
+ onlyRunIfImportingCompiled: true,
44
+ importSources: ['@atlaskit/css']
40
45
  }]
41
46
  }
42
47
  };
@@ -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::330ecd53e03bf78708580ddcfb206876>>
3
+ * @codegen <<SignedSource::11d1ce4c1740cea37e5de3ccba44a8f5>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -37,6 +37,11 @@ export default {
37
37
  }],
38
38
  '@atlaskit/design-system/no-invalid-css-map': ['error', {
39
39
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
40
+ }],
41
+ '@compiled/jsx-pragma': ['error', {
42
+ runtime: 'classic',
43
+ onlyRunIfImportingCompiled: true,
44
+ importSources: ['@atlaskit/css']
40
45
  }]
41
46
  }
42
47
  };
@@ -1,6 +1,6 @@
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; }
1
+ 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; } } }; }
2
+ 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; } }
3
+ 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; }
4
4
  import { analyze } from 'eslint-scope';
5
5
  import { createLintRule } from '../utils/create-rule';
6
6
  import { isStyledComponents, isEmotion } from '@atlaskit/eslint-utils/is-supported-import';
@@ -379,15 +379,7 @@ export var rule = createLintRule({
379
379
  },
380
380
  create: function create(context) {
381
381
  return {
382
- CallExpression: function (_CallExpression) {
383
- function CallExpression(_x) {
384
- return _CallExpression.apply(this, arguments);
385
- }
386
- CallExpression.toString = function () {
387
- return _CallExpression.toString();
388
- };
389
- return CallExpression;
390
- }(function (node) {
382
+ CallExpression: function CallExpression(node) {
391
383
  var _node$parent, _node$parent2;
392
384
  var references = context.getScope().references;
393
385
 
@@ -413,7 +405,7 @@ export var rule = createLintRule({
413
405
  return;
414
406
  }
415
407
  lintArguments(context, node.arguments);
416
- })
408
+ }
417
409
  };
418
410
  }
419
411
  });
@@ -111,4 +111,20 @@ export var externalRules = [{
111
111
  allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
112
112
  }
113
113
  }
114
+ }, {
115
+ name: '@compiled/jsx-pragma',
116
+ displayName: 'jsx-pragma',
117
+ isExternal: true,
118
+ docs: {
119
+ description: 'Ensures that the Compiled JSX pragma is set when using Compiled',
120
+ url: getRuleUrl('jsx-pragma'),
121
+ externalUrl: 'https://github.com/atlassian-labs/compiled/tree/master/packages/eslint-plugin/src/rules/jsx-pragma',
122
+ recommended: true,
123
+ severity: 'error',
124
+ pluginConfig: {
125
+ runtime: 'classic',
126
+ onlyRunIfImportingCompiled: true,
127
+ importSources: ['@atlaskit/css']
128
+ }
129
+ }
114
130
  }];
@@ -1,6 +1,6 @@
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; }
1
+ 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; } } }; }
2
+ 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; } }
3
+ 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; }
4
4
  import { getImportSources, hasStyleObjectArguments } from '@atlaskit/eslint-utils/is-supported-import';
5
5
  import { createLintRule } from '../utils/create-rule';
6
6
  var schema = [{
@@ -1,6 +1,6 @@
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; }
1
+ 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; } } }; }
2
+ 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; } }
3
+ 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; }
4
4
  import esquery from 'esquery';
5
5
  import { getImportSources, hasStyleObjectArguments } from '@atlaskit/eslint-utils/is-supported-import';
6
6
  import { createLintRule } from '../utils/create-rule';
@@ -1,6 +1,6 @@
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; }
1
+ 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; } } }; }
2
+ 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; } }
3
+ 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; }
4
4
  import { createLintRule } from '../utils/create-rule';
5
5
  var restrictedFileTypes = ['.css', '.less', '.sass', '.scss'];
6
6
  var restrictedImports = {
@@ -67,18 +67,10 @@ export var rule = createLintRule({
67
67
  }
68
68
  }
69
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) {
70
+ ImportDeclaration: function ImportDeclaration(node) {
79
71
  checkFileType(node);
80
72
  checkImports(node);
81
- }),
73
+ },
82
74
  'JSXOpeningElement[name.name="style"]': function JSXOpeningElementNameNameStyle(node) {
83
75
  context.report({
84
76
  node: node,
@@ -1,6 +1,6 @@
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; }
1
+ 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; } } }; }
2
+ 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; } }
3
+ 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; }
4
4
  import esquery from 'esquery';
5
5
  import { hasStyleObjectArguments } from '@atlaskit/eslint-utils/is-supported-import';
6
6
  import { importSources } from '@atlaskit/eslint-utils/schema';
@@ -1,6 +1,6 @@
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; }
1
+ 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; } } }; }
2
+ 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; } }
3
+ 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; }
4
4
  import esquery from 'esquery';
5
5
  import estraverse from 'estraverse';
6
6
  import { getAllowedDynamicKeys, getAllowedFunctionCalls, isAllowListedVariable } from '@atlaskit/eslint-utils/allowed-function-calls';
@@ -15,15 +15,7 @@ export var rule = createLintRule({
15
15
  },
16
16
  create: function create(context) {
17
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) {
18
+ CallExpression: function CallExpression(node) {
27
19
  var references = context.getScope().references;
28
20
  var importSources = getImportSources(context);
29
21
  if (isStyled(node, references, importSources)) {
@@ -32,16 +24,8 @@ export var rule = createLintRule({
32
24
  messageId: 'no-styled'
33
25
  });
34
26
  }
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) {
27
+ },
28
+ MemberExpression: function MemberExpression(node) {
45
29
  var references = context.getScope().references;
46
30
  var importSources = getImportSources(context);
47
31
  if (node.object.type === 'Identifier' && isStyled(node.object, references, importSources)) {
@@ -54,7 +38,7 @@ export var rule = createLintRule({
54
38
  messageId: 'no-styled'
55
39
  });
56
40
  }
57
- })
41
+ }
58
42
  };
59
43
  }
60
44
  });
@@ -7,7 +7,7 @@
7
7
  * Exporting this so it isn't considered unused.
8
8
  */
9
9
 
10
- var cssPseudos = ['&:active', '&:autofill', '&:blank', '&:checked', '&:default', '&:defined', '&:disabled', '&:empty', '&:enabled', '&:first', '&:focus', '&:focus-visible', '&:focus-within', '&:fullscreen', '&:hover', '&:in-range', '&:indeterminate', '&:invalid', '&:left', '&:link', '&:local-link', '&:optional', '&:out-of-range', '&:paused', '&:picture-in-picture', '&:placeholder-shown', '&:playing', '&:read-only', '&:read-write', '&:required', '&:right', '&:target', '&:user-invalid', '&:user-valid', '&:valid', '&:visited', '&::after', '&::backdrop', '&::before', '&::cue', '&::cue-region', '&::first-letter', '&::first-line', '&::grammar-error', '&::marker', '&::placeholder', '&::selection', '&::spelling-error', '&::target-text', '&::view-transition'];
10
+ var cssPseudos = ['&:active', '&:autofill', '&:blank', '&:checked', '&:default', '&:defined', '&:disabled', '&:empty', '&:enabled', '&:first', '&:focus', '&:focus-visible', '&:focus-within', '&:fullscreen', '&:hover', '&:in-range', '&:indeterminate', '&:invalid', '&:left', '&:link', '&:local-link', '&:optional', '&:out-of-range', '&:paused', '&:picture-in-picture', '&:placeholder-shown', '&:playing', '&:read-only', '&:read-write', '&:required', '&:right', '&:target', '&:user-invalid', '&:user-valid', '&:valid', '&:visited', '&::after', '&::backdrop', '&::before', '&::cue', '&::cue-region', '&::first-letter', '&::first-line', '&::grammar-error', '&::marker', '&::placeholder', '&::selection', '&::spelling-error', '&::target-text', '&::view-transition', '&::-webkit-details-marker'];
11
11
  export var allowedPseudos = new Set(
12
12
  /**
13
13
  * The `&` is included above for type checking reasons,
@@ -77,15 +77,7 @@ var rule = createLintRuleWithTypedConfig({
77
77
  }
78
78
  });
79
79
  },
80
- CallExpression: function (_CallExpression) {
81
- function CallExpression(_x) {
82
- return _CallExpression.apply(this, arguments);
83
- }
84
- CallExpression.toString = function () {
85
- return _CallExpression.toString();
86
- };
87
- return CallExpression;
88
- }(function (node) {
80
+ CallExpression: function CallExpression(node) {
89
81
  var _context$getScope = context.getScope(),
90
82
  references = _context$getScope.references;
91
83
  var isXcssCall = isXcss(node, references, config.importSources);
@@ -147,7 +139,7 @@ var rule = createLintRuleWithTypedConfig({
147
139
  });
148
140
  }
149
141
  });
150
- })
142
+ }
151
143
  };
152
144
  }
153
145
  });
@@ -1,8 +1,8 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- 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; } } }; }
4
- 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); }
5
- 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; }
3
+ 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; } } }; }
4
+ 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; } }
5
+ 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; }
6
6
  import { getAllowedDynamicKeys, getAllowedFunctionCalls, isAllowListedVariable } from '@atlaskit/eslint-utils/allowed-function-calls';
7
7
  import { findIdentifierNode } from '@atlaskit/eslint-utils/find-identifier-node';
8
8
  import { findVariable } from '@atlaskit/eslint-utils/find-variable';
@@ -107,15 +107,7 @@ export var rule = createLintRule({
107
107
  })
108
108
  });
109
109
  },
110
- ImportDeclaration: function (_ImportDeclaration) {
111
- function ImportDeclaration(_x) {
112
- return _ImportDeclaration.apply(this, arguments);
113
- }
114
- ImportDeclaration.toString = function () {
115
- return _ImportDeclaration.toString();
116
- };
117
- return ImportDeclaration;
118
- }(function (node) {
110
+ ImportDeclaration: function ImportDeclaration(node) {
119
111
  var importSource = node.source.value;
120
112
  if (!isSupportedImportSource(importSource)) {
121
113
  return;
@@ -161,7 +153,7 @@ export var rule = createLintRule({
161
153
  }, fix);
162
154
  })
163
155
  });
164
- })
156
+ }
165
157
  };
166
158
  }
167
159
  });
@@ -35,6 +35,11 @@ export declare const configs: {
35
35
  '@atlaskit/design-system/no-invalid-css-map': (string | {
36
36
  allowedFunctionCalls: string[][];
37
37
  })[];
38
+ '@compiled/jsx-pragma': (string | {
39
+ runtime: string;
40
+ onlyRunIfImportingCompiled: boolean;
41
+ importSources: string[];
42
+ })[];
38
43
  };
39
44
  };
40
45
  recommended: {
@@ -72,6 +77,11 @@ export declare const configs: {
72
77
  '@atlaskit/design-system/no-invalid-css-map': (string | {
73
78
  allowedFunctionCalls: string[][];
74
79
  })[];
80
+ '@compiled/jsx-pragma': (string | {
81
+ runtime: string;
82
+ onlyRunIfImportingCompiled: boolean;
83
+ importSources: string[];
84
+ })[];
75
85
  };
76
86
  };
77
87
  };
@@ -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::330ecd53e03bf78708580ddcfb206876>>
3
+ * @codegen <<SignedSource::11d1ce4c1740cea37e5de3ccba44a8f5>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -38,6 +38,11 @@ declare const _default: {
38
38
  '@atlaskit/design-system/no-invalid-css-map': (string | {
39
39
  allowedFunctionCalls: string[][];
40
40
  })[];
41
+ '@compiled/jsx-pragma': (string | {
42
+ runtime: string;
43
+ onlyRunIfImportingCompiled: boolean;
44
+ importSources: string[];
45
+ })[];
41
46
  };
42
47
  };
43
48
  export default _default;
@@ -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::330ecd53e03bf78708580ddcfb206876>>
3
+ * @codegen <<SignedSource::11d1ce4c1740cea37e5de3ccba44a8f5>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -38,6 +38,11 @@ declare const _default: {
38
38
  '@atlaskit/design-system/no-invalid-css-map': (string | {
39
39
  allowedFunctionCalls: string[][];
40
40
  })[];
41
+ '@compiled/jsx-pragma': (string | {
42
+ runtime: string;
43
+ onlyRunIfImportingCompiled: boolean;
44
+ importSources: string[];
45
+ })[];
41
46
  };
42
47
  };
43
48
  export default _default;
@@ -13,7 +13,7 @@ type HasAllUnique<Tuple, Union, Seen = never> = Tuple extends readonly [infer He
13
13
  * Exporting this so it isn't considered unused.
14
14
  */
15
15
  export type _ = Validate<HasAllUnique<typeof cssPseudos, CSSPseudos>>;
16
- declare const cssPseudos: readonly ["&:active", "&:autofill", "&:blank", "&:checked", "&:default", "&:defined", "&:disabled", "&:empty", "&:enabled", "&:first", "&:focus", "&:focus-visible", "&:focus-within", "&:fullscreen", "&:hover", "&:in-range", "&:indeterminate", "&:invalid", "&:left", "&:link", "&:local-link", "&:optional", "&:out-of-range", "&:paused", "&:picture-in-picture", "&:placeholder-shown", "&:playing", "&:read-only", "&:read-write", "&:required", "&:right", "&:target", "&:user-invalid", "&:user-valid", "&:valid", "&:visited", "&::after", "&::backdrop", "&::before", "&::cue", "&::cue-region", "&::first-letter", "&::first-line", "&::grammar-error", "&::marker", "&::placeholder", "&::selection", "&::spelling-error", "&::target-text", "&::view-transition"];
16
+ declare const cssPseudos: readonly ["&:active", "&:autofill", "&:blank", "&:checked", "&:default", "&:defined", "&:disabled", "&:empty", "&:enabled", "&:first", "&:focus", "&:focus-visible", "&:focus-within", "&:fullscreen", "&:hover", "&:in-range", "&:indeterminate", "&:invalid", "&:left", "&:link", "&:local-link", "&:optional", "&:out-of-range", "&:paused", "&:picture-in-picture", "&:placeholder-shown", "&:playing", "&:read-only", "&:read-write", "&:required", "&:right", "&:target", "&:user-invalid", "&:user-valid", "&:valid", "&:visited", "&::after", "&::backdrop", "&::before", "&::cue", "&::cue-region", "&::first-letter", "&::first-line", "&::grammar-error", "&::marker", "&::placeholder", "&::selection", "&::spelling-error", "&::target-text", "&::view-transition", "&::-webkit-details-marker"];
17
17
  export declare const allowedPseudos: Set<string>;
18
18
  export declare const legacyPseudoElements: Set<string>;
19
19
  export declare const ignoredAtRules: Set<string>;
@@ -35,6 +35,11 @@ export declare const configs: {
35
35
  '@atlaskit/design-system/no-invalid-css-map': (string | {
36
36
  allowedFunctionCalls: string[][];
37
37
  })[];
38
+ '@compiled/jsx-pragma': (string | {
39
+ runtime: string;
40
+ onlyRunIfImportingCompiled: boolean;
41
+ importSources: string[];
42
+ })[];
38
43
  };
39
44
  };
40
45
  recommended: {
@@ -72,6 +77,11 @@ export declare const configs: {
72
77
  '@atlaskit/design-system/no-invalid-css-map': (string | {
73
78
  allowedFunctionCalls: string[][];
74
79
  })[];
80
+ '@compiled/jsx-pragma': (string | {
81
+ runtime: string;
82
+ onlyRunIfImportingCompiled: boolean;
83
+ importSources: string[];
84
+ })[];
75
85
  };
76
86
  };
77
87
  };
@@ -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::330ecd53e03bf78708580ddcfb206876>>
3
+ * @codegen <<SignedSource::11d1ce4c1740cea37e5de3ccba44a8f5>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -38,6 +38,11 @@ declare const _default: {
38
38
  '@atlaskit/design-system/no-invalid-css-map': (string | {
39
39
  allowedFunctionCalls: string[][];
40
40
  })[];
41
+ '@compiled/jsx-pragma': (string | {
42
+ runtime: string;
43
+ onlyRunIfImportingCompiled: boolean;
44
+ importSources: string[];
45
+ })[];
41
46
  };
42
47
  };
43
48
  export default _default;
@@ -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::330ecd53e03bf78708580ddcfb206876>>
3
+ * @codegen <<SignedSource::11d1ce4c1740cea37e5de3ccba44a8f5>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  declare const _default: {
@@ -38,6 +38,11 @@ declare const _default: {
38
38
  '@atlaskit/design-system/no-invalid-css-map': (string | {
39
39
  allowedFunctionCalls: string[][];
40
40
  })[];
41
+ '@compiled/jsx-pragma': (string | {
42
+ runtime: string;
43
+ onlyRunIfImportingCompiled: boolean;
44
+ importSources: string[];
45
+ })[];
41
46
  };
42
47
  };
43
48
  export default _default;
@@ -76,7 +76,8 @@ declare const cssPseudos: readonly [
76
76
  "&::selection",
77
77
  "&::spelling-error",
78
78
  "&::target-text",
79
- "&::view-transition"
79
+ "&::view-transition",
80
+ "&::-webkit-details-marker"
80
81
  ];
81
82
  export declare const allowedPseudos: Set<string>;
82
83
  export declare const legacyPseudoElements: Set<string>;
package/package.json CHANGED
@@ -1,19 +1,17 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-ui-styling-standard",
3
- "version": "0.19.0",
3
+ "version": "0.20.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",
7
7
  "atlassian": {
8
8
  "team": "Design System Team",
9
- "inPublicMirror": true,
10
- "releaseModel": "continuous",
11
9
  "website": {
12
10
  "name": "UI Styling Standard",
13
11
  "category": "Tooling"
14
12
  },
15
- "productPushConsumption": [
16
- "jira"
13
+ "toolingLabels": [
14
+ "linting"
17
15
  ]
18
16
  },
19
17
  "publishConfig": {
@@ -39,7 +37,7 @@
39
37
  ".": "./src/index.tsx"
40
38
  },
41
39
  "dependencies": {
42
- "@atlaskit/eslint-utils": "^1.6.0",
40
+ "@atlaskit/eslint-utils": "^1.7.0",
43
41
  "@babel/runtime": "^7.0.0",
44
42
  "@typescript-eslint/utils": "^5.48.1",
45
43
  "ajv": "^6.12.6",
@@ -53,14 +51,14 @@
53
51
  },
54
52
  "devDependencies": {
55
53
  "@af/formatting": "*",
56
- "@atlaskit/ds-lib": "^2.3.0",
57
- "@atlaskit/eslint-plugin-design-system": "^10.14.0",
54
+ "@atlaskit/ds-lib": "^3.1.0",
55
+ "@atlaskit/eslint-plugin-design-system": "^10.23.0",
58
56
  "@atlassian/codegen": "*",
59
57
  "@atlassian/ts-loader": "*",
60
- "@compiled/eslint-plugin": "^0.13.6",
58
+ "@compiled/eslint-plugin": "^0.15.0",
61
59
  "@types/eslint": "^8.56.6",
62
60
  "@types/estraverse": "^5.1.7",
63
- "eslint": "^8.49.0",
61
+ "eslint": "^8.57.0",
64
62
  "lodash": "^4.17.21",
65
63
  "typescript": "~5.4.2"
66
64
  },