@atlaskit/eslint-plugin-design-system 10.7.1 → 10.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/eslint-plugin-design-system
2
2
 
3
+ ## 10.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#112386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/112386)
8
+ [`762c18186f898`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/762c18186f898) -
9
+ Internal refactoring to use `context.getSourceCode()` instead of `context.sourceCode` to better
10
+ support older versions of eslint.
11
+
3
12
  ## 10.7.1
4
13
 
5
14
  ### Patch Changes
@@ -18,7 +18,7 @@ function isBlockedBindAll(context, node) {
18
18
  if (callee.name !== 'bindAll') {
19
19
  return false;
20
20
  }
21
- var module = (0, _getImportNodeBySource.getModuleOfIdentifier)(context.sourceCode, 'bindAll');
21
+ var module = (0, _getImportNodeBySource.getModuleOfIdentifier)(context.getSourceCode(), 'bindAll');
22
22
  if ((module === null || module === void 0 ? void 0 : module.moduleName) !== 'bind-event-listener') {
23
23
  return false;
24
24
  }
@@ -18,7 +18,7 @@ function isBlockedBind(context, node) {
18
18
  if (callee.name !== 'bind') {
19
19
  return false;
20
20
  }
21
- var module = (0, _getImportNodeBySource.getModuleOfIdentifier)(context.sourceCode, 'bind');
21
+ var module = (0, _getImportNodeBySource.getModuleOfIdentifier)(context.getSourceCode(), 'bind');
22
22
  if ((module === null || module === void 0 ? void 0 : module.moduleName) !== 'bind-event-listener') {
23
23
  return false;
24
24
  }
@@ -38,7 +38,7 @@ function isOnBoxPrimitive(context, attribute) {
38
38
  if (getJSXElementNameFromAttribute(attribute) !== 'Box') {
39
39
  return false;
40
40
  }
41
- var module = (0, _getImportNodeBySource.getModuleOfIdentifier)(context.sourceCode, 'Box');
41
+ var module = (0, _getImportNodeBySource.getModuleOfIdentifier)(context.getSourceCode(), 'Box');
42
42
  return (module === null || module === void 0 ? void 0 : module.moduleName) === '@atlaskit/primitives';
43
43
  }
44
44
  function isBlockedJSXAttribute(context, node) {
@@ -42,7 +42,7 @@ var CssMapObjectChecker = exports.CssMapObjectChecker = /*#__PURE__*/function ()
42
42
  // }
43
43
  var variable = (0, _findVariable.findVariable)({
44
44
  identifier: value.callee,
45
- sourceCode: this.context.sourceCode
45
+ sourceCode: this.context.getSourceCode()
46
46
  });
47
47
  if (!variable || !(0, _allowedFunctionCalls.isAllowListedVariable)({
48
48
  allowList: this.allowedFunctionCalls,
@@ -69,7 +69,7 @@ var CssMapObjectChecker = exports.CssMapObjectChecker = /*#__PURE__*/function ()
69
69
  } else if (value.type === 'Identifier') {
70
70
  var _variable = (0, _findVariable.findVariable)({
71
71
  identifier: value,
72
- sourceCode: this.context.sourceCode
72
+ sourceCode: this.context.getSourceCode()
73
73
  });
74
74
 
75
75
  // Get the variable's definition when initialised, and check the first definition that we find.
@@ -11,7 +11,7 @@ export function isBlockedBindAll(context, node) {
11
11
  if (callee.name !== 'bindAll') {
12
12
  return false;
13
13
  }
14
- const module = getModuleOfIdentifier(context.sourceCode, 'bindAll');
14
+ const module = getModuleOfIdentifier(context.getSourceCode(), 'bindAll');
15
15
  if ((module === null || module === void 0 ? void 0 : module.moduleName) !== 'bind-event-listener') {
16
16
  return false;
17
17
  }
@@ -11,7 +11,7 @@ export function isBlockedBind(context, node) {
11
11
  if (callee.name !== 'bind') {
12
12
  return false;
13
13
  }
14
- const module = getModuleOfIdentifier(context.sourceCode, 'bind');
14
+ const module = getModuleOfIdentifier(context.getSourceCode(), 'bind');
15
15
  if ((module === null || module === void 0 ? void 0 : module.moduleName) !== 'bind-event-listener') {
16
16
  return false;
17
17
  }
@@ -32,7 +32,7 @@ function isOnBoxPrimitive(context, attribute) {
32
32
  if (getJSXElementNameFromAttribute(attribute) !== 'Box') {
33
33
  return false;
34
34
  }
35
- const module = getModuleOfIdentifier(context.sourceCode, 'Box');
35
+ const module = getModuleOfIdentifier(context.getSourceCode(), 'Box');
36
36
  return (module === null || module === void 0 ? void 0 : module.moduleName) === '@atlaskit/primitives';
37
37
  }
38
38
  export function isBlockedJSXAttribute(context, node) {
@@ -27,7 +27,7 @@ export class CssMapObjectChecker {
27
27
  // }
28
28
  const variable = findVariable({
29
29
  identifier: value.callee,
30
- sourceCode: this.context.sourceCode
30
+ sourceCode: this.context.getSourceCode()
31
31
  });
32
32
  if (!variable || !isAllowListedVariable({
33
33
  allowList: this.allowedFunctionCalls,
@@ -54,7 +54,7 @@ export class CssMapObjectChecker {
54
54
  } else if (value.type === 'Identifier') {
55
55
  const variable = findVariable({
56
56
  identifier: value,
57
- sourceCode: this.context.sourceCode
57
+ sourceCode: this.context.getSourceCode()
58
58
  });
59
59
 
60
60
  // Get the variable's definition when initialised, and check the first definition that we find.
@@ -14,7 +14,7 @@ export function isBlockedBindAll(context, node) {
14
14
  if (callee.name !== 'bindAll') {
15
15
  return false;
16
16
  }
17
- var module = getModuleOfIdentifier(context.sourceCode, 'bindAll');
17
+ var module = getModuleOfIdentifier(context.getSourceCode(), 'bindAll');
18
18
  if ((module === null || module === void 0 ? void 0 : module.moduleName) !== 'bind-event-listener') {
19
19
  return false;
20
20
  }
@@ -14,7 +14,7 @@ export function isBlockedBind(context, node) {
14
14
  if (callee.name !== 'bind') {
15
15
  return false;
16
16
  }
17
- var module = getModuleOfIdentifier(context.sourceCode, 'bind');
17
+ var module = getModuleOfIdentifier(context.getSourceCode(), 'bind');
18
18
  if ((module === null || module === void 0 ? void 0 : module.moduleName) !== 'bind-event-listener') {
19
19
  return false;
20
20
  }
@@ -32,7 +32,7 @@ function isOnBoxPrimitive(context, attribute) {
32
32
  if (getJSXElementNameFromAttribute(attribute) !== 'Box') {
33
33
  return false;
34
34
  }
35
- var module = getModuleOfIdentifier(context.sourceCode, 'Box');
35
+ var module = getModuleOfIdentifier(context.getSourceCode(), 'Box');
36
36
  return (module === null || module === void 0 ? void 0 : module.moduleName) === '@atlaskit/primitives';
37
37
  }
38
38
  export function isBlockedJSXAttribute(context, node) {
@@ -35,7 +35,7 @@ export var CssMapObjectChecker = /*#__PURE__*/function () {
35
35
  // }
36
36
  var variable = findVariable({
37
37
  identifier: value.callee,
38
- sourceCode: this.context.sourceCode
38
+ sourceCode: this.context.getSourceCode()
39
39
  });
40
40
  if (!variable || !isAllowListedVariable({
41
41
  allowList: this.allowedFunctionCalls,
@@ -62,7 +62,7 @@ export var CssMapObjectChecker = /*#__PURE__*/function () {
62
62
  } else if (value.type === 'Identifier') {
63
63
  var _variable = findVariable({
64
64
  identifier: value,
65
- sourceCode: this.context.sourceCode
65
+ sourceCode: this.context.getSourceCode()
66
66
  });
67
67
 
68
68
  // Get the variable's definition when initialised, and check the first definition that we find.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atlaskit/eslint-plugin-design-system",
3
3
  "description": "The essential plugin for use with the Atlassian Design System.",
4
- "version": "10.7.1",
4
+ "version": "10.7.2",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
7
7
  "publishConfig": {
@@ -10,7 +10,9 @@
10
10
  "atlassian": {
11
11
  "team": "Design System Team",
12
12
  "releaseModel": "continuous",
13
- "productPushConsumption": ["jira"],
13
+ "productPushConsumption": [
14
+ "jira"
15
+ ],
14
16
  "website": {
15
17
  "name": "ESLint plugin",
16
18
  "category": "Tooling"
@@ -24,7 +26,10 @@
24
26
  "types": "dist/types/index.d.ts",
25
27
  "typesVersions": {
26
28
  ">=4.5 <4.9": {
27
- "*": ["dist/types-ts4.5/*", "dist/types-ts4.5/index.d.ts"]
29
+ "*": [
30
+ "dist/types-ts4.5/*",
31
+ "dist/types-ts4.5/index.d.ts"
32
+ ]
28
33
  }
29
34
  },
30
35
  "sideEffects": false,
@@ -50,7 +55,7 @@
50
55
  "devDependencies": {
51
56
  "@af/formatting": "*",
52
57
  "@atlaskit/ds-lib": "^2.3.0",
53
- "@atlaskit/theme": "^12.9.0",
58
+ "@atlaskit/theme": "^12.10.0",
54
59
  "@atlassian/codegen": "*",
55
60
  "@atlassian/eslint-utils": "^0.5.0",
56
61
  "@emotion/react": "^11.7.1",
@@ -81,7 +86,10 @@
81
86
  "dom-events": "use-bind-event-listener",
82
87
  "design-system": "v1",
83
88
  "deprecation": "no-deprecated-imports",
84
- "styling": ["static", "emotion"]
89
+ "styling": [
90
+ "static",
91
+ "emotion"
92
+ ]
85
93
  }
86
94
  },
87
95
  "homepage": "https://atlassian.design/components/eslint-plugin-design-system"