@blumintinc/eslint-plugin-blumint 0.1.6 → 0.1.8

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/lib/index.js CHANGED
@@ -13,7 +13,7 @@ const prefer_type_over_interface_1 = require("./rules/prefer-type-over-interface
13
13
  module.exports = {
14
14
  meta: {
15
15
  name: '@blumintinc/eslint-plugin-blumint',
16
- version: '0.1.5',
16
+ version: '0.1.8',
17
17
  },
18
18
  parseOptions: {
19
19
  ecmaVersion: 2020,
@@ -15,6 +15,11 @@ class ASTHelpers {
15
15
  return false;
16
16
  }
17
17
  switch (node.type) {
18
+ case 'AwaitExpression':
19
+ return this.declarationIncludesIdentifier(node.argument);
20
+ case 'AssignmentExpression':
21
+ return (this.declarationIncludesIdentifier(node.left) ||
22
+ this.declarationIncludesIdentifier(node.right));
18
23
  case 'BlockStatement':
19
24
  return node.body.some((statement) => statement.type === 'BlockStatement' &&
20
25
  ASTHelpers.blockIncludesIdentifier(statement));
@@ -22,6 +27,8 @@ class ASTHelpers {
22
27
  return (this.declarationIncludesIdentifier(node.test) ||
23
28
  this.declarationIncludesIdentifier(node.consequent) ||
24
29
  this.declarationIncludesIdentifier(node.alternate));
30
+ case 'TSTypeAssertion':
31
+ return this.declarationIncludesIdentifier(node.expression);
25
32
  case 'Identifier':
26
33
  return true;
27
34
  case 'SpreadElement':
@@ -63,6 +70,8 @@ class ASTHelpers {
63
70
  return (this.declarationIncludesIdentifier(node.test) ||
64
71
  this.declarationIncludesIdentifier(node.consequent) ||
65
72
  this.declarationIncludesIdentifier(node.alternate));
73
+ case 'TSAsExpression':
74
+ return this.declarationIncludesIdentifier(node.expression);
66
75
  default:
67
76
  return false;
68
77
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blumintinc/eslint-plugin-blumint",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Custom eslint rules for use at BluMint",
5
5
  "keywords": [
6
6
  "eslint",