@atlaskit/eslint-plugin-ui-styling-standard 0.20.1 → 0.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 (37) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/index.codegen.js +45 -10
  3. package/dist/cjs/index.js +22 -1
  4. package/dist/cjs/presets/all-flat.codegen.js +62 -0
  5. package/dist/cjs/presets/all.codegen.js +1 -1
  6. package/dist/cjs/presets/recommended-flat.codegen.js +62 -0
  7. package/dist/cjs/presets/recommended.codegen.js +1 -1
  8. package/dist/cjs/rules/index.codegen.js +4 -3
  9. package/dist/es2019/index.codegen.js +50 -6
  10. package/dist/es2019/index.js +1 -1
  11. package/dist/es2019/presets/all-flat.codegen.js +53 -0
  12. package/dist/es2019/presets/all.codegen.js +1 -1
  13. package/dist/es2019/presets/recommended-flat.codegen.js +53 -0
  14. package/dist/es2019/presets/recommended.codegen.js +1 -1
  15. package/dist/es2019/rules/index.codegen.js +2 -2
  16. package/dist/esm/index.codegen.js +46 -6
  17. package/dist/esm/index.js +1 -1
  18. package/dist/esm/presets/all-flat.codegen.js +53 -0
  19. package/dist/esm/presets/all.codegen.js +1 -1
  20. package/dist/esm/presets/recommended-flat.codegen.js +53 -0
  21. package/dist/esm/presets/recommended.codegen.js +1 -1
  22. package/dist/esm/rules/index.codegen.js +2 -2
  23. package/dist/types/index.codegen.d.ts +430 -81
  24. package/dist/types/index.d.ts +1 -1
  25. package/dist/types/presets/all-flat.codegen.d.ts +53 -0
  26. package/dist/types/presets/all.codegen.d.ts +40 -40
  27. package/dist/types/presets/recommended-flat.codegen.d.ts +53 -0
  28. package/dist/types/presets/recommended.codegen.d.ts +40 -40
  29. package/dist/types/rules/index.codegen.d.ts +1 -2
  30. package/dist/types-ts4.5/index.codegen.d.ts +654 -81
  31. package/dist/types-ts4.5/index.d.ts +1 -1
  32. package/dist/types-ts4.5/presets/all-flat.codegen.d.ts +79 -0
  33. package/dist/types-ts4.5/presets/all.codegen.d.ts +70 -40
  34. package/dist/types-ts4.5/presets/recommended-flat.codegen.d.ts +79 -0
  35. package/dist/types-ts4.5/presets/recommended.codegen.d.ts +70 -40
  36. package/dist/types-ts4.5/rules/index.codegen.d.ts +1 -2
  37. package/package.json +9 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/eslint-plugin-ui-styling-standard
2
2
 
3
+ ## 0.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#157735](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157735)
8
+ [`0138fda541246`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0138fda541246) -
9
+ Adding flat config presets to @atlaskit/eslint-plugin-ui-styling-standard
10
+
3
11
  ## 0.20.1
4
12
 
5
13
  ### Patch Changes
@@ -4,23 +4,58 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.configs = void 0;
7
+ exports.plugin = exports.meta = exports.default = exports.configs = void 0;
8
8
  Object.defineProperty(exports, "rules", {
9
9
  enumerable: true,
10
10
  get: function get() {
11
- return _index.default;
11
+ return _index.rules;
12
12
  }
13
13
  });
14
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
+ var _allFlat = _interopRequireDefault(require("./presets/all-flat.codegen"));
14
16
  var _all = _interopRequireDefault(require("./presets/all.codegen"));
17
+ var _recommendedFlat = _interopRequireDefault(require("./presets/recommended-flat.codegen"));
15
18
  var _recommended = _interopRequireDefault(require("./presets/recommended.codegen"));
16
- var _index = _interopRequireDefault(require("./rules/index.codegen"));
17
- /**
19
+ var _index = require("./rules/index.codegen");
20
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
18
22
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
19
- * @codegen <<SignedSource::aff3fad2b8534fad07ba5f0f1b981a55>>
23
+ * @codegen <<SignedSource::0b2a9d2f41301e40371dbce6d69039df>>
20
24
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
21
25
  */
22
-
23
- var configs = exports.configs = {
24
- all: _all.default,
25
- recommended: _recommended.default
26
- };
26
+ // this uses require because not all node versions this package supports use the same import assertions/attributes
27
+ // eslint-disable-next-line import/no-extraneous-dependencies
28
+ var pkgJson = require('@atlaskit/eslint-plugin-ui-styling-standard/package.json');
29
+ var version = pkgJson.version,
30
+ name = pkgJson.name;
31
+ var plugin = exports.plugin = {
32
+ meta: {
33
+ name: name,
34
+ version: version
35
+ },
36
+ rules: _index.rules,
37
+ // flat configs need to be done like this so they can get a reference to the plugin.
38
+ // see here: https://eslint.org/docs/latest/extend/plugins#configs-in-plugins
39
+ // they cannot use `Object.assign` because it will not work with the getter
40
+ configs: {
41
+ all: _all.default,
42
+ 'flat/all': _objectSpread(_objectSpread({}, _allFlat.default), {}, {
43
+ plugins: _objectSpread(_objectSpread({}, _allFlat.default.plugins), {}, {
44
+ get '@atlaskit/ui-styling-standard'() {
45
+ return plugin;
46
+ }
47
+ })
48
+ }),
49
+ recommended: _recommended.default,
50
+ 'flat/recommended': _objectSpread(_objectSpread({}, _recommendedFlat.default), {}, {
51
+ plugins: _objectSpread(_objectSpread({}, _recommendedFlat.default.plugins), {}, {
52
+ get '@atlaskit/ui-styling-standard'() {
53
+ return plugin;
54
+ }
55
+ })
56
+ })
57
+ }
58
+ };
59
+ var configs = exports.configs = plugin.configs,
60
+ meta = exports.meta = plugin.meta;
61
+ var _default = exports.default = plugin;
package/dist/cjs/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var _typeof = require("@babel/runtime/helpers/typeof");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -9,10 +10,30 @@ Object.defineProperty(exports, "configs", {
9
10
  return _index.configs;
10
11
  }
11
12
  });
13
+ Object.defineProperty(exports, "default", {
14
+ enumerable: true,
15
+ get: function get() {
16
+ return _index.default;
17
+ }
18
+ });
19
+ Object.defineProperty(exports, "meta", {
20
+ enumerable: true,
21
+ get: function get() {
22
+ return _index.meta;
23
+ }
24
+ });
25
+ Object.defineProperty(exports, "plugin", {
26
+ enumerable: true,
27
+ get: function get() {
28
+ return _index.plugin;
29
+ }
30
+ });
12
31
  Object.defineProperty(exports, "rules", {
13
32
  enumerable: true,
14
33
  get: function get() {
15
34
  return _index.rules;
16
35
  }
17
36
  });
18
- var _index = require("./index.codegen");
37
+ var _index = _interopRequireWildcard(require("./index.codegen"));
38
+ 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); }
39
+ 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; }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var atlaskitDesignSystemPlugin = _interopRequireWildcard(require("@atlaskit/eslint-plugin-design-system"));
9
+ var compiledPlugin = _interopRequireWildcard(require("@compiled/eslint-plugin"));
10
+ 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); }
11
+ 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; }
12
+ /**
13
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
14
+ * @codegen <<SignedSource::1cccef68eb9733d840f31dd863aad5ab>>
15
+ * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
16
+ */
17
+ var _default = exports.default = {
18
+ plugins: {
19
+ // NOTE: The reference to this plugin is inserted dynamically while creating the plugin in `index.codegen.tsx`
20
+ '@atlaskit/design-system': atlaskitDesignSystemPlugin,
21
+ '@compiled': compiledPlugin
22
+ },
23
+ rules: {
24
+ '@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
25
+ '@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
26
+ '@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
27
+ '@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
28
+ '@atlaskit/ui-styling-standard/no-array-arguments': 'error',
29
+ '@atlaskit/ui-styling-standard/no-classname-prop': 'error',
30
+ '@atlaskit/ui-styling-standard/no-container-queries': 'error',
31
+ '@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
32
+ '@atlaskit/ui-styling-standard/no-exported-styles': 'error',
33
+ '@atlaskit/ui-styling-standard/no-global-styles': 'error',
34
+ '@atlaskit/ui-styling-standard/no-important-styles': 'error',
35
+ '@atlaskit/ui-styling-standard/no-imported-style-values': 'error',
36
+ '@atlaskit/ui-styling-standard/no-nested-selectors': 'error',
37
+ '@atlaskit/ui-styling-standard/no-styled': 'error',
38
+ '@atlaskit/ui-styling-standard/no-unsafe-selectors': 'error',
39
+ '@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
40
+ '@atlaskit/ui-styling-standard/use-compiled': 'error',
41
+ '@atlaskit/design-system/consistent-css-prop-usage': ['error', {
42
+ excludeReactComponents: true,
43
+ shouldAlwaysCheckXcss: true
44
+ }],
45
+ '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
46
+ '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
47
+ '@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
48
+ '@compiled/no-suppress-xcss': 'error',
49
+ '@compiled/no-js-xcss': 'error',
50
+ '@atlaskit/design-system/no-empty-styled-expression': ['error', {
51
+ importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
52
+ }],
53
+ '@atlaskit/design-system/no-invalid-css-map': ['error', {
54
+ allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
55
+ }],
56
+ '@compiled/jsx-pragma': ['error', {
57
+ runtime: 'classic',
58
+ onlyRunIfImportingCompiled: true,
59
+ importSources: ['@atlaskit/css']
60
+ }]
61
+ }
62
+ };
@@ -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::11d1ce4c1740cea37e5de3ccba44a8f5>>
9
+ * @codegen <<SignedSource::3488c902f0db00c9b39ff91abeff0c91>>
10
10
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
11
11
  */
12
12
  var _default = exports.default = {
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var atlaskitDesignSystemPlugin = _interopRequireWildcard(require("@atlaskit/eslint-plugin-design-system"));
9
+ var compiledPlugin = _interopRequireWildcard(require("@compiled/eslint-plugin"));
10
+ 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); }
11
+ 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; }
12
+ /**
13
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
14
+ * @codegen <<SignedSource::1cccef68eb9733d840f31dd863aad5ab>>
15
+ * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
16
+ */
17
+ var _default = exports.default = {
18
+ plugins: {
19
+ // NOTE: The reference to this plugin is inserted dynamically while creating the plugin in `index.codegen.tsx`
20
+ '@atlaskit/design-system': atlaskitDesignSystemPlugin,
21
+ '@compiled': compiledPlugin
22
+ },
23
+ rules: {
24
+ '@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
25
+ '@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
26
+ '@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
27
+ '@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
28
+ '@atlaskit/ui-styling-standard/no-array-arguments': 'error',
29
+ '@atlaskit/ui-styling-standard/no-classname-prop': 'error',
30
+ '@atlaskit/ui-styling-standard/no-container-queries': 'error',
31
+ '@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
32
+ '@atlaskit/ui-styling-standard/no-exported-styles': 'error',
33
+ '@atlaskit/ui-styling-standard/no-global-styles': 'error',
34
+ '@atlaskit/ui-styling-standard/no-important-styles': 'error',
35
+ '@atlaskit/ui-styling-standard/no-imported-style-values': 'error',
36
+ '@atlaskit/ui-styling-standard/no-nested-selectors': 'error',
37
+ '@atlaskit/ui-styling-standard/no-styled': 'error',
38
+ '@atlaskit/ui-styling-standard/no-unsafe-selectors': 'error',
39
+ '@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
40
+ '@atlaskit/ui-styling-standard/use-compiled': 'error',
41
+ '@atlaskit/design-system/consistent-css-prop-usage': ['error', {
42
+ excludeReactComponents: true,
43
+ shouldAlwaysCheckXcss: true
44
+ }],
45
+ '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
46
+ '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
47
+ '@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
48
+ '@compiled/no-suppress-xcss': 'error',
49
+ '@compiled/no-js-xcss': 'error',
50
+ '@atlaskit/design-system/no-empty-styled-expression': ['error', {
51
+ importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
52
+ }],
53
+ '@atlaskit/design-system/no-invalid-css-map': ['error', {
54
+ allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
55
+ }],
56
+ '@compiled/jsx-pragma': ['error', {
57
+ runtime: 'classic',
58
+ onlyRunIfImportingCompiled: true,
59
+ importSources: ['@atlaskit/css']
60
+ }]
61
+ }
62
+ };
@@ -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::11d1ce4c1740cea37e5de3ccba44a8f5>>
9
+ * @codegen <<SignedSource::3488c902f0db00c9b39ff91abeff0c91>>
10
10
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
11
11
  */
12
12
  var _default = exports.default = {
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = void 0;
7
+ exports.rules = void 0;
8
8
  var _atlaskitTheme = _interopRequireDefault(require("./atlaskit-theme"));
9
9
  var _convertPropsSyntax = _interopRequireDefault(require("./convert-props-syntax"));
10
10
  var _enforceStyleProp = _interopRequireDefault(require("./enforce-style-prop"));
@@ -24,10 +24,11 @@ var _noUnsafeValues = _interopRequireDefault(require("./no-unsafe-values"));
24
24
  var _useCompiled = _interopRequireDefault(require("./use-compiled"));
25
25
  /**
26
26
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
27
- * @codegen <<SignedSource::6ad0de2d4bdac726387f27681ad9fcf4>>
27
+ * @codegen <<SignedSource::71ba23a2a1467988c4fae8c2756447f9>>
28
28
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
29
29
  */
30
- var _default = exports.default = {
30
+
31
+ var rules = exports.rules = {
31
32
  'atlaskit-theme': _atlaskitTheme.default,
32
33
  'convert-props-syntax': _convertPropsSyntax.default,
33
34
  'enforce-style-prop': _enforceStyleProp.default,
@@ -1,12 +1,56 @@
1
1
  /**
2
2
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::aff3fad2b8534fad07ba5f0f1b981a55>>
3
+ * @codegen <<SignedSource::0b2a9d2f41301e40371dbce6d69039df>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
+ import allFlat from './presets/all-flat.codegen';
6
7
  import all from './presets/all.codegen';
8
+ import recommendedFlat from './presets/recommended-flat.codegen';
7
9
  import recommended from './presets/recommended.codegen';
8
- export { default as rules } from './rules/index.codegen';
9
- export const configs = {
10
- all,
11
- recommended
12
- };
10
+ import { rules } from './rules/index.codegen';
11
+
12
+ // this uses require because not all node versions this package supports use the same import assertions/attributes
13
+ // eslint-disable-next-line import/no-extraneous-dependencies
14
+ const pkgJson = require('@atlaskit/eslint-plugin-ui-styling-standard/package.json');
15
+ const {
16
+ version,
17
+ name
18
+ } = pkgJson;
19
+ export const plugin = {
20
+ meta: {
21
+ name,
22
+ version
23
+ },
24
+ rules,
25
+ // flat configs need to be done like this so they can get a reference to the plugin.
26
+ // see here: https://eslint.org/docs/latest/extend/plugins#configs-in-plugins
27
+ // they cannot use `Object.assign` because it will not work with the getter
28
+ configs: {
29
+ all,
30
+ 'flat/all': {
31
+ ...allFlat,
32
+ plugins: {
33
+ ...allFlat.plugins,
34
+ get '@atlaskit/ui-styling-standard'() {
35
+ return plugin;
36
+ }
37
+ }
38
+ },
39
+ recommended,
40
+ 'flat/recommended': {
41
+ ...recommendedFlat,
42
+ plugins: {
43
+ ...recommendedFlat.plugins,
44
+ get '@atlaskit/ui-styling-standard'() {
45
+ return plugin;
46
+ }
47
+ }
48
+ }
49
+ }
50
+ };
51
+ export { rules } from './rules/index.codegen';
52
+ export const {
53
+ configs,
54
+ meta
55
+ } = plugin;
56
+ export default plugin;
@@ -1 +1 @@
1
- export { configs, rules } from './index.codegen';
1
+ export { meta, rules, plugin, configs, default } from './index.codegen';
@@ -0,0 +1,53 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ * @codegen <<SignedSource::1cccef68eb9733d840f31dd863aad5ab>>
4
+ * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
+ */
6
+ import * as atlaskitDesignSystemPlugin from '@atlaskit/eslint-plugin-design-system';
7
+ import * as compiledPlugin from '@compiled/eslint-plugin';
8
+ export default {
9
+ plugins: {
10
+ // NOTE: The reference to this plugin is inserted dynamically while creating the plugin in `index.codegen.tsx`
11
+ '@atlaskit/design-system': atlaskitDesignSystemPlugin,
12
+ '@compiled': compiledPlugin
13
+ },
14
+ rules: {
15
+ '@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
16
+ '@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
17
+ '@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
18
+ '@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
19
+ '@atlaskit/ui-styling-standard/no-array-arguments': 'error',
20
+ '@atlaskit/ui-styling-standard/no-classname-prop': 'error',
21
+ '@atlaskit/ui-styling-standard/no-container-queries': 'error',
22
+ '@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
23
+ '@atlaskit/ui-styling-standard/no-exported-styles': 'error',
24
+ '@atlaskit/ui-styling-standard/no-global-styles': 'error',
25
+ '@atlaskit/ui-styling-standard/no-important-styles': 'error',
26
+ '@atlaskit/ui-styling-standard/no-imported-style-values': 'error',
27
+ '@atlaskit/ui-styling-standard/no-nested-selectors': 'error',
28
+ '@atlaskit/ui-styling-standard/no-styled': 'error',
29
+ '@atlaskit/ui-styling-standard/no-unsafe-selectors': 'error',
30
+ '@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
31
+ '@atlaskit/ui-styling-standard/use-compiled': 'error',
32
+ '@atlaskit/design-system/consistent-css-prop-usage': ['error', {
33
+ excludeReactComponents: true,
34
+ shouldAlwaysCheckXcss: true
35
+ }],
36
+ '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
37
+ '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
38
+ '@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
39
+ '@compiled/no-suppress-xcss': 'error',
40
+ '@compiled/no-js-xcss': 'error',
41
+ '@atlaskit/design-system/no-empty-styled-expression': ['error', {
42
+ importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
43
+ }],
44
+ '@atlaskit/design-system/no-invalid-css-map': ['error', {
45
+ allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
46
+ }],
47
+ '@compiled/jsx-pragma': ['error', {
48
+ runtime: 'classic',
49
+ onlyRunIfImportingCompiled: true,
50
+ importSources: ['@atlaskit/css']
51
+ }]
52
+ }
53
+ };
@@ -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::11d1ce4c1740cea37e5de3ccba44a8f5>>
3
+ * @codegen <<SignedSource::3488c902f0db00c9b39ff91abeff0c91>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {
@@ -0,0 +1,53 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ * @codegen <<SignedSource::1cccef68eb9733d840f31dd863aad5ab>>
4
+ * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
+ */
6
+ import * as atlaskitDesignSystemPlugin from '@atlaskit/eslint-plugin-design-system';
7
+ import * as compiledPlugin from '@compiled/eslint-plugin';
8
+ export default {
9
+ plugins: {
10
+ // NOTE: The reference to this plugin is inserted dynamically while creating the plugin in `index.codegen.tsx`
11
+ '@atlaskit/design-system': atlaskitDesignSystemPlugin,
12
+ '@compiled': compiledPlugin
13
+ },
14
+ rules: {
15
+ '@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
16
+ '@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
17
+ '@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
18
+ '@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
19
+ '@atlaskit/ui-styling-standard/no-array-arguments': 'error',
20
+ '@atlaskit/ui-styling-standard/no-classname-prop': 'error',
21
+ '@atlaskit/ui-styling-standard/no-container-queries': 'error',
22
+ '@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
23
+ '@atlaskit/ui-styling-standard/no-exported-styles': 'error',
24
+ '@atlaskit/ui-styling-standard/no-global-styles': 'error',
25
+ '@atlaskit/ui-styling-standard/no-important-styles': 'error',
26
+ '@atlaskit/ui-styling-standard/no-imported-style-values': 'error',
27
+ '@atlaskit/ui-styling-standard/no-nested-selectors': 'error',
28
+ '@atlaskit/ui-styling-standard/no-styled': 'error',
29
+ '@atlaskit/ui-styling-standard/no-unsafe-selectors': 'error',
30
+ '@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
31
+ '@atlaskit/ui-styling-standard/use-compiled': 'error',
32
+ '@atlaskit/design-system/consistent-css-prop-usage': ['error', {
33
+ excludeReactComponents: true,
34
+ shouldAlwaysCheckXcss: true
35
+ }],
36
+ '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
37
+ '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
38
+ '@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
39
+ '@compiled/no-suppress-xcss': 'error',
40
+ '@compiled/no-js-xcss': 'error',
41
+ '@atlaskit/design-system/no-empty-styled-expression': ['error', {
42
+ importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
43
+ }],
44
+ '@atlaskit/design-system/no-invalid-css-map': ['error', {
45
+ allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
46
+ }],
47
+ '@compiled/jsx-pragma': ['error', {
48
+ runtime: 'classic',
49
+ onlyRunIfImportingCompiled: true,
50
+ importSources: ['@atlaskit/css']
51
+ }]
52
+ }
53
+ };
@@ -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::11d1ce4c1740cea37e5de3ccba44a8f5>>
3
+ * @codegen <<SignedSource::3488c902f0db00c9b39ff91abeff0c91>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export 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::6ad0de2d4bdac726387f27681ad9fcf4>>
3
+ * @codegen <<SignedSource::71ba23a2a1467988c4fae8c2756447f9>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  import atlaskitTheme from './atlaskit-theme';
@@ -20,7 +20,7 @@ import noStyled from './no-styled';
20
20
  import noUnsafeSelectors from './no-unsafe-selectors';
21
21
  import noUnsafeValues from './no-unsafe-values';
22
22
  import useCompiled from './use-compiled';
23
- export default {
23
+ export const rules = {
24
24
  'atlaskit-theme': atlaskitTheme,
25
25
  'convert-props-syntax': convertPropsSyntax,
26
26
  'enforce-style-prop': enforceStyleProp,
@@ -1,12 +1,52 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1
4
  /**
2
5
  * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
- * @codegen <<SignedSource::aff3fad2b8534fad07ba5f0f1b981a55>>
6
+ * @codegen <<SignedSource::0b2a9d2f41301e40371dbce6d69039df>>
4
7
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
8
  */
9
+ import allFlat from './presets/all-flat.codegen';
6
10
  import all from './presets/all.codegen';
11
+ import recommendedFlat from './presets/recommended-flat.codegen';
7
12
  import recommended from './presets/recommended.codegen';
8
- export { default as rules } from './rules/index.codegen';
9
- export var configs = {
10
- all: all,
11
- recommended: recommended
12
- };
13
+ import { rules } from './rules/index.codegen';
14
+
15
+ // this uses require because not all node versions this package supports use the same import assertions/attributes
16
+ // eslint-disable-next-line import/no-extraneous-dependencies
17
+ var pkgJson = require('@atlaskit/eslint-plugin-ui-styling-standard/package.json');
18
+ var version = pkgJson.version,
19
+ name = pkgJson.name;
20
+ export var plugin = {
21
+ meta: {
22
+ name: name,
23
+ version: version
24
+ },
25
+ rules: rules,
26
+ // flat configs need to be done like this so they can get a reference to the plugin.
27
+ // see here: https://eslint.org/docs/latest/extend/plugins#configs-in-plugins
28
+ // they cannot use `Object.assign` because it will not work with the getter
29
+ configs: {
30
+ all: all,
31
+ 'flat/all': _objectSpread(_objectSpread({}, allFlat), {}, {
32
+ plugins: _objectSpread(_objectSpread({}, allFlat.plugins), {}, {
33
+ get '@atlaskit/ui-styling-standard'() {
34
+ return plugin;
35
+ }
36
+ })
37
+ }),
38
+ recommended: recommended,
39
+ 'flat/recommended': _objectSpread(_objectSpread({}, recommendedFlat), {}, {
40
+ plugins: _objectSpread(_objectSpread({}, recommendedFlat.plugins), {}, {
41
+ get '@atlaskit/ui-styling-standard'() {
42
+ return plugin;
43
+ }
44
+ })
45
+ })
46
+ }
47
+ };
48
+ export { rules } from './rules/index.codegen';
49
+ var configs = plugin.configs,
50
+ meta = plugin.meta;
51
+ export { configs, meta };
52
+ export default plugin;
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export { configs, rules } from './index.codegen';
1
+ export { meta, rules, plugin, configs, default } from './index.codegen';
@@ -0,0 +1,53 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ * @codegen <<SignedSource::1cccef68eb9733d840f31dd863aad5ab>>
4
+ * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
+ */
6
+ import * as atlaskitDesignSystemPlugin from '@atlaskit/eslint-plugin-design-system';
7
+ import * as compiledPlugin from '@compiled/eslint-plugin';
8
+ export default {
9
+ plugins: {
10
+ // NOTE: The reference to this plugin is inserted dynamically while creating the plugin in `index.codegen.tsx`
11
+ '@atlaskit/design-system': atlaskitDesignSystemPlugin,
12
+ '@compiled': compiledPlugin
13
+ },
14
+ rules: {
15
+ '@atlaskit/ui-styling-standard/atlaskit-theme': 'error',
16
+ '@atlaskit/ui-styling-standard/convert-props-syntax': 'error',
17
+ '@atlaskit/ui-styling-standard/enforce-style-prop': 'error',
18
+ '@atlaskit/ui-styling-standard/local-cx-xcss': 'error',
19
+ '@atlaskit/ui-styling-standard/no-array-arguments': 'error',
20
+ '@atlaskit/ui-styling-standard/no-classname-prop': 'error',
21
+ '@atlaskit/ui-styling-standard/no-container-queries': 'error',
22
+ '@atlaskit/ui-styling-standard/no-dynamic-styles': 'error',
23
+ '@atlaskit/ui-styling-standard/no-exported-styles': 'error',
24
+ '@atlaskit/ui-styling-standard/no-global-styles': 'error',
25
+ '@atlaskit/ui-styling-standard/no-important-styles': 'error',
26
+ '@atlaskit/ui-styling-standard/no-imported-style-values': 'error',
27
+ '@atlaskit/ui-styling-standard/no-nested-selectors': 'error',
28
+ '@atlaskit/ui-styling-standard/no-styled': 'error',
29
+ '@atlaskit/ui-styling-standard/no-unsafe-selectors': 'error',
30
+ '@atlaskit/ui-styling-standard/no-unsafe-values': 'error',
31
+ '@atlaskit/ui-styling-standard/use-compiled': 'error',
32
+ '@atlaskit/design-system/consistent-css-prop-usage': ['error', {
33
+ excludeReactComponents: true,
34
+ shouldAlwaysCheckXcss: true
35
+ }],
36
+ '@atlaskit/design-system/no-css-tagged-template-expression': 'error',
37
+ '@atlaskit/design-system/no-keyframes-tagged-template-expression': 'error',
38
+ '@atlaskit/design-system/no-styled-tagged-template-expression': 'error',
39
+ '@compiled/no-suppress-xcss': 'error',
40
+ '@compiled/no-js-xcss': 'error',
41
+ '@atlaskit/design-system/no-empty-styled-expression': ['error', {
42
+ importSources: ['@compiled/react', '@atlaskit/css', '@emotion/core', '@emotion/react', '@emotion/styled', 'styled-components']
43
+ }],
44
+ '@atlaskit/design-system/no-invalid-css-map': ['error', {
45
+ allowedFunctionCalls: [['@atlaskit/tokens', 'token']]
46
+ }],
47
+ '@compiled/jsx-pragma': ['error', {
48
+ runtime: 'classic',
49
+ onlyRunIfImportingCompiled: true,
50
+ importSources: ['@atlaskit/css']
51
+ }]
52
+ }
53
+ };
@@ -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::11d1ce4c1740cea37e5de3ccba44a8f5>>
3
+ * @codegen <<SignedSource::3488c902f0db00c9b39ff91abeff0c91>>
4
4
  * @codegenCommand yarn workspace @atlaskit/eslint-plugin-ui-styling-standard codegen
5
5
  */
6
6
  export default {