Func style allowing arrow (#461)
* eslint func-style rule added to server * eslint func-style rule added to front-end
This commit is contained in:
@ -46,6 +46,7 @@ module.exports = {
|
|||||||
'simple-import-sort/imports': 'error',
|
'simple-import-sort/imports': 'error',
|
||||||
'simple-import-sort/exports': 'error',
|
'simple-import-sort/exports': 'error',
|
||||||
'twenty/sort-css-properties-alphabetically': 'error',
|
'twenty/sort-css-properties-alphabetically': 'error',
|
||||||
'twenty/no-hardcoded-colors': 'error'
|
'twenty/no-hardcoded-colors': 'error',
|
||||||
|
'func-style':['error', 'declaration', { 'allowArrowFunctions': true }],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -15,7 +15,7 @@ export function useDirectHotkeys(
|
|||||||
) {
|
) {
|
||||||
const [pendingHotkey, setPendingHotkey] = useRecoilState(pendingHotkeyState);
|
const [pendingHotkey, setPendingHotkey] = useRecoilState(pendingHotkeyState);
|
||||||
|
|
||||||
const callbackIfDirectKey = function (
|
function callbackIfDirectKey(
|
||||||
keyboardEvent: KeyboardEvent,
|
keyboardEvent: KeyboardEvent,
|
||||||
hotkeysEvent: Hotkey,
|
hotkeysEvent: Hotkey,
|
||||||
) {
|
) {
|
||||||
@ -24,7 +24,7 @@ export function useDirectHotkeys(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setPendingHotkey(null);
|
setPendingHotkey(null);
|
||||||
};
|
}
|
||||||
|
|
||||||
useHotkeys(keys, callbackIfDirectKey, dependencies);
|
useHotkeys(keys, callbackIfDirectKey, dependencies);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,5 +21,6 @@ module.exports = {
|
|||||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
|
'func-style':['error', 'declaration', { 'allowArrowFunctions': true }],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user