From 56cf61d33d6703081a28cca83bb8d3774c485262 Mon Sep 17 00:00:00 2001 From: Manojava Koushik <111366021+manojava-gk@users.noreply.github.com> Date: Tue, 28 Nov 2023 17:50:16 +0530 Subject: [PATCH] updates(eslint): enable dot-notations rule (#377) --- .eslintrc.json | 1 - CHANGELOG.md | 2 ++ src/components/overlays/AddBPN/index.tsx | 2 +- src/features/apps/marketplaceDeprecated/slice.ts | 7 +++++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index ce64da96c..4bcc2b789 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -43,7 +43,6 @@ "@typescript-eslint/consistent-indexed-object-style": 0, "@typescript-eslint/consistent-type-assertions": 0, "@typescript-eslint/consistent-type-definitions": 0, - "@typescript-eslint/dot-notation": 0, "@typescript-eslint/no-base-to-string": 0, "@typescript-eslint/no-floating-promises": 0, "@typescript-eslint/no-inferrable-types": 0, diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e13b2bc4..f6205fd8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ - Document Hover Effect - Tech User Details - Fix crash issue +- ESLINT + - Enable dot-notation rule - User management - Updated app access management flow - Overlays diff --git a/src/components/overlays/AddBPN/index.tsx b/src/components/overlays/AddBPN/index.tsx index a2dc8bdb5..a472e88b6 100644 --- a/src/components/overlays/AddBPN/index.tsx +++ b/src/components/overlays/AddBPN/index.tsx @@ -83,7 +83,7 @@ export default function AddBPN({ id }: { id: string }) { } const onDeleteBpnHandler = (deleteBpnId: string) => { - const params = { companyUserId: stateSelectorInfo['id'], bpn: deleteBpnId } + const params = { companyUserId: stateSelectorInfo.id, bpn: deleteBpnId } dispatch(deleteUserBpn(params)) } diff --git a/src/features/apps/marketplaceDeprecated/slice.ts b/src/features/apps/marketplaceDeprecated/slice.ts index 50444059d..a531d2942 100644 --- a/src/features/apps/marketplaceDeprecated/slice.ts +++ b/src/features/apps/marketplaceDeprecated/slice.ts @@ -31,6 +31,10 @@ import { } from './types' import { appToCard } from '../mapper' +enum Status { + ACTIVE = 'ACTIVE', +} + export const slice = createSlice({ name, initialState, @@ -114,8 +118,7 @@ export const subscribedAppsSelector = (state: RootState) => return state.apps.marketplace.subscribedApps.find( (app: SubscribedApps) => { return ( - item['id'] === app['appId'] && - app['appSubscriptionStatus'] === 'ACTIVE' + item.id === app.appId && app.appSubscriptionStatus === Status.ACTIVE ) } )