From f24ea8d79e2474d5c667d16f568343c5aabc32d2 Mon Sep 17 00:00:00 2001 From: Fran33 Date: Thu, 5 Mar 2020 21:52:59 -0500 Subject: [PATCH] added bra rule to felony check for Interests of Justice If there is a felony charge, and a convicton, and is BRA, then Eligible under Interests of Justice analysis. eslint still does not work for me points out valid unused var, but caching or other prevents a fix --- libs/evaluator.js | 16 ++++++++++++---- package.json | 1 - 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/libs/evaluator.js b/libs/evaluator.js index d92884b..aeecbac 100644 --- a/libs/evaluator.js +++ b/libs/evaluator.js @@ -31,10 +31,18 @@ function determineInterestsOfJustice(caseData, chargeData) { } function determineIoJFelony(caseData, chargeData) { - return { - indicator: null, - message: "Cannot determine Interests of Justice analysis for felonies yet" - }; + if (chargeData.isBRAFelony) { + return { + indicator: "ELIGIBLE", + message: "Eligible under Interests of Justice Analysis" + }; + } else { + return { + indicator: null, + message: + "Cannot determine Interests of Justice analysis for non-BRA felonies yet" + }; + } } function determineIoJMisdemeanor(caseData, chargeData) { diff --git a/package.json b/package.json index d39e76f..18c49be 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ "dev": "next dev", "build": "next build", "start": "next start", - "precommit": "lint-staged", "lint": "./node_modules/.bin/eslint ." }, "dependencies": {