Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit 77e71f8

Browse files
chore: updated eslint and ignored underscrore
1 parent 90a278d commit 77e71f8

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.eslintrc.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,26 @@ module.exports = {
44
// A temporary hack related to IDE not resolving correct package.json
55
'import/no-extraneous-dependencies': 'off',
66
'import/no-unresolved': 'error',
7+
'import/no-cycle': 'off',
8+
'import/prefer-default-export': 'off',
79
// Since React 17 and typescript 4.1 you can safely disable the rule
810
'react/react-in-jsx-scope': 'off',
911
'react/jsx-props-no-spreading': 'off',
10-
'import/no-cycle': 'off',
11-
'@typescript-eslint/no-non-null-assertion': 'off',
1212
'react/require-default-props': [2, { functions: 'defaultArguments' }],
13-
'import/prefer-default-export': 'off',
13+
'@typescript-eslint/no-non-null-assertion': 'off',
1414
'@typescript-eslint/ban-ts-comment': 'off',
15+
'@typescript-eslint/no-unused-vars': [
16+
'error',
17+
{
18+
argsIgnorePattern: '^_',
19+
varsIgnorePattern: '^_',
20+
caughtErrorsIgnorePattern: '^_',
21+
},
22+
],
23+
'@typescript-eslint/naming-convention': [
24+
'error',
25+
{ leadingUnderscore: 'allow' },
26+
],
1527
},
1628
parserOptions: {
1729
ecmaVersion: 2020,

src/renderer/components/Layout/SideMenu.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export default function SideMenu({ openLoginModal }: SideMenuProps) {
107107
navigate('/');
108108
await apolloClient.resetStore();
109109
} catch (err) {
110+
// eslint-disable-next-line no-console
110111
console.log('Error while logging out: ', err);
111112
}
112113
}}

src/renderer/components/ThemeContext/ThemeContext.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ export const ThemeProvider = ({ children }: { children: ReactNode }) => {
4242
// CHAKRA'S THEME
4343
const { setColorMode } = useColorMode();
4444
// USER'S LOCAL THEME PREFERENCE
45-
// @ts-ignore
46-
const [cacheTheme, cacheStorageTheme, hydrateValue] = useLocalStorage(
45+
const [_, cacheStorageTheme, hydrateValue] = useLocalStorage(
4746
CODIGA_THEME,
4847
Theme.THEME_LIGHT
4948
) as [ThemeType, CacheStorageThemeType, () => string];

0 commit comments

Comments
 (0)