You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
Tools: Add prefer-arrow-callbacks to ESlint rules (#7810)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Helper commands added to the the CodeMirror instance
|
||||
export default function useJoplinCommands(CodeMirror: any) {
|
||||
|
||||
CodeMirror.defineExtension('commandExists', function(name: string) {
|
||||
CodeMirror.defineExtension('commandExists', (name: string) => {
|
||||
return !!CodeMirror.commands[name];
|
||||
});
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ export default function useKeymap(CodeMirror: any) {
|
||||
}
|
||||
|
||||
|
||||
CodeMirror.defineExtension('supportsCommand', function(cmd: EditorCommand) {
|
||||
CodeMirror.defineExtension('supportsCommand', (cmd: EditorCommand) => {
|
||||
return isEditorCommand(cmd.name) && editorCommandToCodeMirror(cmd.name) in CodeMirror.commands;
|
||||
});
|
||||
|
||||
|
||||
@@ -674,7 +674,7 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
|
||||
props_onDrop.current(event);
|
||||
});
|
||||
|
||||
editor.on('ObjectResized', function(event: any) {
|
||||
editor.on('ObjectResized', (event: any) => {
|
||||
if (event.target.nodeName === 'IMG') {
|
||||
editor.fire(TinyMceEditorEvents.JoplinChange);
|
||||
dispatchDidUpdate(editor);
|
||||
|
||||
@@ -51,7 +51,7 @@ export default function(editor: any) {
|
||||
editor.execCommand('mceToggleFormat', false, def.name);
|
||||
},
|
||||
onSetup: function(api: any) {
|
||||
editor.formatter.formatChanged(def.name, function(state: boolean) {
|
||||
editor.formatter.formatChanged(def.name, (state: boolean) => {
|
||||
api.setActive(state);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user