mirror of
https://github.com/radareorg/r2web.git
synced 2026-11-07 06:36:01 -10:00
Configure ESLint to ignore unused variables
Update ESLint configuration to ignore unused variables with specific patterns. Also, enable empty catch blocks and disable strict `any` type and exhaustive `deps` checks for React hooks.
This commit is contained in:
1 parent
0c2e3960f0
commit
cd1b19afb4
2 files changed
+16
-3
No files matched your search
@@ -19,5 +19,18 @@ export default tseslint.config([
|
||||
ecmaVersion: 2020,
|
||||
globals: globals.browser,
|
||||
},
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_',
|
||||
caughtErrorsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
'no-empty': ['error', { allowEmptyCatch: true }],
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'react-hooks/exhaustive-deps': 'off',
|
||||
},
|
||||
},
|
||||
])
|
||||
+3
-3
@@ -146,7 +146,7 @@ export const R2Tab = forwardRef<R2TabHandle, R2TabProps>(({ pkg, file, active },
|
||||
setr2Writer(stdin);
|
||||
|
||||
let cancelController: AbortController | null = null;
|
||||
let history: string[] = [];
|
||||
const history: string[] = [];
|
||||
let historyIndex = -1;
|
||||
let currentInput = '';
|
||||
onDataDisposableRef.current?.dispose();
|
||||
@@ -420,7 +420,7 @@ function showLinkPopup(event: MouseEvent, _text: string) {
|
||||
|
||||
const popupHeight = popup.offsetHeight;
|
||||
if (event.clientY + 25 + popupHeight > container.clientHeight) {
|
||||
let y = event.clientY - 25 - popupHeight;
|
||||
const y = event.clientY - 25 - popupHeight;
|
||||
popup.style.top = (y < 0 ? 0 : y) + 'px';
|
||||
}
|
||||
_linkPopup = popup;
|
||||
@@ -431,4 +431,4 @@ const linkHandler = {
|
||||
hover: showLinkPopup,
|
||||
leave: removeLinkPopup,
|
||||
allowNonHttpProtocols: true
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user