Skip to content

Commit

Permalink
style: fix eslint warnings
Browse files Browse the repository at this point in the history
Signed-off-by: rare-magma <[email protected]>
  • Loading branch information
rare-magma committed Apr 24, 2024
1 parent d744936 commit 011a023
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 36 deletions.
11 changes: 4 additions & 7 deletions src/context/BudgetContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@ interface BudgetContextInterface {
const BudgetContext = createContext<BudgetContextInterface>({
budget: undefined,
setBudget: (value: Budget | undefined, saveInHistory: boolean) => {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
value;
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
saveInHistory;
},
budgetList: [],
setBudgetList: (value: Budget[] | undefined) => {
value;
},
setBudgetList: (value: Budget[] | undefined) => value,
budgetNameList: [],
setBudgetNameList: (value: SearchOption[] | undefined) => {
value;
},
setBudgetNameList: (value: SearchOption[] | undefined) => value,
revenuePercentage: 0,
past: [undefined],
future: [undefined],
Expand Down Expand Up @@ -151,5 +149,4 @@ function BudgetProvider({ children }: PropsWithChildren) {
);
}

// eslint-disable-next-line react-refresh/only-export-components
export { BudgetProvider, useBudget };
9 changes: 2 additions & 7 deletions src/context/ConfigContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ interface ConfigContextInterface {

const ConfigContext = createContext<ConfigContextInterface>({
intlConfig: { locale: userLang, currency: initialCurrencyCode },
setIntlConfig: (value: IntlConfig) => {
value;
},
setIntlConfig: (value: IntlConfig) => value,
currency: initialCurrencyCode,
setCurrency: (value: string) => {
value;
},
setCurrency: (value: string) => value,
});

function useConfig() {
Expand Down Expand Up @@ -57,5 +53,4 @@ function ConfigProvider({ children }: PropsWithChildren) {
);
}

// eslint-disable-next-line react-refresh/only-export-components
export { ConfigProvider, useConfig };
29 changes: 7 additions & 22 deletions src/context/GeneralContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,19 @@ interface GeneralContextInterface {

const GeneralContext = createContext<GeneralContextInterface>({
needReload: true,
setNeedReload: (value: boolean) => {
value;
},
setNeedReload: (value: boolean) => value,
loadingFromDB: true,
setLoadingFromDB: (value: boolean) => {
value;
},
setLoadingFromDB: (value: boolean) => value,
error: "",
setError: (value: string) => {
value;
},
setError: (value: string) => value,
csvErrors: [],
setCsvErrors: (value: CsvError[]) => {
value;
},
setCsvErrors: (value: CsvError[]) => value,
jsonErrors: [],
setJsonErrors: (value: JsonError[]) => {
value;
},
setJsonErrors: (value: JsonError[]) => value,
showError: false,
setShowError: (value: boolean) => {
value;
},
setShowError: (value: boolean) => value,
notifications: [],
setNotifications: (value: BudgetNotification[]) => {
value;
},
setNotifications: (value: BudgetNotification[]) => value,
});

function useGeneralContext() {
Expand Down Expand Up @@ -144,5 +130,4 @@ function GeneralProvider({ children }: PropsWithChildren) {
);
}

// eslint-disable-next-line react-refresh/only-export-components
export { GeneralProvider, useGeneralContext };

0 comments on commit 011a023

Please sign in to comment.