angular-eslint-zoneless 1.2.0 → 1.2.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/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { ConfigObject } from "@eslint/core";
2
2
  declare const plugin: {
3
3
  configs: {
4
4
  readonly recommended: ConfigObject<import("@eslint/core").RulesConfig>;
5
- readonly all: ConfigObject<import("@eslint/core").RulesConfig>;
5
+ readonly strict: ConfigObject<import("@eslint/core").RulesConfig>;
6
6
  };
7
7
  meta: {
8
8
  name: string;
package/index.js CHANGED
@@ -61,8 +61,8 @@ const plugin = {
61
61
  get recommended() {
62
62
  return recommended;
63
63
  },
64
- get all() {
65
- return all;
64
+ get strict() {
65
+ return strict;
66
66
  }
67
67
  },
68
68
  meta: { name, version },
@@ -116,7 +116,7 @@ const recommended = {
116
116
  [`${name}/${noZonejsTestingFunctions.ruleName}`]: "error",
117
117
  },
118
118
  };
119
- const all = {
119
+ const strict = {
120
120
  plugins: {
121
121
  [name]: plugin
122
122
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-eslint-zoneless",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Angular zoneless lint rules for ESLint",
5
5
  "keywords": [
6
6
  "angular",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
+ const is_import_identifier_1 = require("../utils/is-import-identifier");
4
5
  exports.ruleName = "no-changedetectorref";
5
6
  const messageId = "noChangedetectorref";
6
7
  exports.ruleDefinition = {
@@ -17,8 +18,9 @@ exports.ruleDefinition = {
17
18
  },
18
19
  create(context) {
19
20
  return {
20
- Identifier(node) {
21
- if (node.name === 'ChangeDetectorRef') {
21
+ "Identifier[name='ChangeDetectorRef']"(node) {
22
+ /* Ignore the import identifier, otherwise the rule reports twice */
23
+ if (!(0, is_import_identifier_1.isImportIdentifier)(node)) {
22
24
  context.report({
23
25
  node,
24
26
  messageId,
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-content-decorator";
6
5
  const messageId = "noContentDecorator";
7
6
  exports.ruleDefinition = {
@@ -19,16 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- Decorator(node) {
23
- if (node.expression.type === utils_1.AST_NODE_TYPES.CallExpression &&
24
- node.expression.callee.type === utils_1.AST_NODE_TYPES.Identifier &&
25
- (node.expression.callee.name === "ContentChild" ||
26
- node.expression.callee.name === "ContentChildren")) {
27
- context.report({
28
- node,
29
- messageId,
30
- });
31
- }
21
+ "Decorator > CallExpression[callee.type='Identifier'][callee.name=/^(ContentChild|ContentChildren)$/]"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
32
26
  },
33
27
  };
34
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  const angular_class_decorator_1 = require("../utils/angular-class-decorator");
6
5
  exports.ruleName = "no-detectchanges-testing";
7
6
  const messageId = "noDetectchangesTesting";
@@ -19,12 +18,10 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- CallExpression(node) {
23
- if (node.callee.type === utils_1.AST_NODE_TYPES.MemberExpression &&
24
- node.callee.property.type === utils_1.AST_NODE_TYPES.Identifier &&
25
- node.callee.property.name === "detectChanges" &&
26
- // Report only in tests, otherwise it will report on `ChangeDetectorRef.detectChanges()`
27
- !(0, angular_class_decorator_1.isInAngularClass)(node, ["Component", "Directive"])) {
21
+ "CallExpression > MemberExpression[property.type='Identifier'][property.name='detectChanges'][computed=false]"(node) {
22
+ if (
23
+ // Report only in tests, otherwise it will report on `ChangeDetectorRef.detectChanges()`
24
+ !(0, angular_class_decorator_1.isInAngularClass)(node, ["Component", "Directive"])) {
28
25
  context.report({
29
26
  node,
30
27
  messageId,
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-eager-change-detection";
6
5
  const messageId = "noEagerChangeDetection";
7
6
  exports.ruleDefinition = {
@@ -19,16 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- MemberExpression(node) {
23
- if (node.object.type === utils_1.AST_NODE_TYPES.Identifier &&
24
- node.object.name === "ChangeDetectionStrategy" &&
25
- node.property.type === utils_1.AST_NODE_TYPES.Identifier &&
26
- (node.property.name === "Eager" || node.property.name === "Default")) {
27
- context.report({
28
- node,
29
- messageId,
30
- });
31
- }
21
+ "MemberExpression[object.type='Identifier'][object.name='ChangeDetectionStrategy'][property.type='Identifier'][property.name=/^(Eager|Default)$/]"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
32
26
  },
33
27
  };
34
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-input-decorator";
6
5
  const messageId = "noInputDecorator";
7
6
  exports.ruleDefinition = {
@@ -19,15 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- Decorator(node) {
23
- if (node.expression.type === utils_1.AST_NODE_TYPES.CallExpression &&
24
- node.expression.callee.type === utils_1.AST_NODE_TYPES.Identifier &&
25
- node.expression.callee.name === "Input") {
26
- context.report({
27
- node,
28
- messageId,
29
- });
30
- }
21
+ "Decorator > CallExpression[callee.type='Identifier'][callee.name='Input']"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
31
26
  },
32
27
  };
33
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-ngaftercontentchecked";
6
5
  const messageId = "noNgaftercontentchecked";
7
6
  exports.ruleDefinition = {
@@ -19,14 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- MethodDefinition(node) {
23
- if (node.key.type === utils_1.AST_NODE_TYPES.Identifier &&
24
- node.key.name === "ngAfterContentChecked") {
25
- context.report({
26
- node,
27
- messageId,
28
- });
29
- }
21
+ "MethodDefinition[key.type='Identifier'][key.name='ngAfterContentChecked']"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
30
26
  },
31
27
  };
32
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-ngaftercontentinit";
6
5
  const messageId = "noNgaftercontentinit";
7
6
  exports.ruleDefinition = {
@@ -19,14 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- MethodDefinition(node) {
23
- if (node.key.type === utils_1.AST_NODE_TYPES.Identifier &&
24
- node.key.name === "ngAfterContentInit") {
25
- context.report({
26
- node,
27
- messageId,
28
- });
29
- }
21
+ "MethodDefinition[key.type='Identifier'][key.name='ngAfterContentInit']"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
30
26
  },
31
27
  };
32
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-ngafterviewchecked";
6
5
  const messageId = "noNgafterviewchecked";
7
6
  exports.ruleDefinition = {
@@ -19,14 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- MethodDefinition(node) {
23
- if (node.key.type === utils_1.AST_NODE_TYPES.Identifier &&
24
- node.key.name === "ngAfterViewChecked") {
25
- context.report({
26
- node,
27
- messageId,
28
- });
29
- }
21
+ "MethodDefinition[key.type='Identifier'][key.name='ngAfterViewChecked']"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
30
26
  },
31
27
  };
32
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-ngafterviewinit";
6
5
  const messageId = "noNgafterviewinit";
7
6
  exports.ruleDefinition = {
@@ -19,14 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- MethodDefinition(node) {
23
- if (node.key.type === utils_1.AST_NODE_TYPES.Identifier &&
24
- node.key.name === "ngAfterViewInit") {
25
- context.report({
26
- node,
27
- messageId,
28
- });
29
- }
21
+ "MethodDefinition[key.type='Identifier'][key.name='ngAfterViewInit']"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
30
26
  },
31
27
  };
32
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-ngdocheck";
6
5
  const messageId = "noNgdocheck";
7
6
  exports.ruleDefinition = {
@@ -19,14 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- MethodDefinition(node) {
23
- if (node.key.type === utils_1.AST_NODE_TYPES.Identifier &&
24
- node.key.name === "ngDoCheck") {
25
- context.report({
26
- node,
27
- messageId,
28
- });
29
- }
21
+ "MethodDefinition[key.type='Identifier'][key.name='ngDoCheck']"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
30
26
  },
31
27
  };
32
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-ngonchanges";
6
5
  const messageId = "noNgonchanges";
7
6
  exports.ruleDefinition = {
@@ -19,14 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- MethodDefinition(node) {
23
- if (node.key.type === utils_1.AST_NODE_TYPES.Identifier &&
24
- node.key.name === "ngOnChanges") {
25
- context.report({
26
- node,
27
- messageId,
28
- });
29
- }
21
+ "MethodDefinition[key.type='Identifier'][key.name='ngOnChanges']"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
30
26
  },
31
27
  };
32
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-ngondestroy";
6
5
  const messageId = "noNgondestroy";
7
6
  exports.ruleDefinition = {
@@ -19,14 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- MethodDefinition(node) {
23
- if (node.key.type === utils_1.AST_NODE_TYPES.Identifier &&
24
- node.key.name === "ngOnDestroy") {
25
- context.report({
26
- node,
27
- messageId,
28
- });
29
- }
21
+ "MethodDefinition[key.type='Identifier'][key.name='ngOnDestroy']"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
30
26
  },
31
27
  };
32
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-ngoninit";
6
5
  const messageId = "noNgoninit";
7
6
  exports.ruleDefinition = {
@@ -19,14 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- MethodDefinition(node) {
23
- if (node.key.type === utils_1.AST_NODE_TYPES.Identifier &&
24
- node.key.name === "ngOnInit") {
25
- context.report({
26
- node,
27
- messageId,
28
- });
29
- }
21
+ "MethodDefinition[key.type='Identifier'][key.name='ngOnInit']"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
30
26
  },
31
27
  };
32
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-ngzone-testing";
6
5
  const messageId = "noNgzoneTesting";
7
6
  exports.ruleDefinition = {
@@ -18,14 +17,11 @@ exports.ruleDefinition = {
18
17
  },
19
18
  create(context) {
20
19
  return {
21
- MemberExpression(node) {
22
- if (node.property.type === utils_1.AST_NODE_TYPES.Identifier &&
23
- node.property.name === "ngZone") {
24
- context.report({
25
- node,
26
- messageId,
27
- });
28
- }
20
+ "MemberExpression[property.type='Identifier'][property.name='ngZone'][computed=false]"(node) {
21
+ context.report({
22
+ node,
23
+ messageId,
24
+ });
29
25
  },
30
26
  };
31
27
  },
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
+ const is_import_identifier_1 = require("../utils/is-import-identifier");
4
5
  exports.ruleName = "no-ngzone";
5
6
  const messageId = "noNgzone";
6
7
  exports.ruleDefinition = {
@@ -18,8 +19,8 @@ exports.ruleDefinition = {
18
19
  },
19
20
  create(context) {
20
21
  return {
21
- Identifier(node) {
22
- if (node.name === 'NgZone') {
22
+ "Identifier[name='NgZone']"(node) {
23
+ if (!(0, is_import_identifier_1.isImportIdentifier)(node)) {
23
24
  context.report({
24
25
  node,
25
26
  messageId,
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-output-decorator";
6
5
  const messageId = "noOutputDecorator";
7
6
  exports.ruleDefinition = {
@@ -19,15 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- Decorator(node) {
23
- if (node.expression.type === utils_1.AST_NODE_TYPES.CallExpression &&
24
- node.expression.callee.type === utils_1.AST_NODE_TYPES.Identifier &&
25
- node.expression.callee.name === "Output") {
26
- context.report({
27
- node,
28
- messageId,
29
- });
30
- }
21
+ "Decorator > CallExpression[callee.type='Identifier'][callee.name='Output']"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
31
26
  },
32
27
  };
33
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-providezonechangedetection";
6
5
  const messageId = "noProvidezonechangedetection";
7
6
  exports.ruleDefinition = {
@@ -19,14 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- CallExpression(node) {
23
- if (node.callee.type === utils_1.AST_NODE_TYPES.Identifier &&
24
- node.callee.name === "provideZoneChangeDetection") {
25
- context.report({
26
- node,
27
- messageId,
28
- });
29
- }
21
+ "CallExpression[callee.type='Identifier'][callee.name='provideZoneChangeDetection']"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
30
26
  },
31
27
  };
32
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  const in_constructor_1 = require("../utils/in-constructor");
6
5
  exports.ruleName = "no-subscribe-in-component-constructor";
7
6
  const messageId = "noSubscribeInComponentConstructor";
@@ -19,11 +18,8 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- CallExpression(node) {
23
- if (node.callee.type === utils_1.AST_NODE_TYPES.MemberExpression &&
24
- node.callee.property.type === utils_1.AST_NODE_TYPES.Identifier &&
25
- node.callee.property.name === 'subscribe' &&
26
- (0, in_constructor_1.isInAngularComponentConstructor)(node)) {
21
+ "CallExpression > MemberExpression[property.type='Identifier'][property.name='subscribe'][computed=false]"(node) {
22
+ if ((0, in_constructor_1.isInAngularComponentConstructor)(node)) {
27
23
  context.report({
28
24
  node,
29
25
  messageId,
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-view-decorator";
6
5
  const messageId = "noViewDecorator";
7
6
  exports.ruleDefinition = {
@@ -19,16 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- Decorator(node) {
23
- if (node.expression.type === utils_1.AST_NODE_TYPES.CallExpression &&
24
- node.expression.callee.type === utils_1.AST_NODE_TYPES.Identifier &&
25
- (node.expression.callee.name === "ViewChild" ||
26
- node.expression.callee.name === "ViewChildren")) {
27
- context.report({
28
- node,
29
- messageId,
30
- });
31
- }
21
+ "Decorator > CallExpression[callee.type='Identifier'][callee.name=/^(ViewChild|ViewChildren)$/]"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
32
26
  },
33
27
  };
34
28
  },
@@ -18,13 +18,11 @@ exports.ruleDefinition = {
18
18
  },
19
19
  create(context) {
20
20
  return {
21
- ImportDeclaration(node) {
22
- if (node.source.value === "zone.js") {
23
- context.report({
24
- node,
25
- messageId,
26
- });
27
- }
21
+ "ImportDeclaration[source.value='zone.js']"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
28
26
  },
29
27
  };
30
28
  },
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleDefinition = exports.ruleName = void 0;
4
- const utils_1 = require("@typescript-eslint/utils");
5
4
  exports.ruleName = "no-zonejs-testing-functions";
6
5
  const messageId = "noZonejsTestingFunctions";
7
6
  exports.ruleDefinition = {
@@ -19,24 +18,11 @@ exports.ruleDefinition = {
19
18
  },
20
19
  create(context) {
21
20
  return {
22
- CallExpression(node) {
23
- if (node.callee.type === utils_1.AST_NODE_TYPES.Identifier) {
24
- const testingFunctions = new Set([
25
- "fakeAsync",
26
- "discardPeriodicTasks",
27
- "flush",
28
- "flushMicrotasks",
29
- "resetFakeAsyncZone",
30
- "tick",
31
- "waitForAsync",
32
- ]);
33
- if (testingFunctions.has(node.callee.name)) {
34
- context.report({
35
- node,
36
- messageId,
37
- });
38
- }
39
- }
21
+ "CallExpression[callee.type='Identifier'][callee.name=/^(fakeAsync|discardPeriodicTasks|flush|flushMicrotasks|resetFakeAsyncZone|tick|waitForAsync)$/]"(node) {
22
+ context.report({
23
+ node,
24
+ messageId,
25
+ });
40
26
  },
41
27
  };
42
28
  },
@@ -0,0 +1,2 @@
1
+ import { type TSESTree } from "@typescript-eslint/utils";
2
+ export declare function isImportIdentifier(node: TSESTree.Identifier): boolean;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isImportIdentifier = isImportIdentifier;
4
+ const utils_1 = require("@typescript-eslint/utils");
5
+ function isImportIdentifier(node) {
6
+ return node.parent.type === utils_1.AST_NODE_TYPES.ImportSpecifier;
7
+ }