@blumintinc/eslint-plugin-blumint 1.1.7 → 1.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
@@ -39,7 +39,7 @@ const enforce_firestore_path_utils_1 = require("./rules/enforce-firestore-path-u
39
39
  module.exports = {
40
40
  meta: {
41
41
  name: '@blumintinc/eslint-plugin-blumint',
42
- version: '1.1.7',
42
+ version: '1.1.8',
43
43
  },
44
44
  parseOptions: {
45
45
  ecmaVersion: 2020,
@@ -48,8 +48,8 @@ exports.classMethodsReadTopToBottom = (0, createRule_1.createRule)({
48
48
  // Fetch the actual AST node corresponding to the name
49
49
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
50
50
  const memberNode = node.body.find((member) => getMemberName(member) === n);
51
- const comments = sourceCode.getCommentsBefore(memberNode);
52
- memberNode.range = comments.length
51
+ const comments = sourceCode.getCommentsBefore(memberNode) || [];
52
+ memberNode.range = comments.length > 0
53
53
  ? [
54
54
  Math.min(memberNode.range[0], Math.min(...comments.map((comment) => comment.range[0]))),
55
55
  Math.max(memberNode.range[1], Math.max(...comments.map((comment) => comment.range[1]))),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blumintinc/eslint-plugin-blumint",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "Custom eslint rules for use within BluMint",
5
5
  "author": {
6
6
  "name": "Brodie McGuire",