1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00

Tools: Added eslint radix rule

This commit is contained in:
Laurent Cozic 2020-08-04 22:36:50 +01:00
parent ee2a474611
commit 89864de1ff
2 changed files with 2 additions and 1 deletions

View File

@ -61,6 +61,7 @@ module.exports = {
"import/prefer-default-export": ["error"],
"import/first": ["error"],
"no-array-constructor": ["error"],
"radix": ["error"],
// Checks rules of Hooks
"react-hooks/rules-of-hooks": "error",

View File

@ -3,7 +3,7 @@ export default function useScrollUtils(CodeMirror: any) {
function getScrollHeight(cm: any) {
const info = cm.getScrollInfo();
const overdraw = cm.state.scrollPastEndPadding ? cm.state.scrollPastEndPadding : '0px';
return info.height - info.clientHeight - parseInt(overdraw);
return info.height - info.clientHeight - parseInt(overdraw, 10);
}
CodeMirror.defineExtension('getScrollPercent', function() {