Skip to content

Commit d1388f7

Browse files
authored
Enable unused variables detection and fix ESLint violations (#150)
Signed-off-by: achour94 <[email protected]>
1 parent f4f47d8 commit d1388f7

File tree

7 files changed

+9
-10
lines changed

7 files changed

+9
-10
lines changed

eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ const projectConfig = [
181181
'@typescript-eslint/consistent-type-definitions': 'off',
182182
'@typescript-eslint/no-empty-object-type': 'off',
183183
'@typescript-eslint/no-shadow': 'off',
184-
'@typescript-eslint/no-unused-vars': 'off',
185184
'@typescript-eslint/no-use-before-define': 'off',
186185
'@typescript-eslint/no-unsafe-function-type': 'off',
187186

src/pages/groups/add-group-dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const AddGroupDialog: FunctionComponent<AddGroupDialogProps> = (props) => {
3636
const addGroup = useCallback(
3737
(group: string) => {
3838
UserAdminSrv.addGroup(group)
39-
.catch((error) =>
39+
.catch((_error) =>
4040
snackError({
4141
headerId: 'groups.table.error.add',
4242
headerValues: {
@@ -85,7 +85,7 @@ const AddGroupDialog: FunctionComponent<AddGroupDialogProps> = (props) => {
8585
name="group"
8686
control={control}
8787
rules={{ required: true, minLength: 1 }}
88-
render={({ field, fieldState, formState }) => (
88+
render={({ field, fieldState }) => (
8989
<TextField
9090
{...field}
9191
autoFocus

src/pages/profiles/add-profile-dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const AddProfileDialog: FunctionComponent<AddProfileDialogProps> = (props) => {
4545
name: name,
4646
};
4747
UserAdminSrv.addProfile(profileData)
48-
.catch((error) =>
48+
.catch((_error) =>
4949
snackError({
5050
headerId: 'profiles.table.error.add',
5151
headerValues: {
@@ -89,7 +89,7 @@ const AddProfileDialog: FunctionComponent<AddProfileDialogProps> = (props) => {
8989
name="name"
9090
control={control}
9191
rules={{ required: true, minLength: 1 }}
92-
render={({ field, fieldState, formState }) => (
92+
render={({ field, fieldState }) => (
9393
<TextField
9494
{...field}
9595
autoFocus

src/pages/users/add-user-dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const AddUserDialog: FunctionComponent<AddUserDialogProps> = (props) => {
4242
const addUser = useCallback(
4343
(id: string) => {
4444
UserAdminSrv.addUser(id)
45-
.catch((error) =>
45+
.catch((_error) =>
4646
snackError({
4747
headerId: 'users.table.error.add',
4848
headerValues: {
@@ -86,7 +86,7 @@ const AddUserDialog: FunctionComponent<AddUserDialogProps> = (props) => {
8686
name="name"
8787
control={control}
8888
rules={{ required: true, minLength: 1 }}
89-
render={({ field, fieldState, formState }) => (
89+
render={({ field, fieldState }) => (
9090
<TextField
9191
{...field}
9292
autoFocus

src/redux/reducer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export const reducer = createReducer<AppState>(initialState, (builder) => {
121121
state.authenticationRouterError = action.authenticationRouterError;
122122
});
123123

124-
builder.addCase(RESET_AUTHENTICATION_ROUTER_ERROR, (state, action: AuthenticationRouterErrorAction) => {
124+
builder.addCase(RESET_AUTHENTICATION_ROUTER_ERROR, (state, _action: AuthenticationRouterErrorAction) => {
125125
state.authenticationRouterError = null;
126126
});
127127

src/utils/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function extractUserSub(user: User | null): Promise<unknown> {
3434
export function parseError(text: string) {
3535
try {
3636
return JSON.parse(text);
37-
} catch (err) {
37+
} catch {
3838
return null;
3939
}
4040
}

src/utils/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import { FilterChangedEvent, GridApi, IRowNode, SelectionChangedEvent } from 'ag-grid-community';
99
import { useCallback, useState } from 'react';
1010

11-
export function useDebugRender(label: string) {
11+
export function useDebugRender(_label: string) {
1212
// uncomment when you want the output in the console
1313
/*if (import.meta.env.DEV) {
1414
label = `${label} render`;

0 commit comments

Comments
 (0)