eslint-plugin-early-return
Advanced tools
Comparing version 0.0.5 to 0.0.6
import { ESLintUtils, AST_NODE_TYPES } from '@typescript-eslint/utils'; | ||
var version = "0.0.5"; | ||
var version = "0.0.6"; | ||
@@ -9,3 +9,3 @@ const createRule = ESLintUtils.RuleCreator((name)=>`https://github.com/hyoban/eslint-plugin-early-return/blob/main/src/rules/${name}.`); | ||
function isConditionRevertNeedBracket(node) { | ||
return !(node.type === AST_NODE_TYPES.Identifier); | ||
return !(node.type === AST_NODE_TYPES.Identifier || node.type === AST_NODE_TYPES.Literal || node.type === AST_NODE_TYPES.MemberExpression || node.type === AST_NODE_TYPES.CallExpression); | ||
} | ||
@@ -12,0 +12,0 @@ function getIndentation(node) { |
{ | ||
"name": "eslint-plugin-early-return", | ||
"type": "module", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"packageManager": "pnpm@8.15.3", | ||
@@ -6,0 +6,0 @@ "description": "Prefer early return pattern to clean if else statement", |
Sorry, the diff of this file is not supported yet
10515