aboutsummaryrefslogtreecommitdiff
path: root/editor/example.ts
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-10-24 03:41:47 +0700
committerShulhan <ms@kilabit.info>2023-10-24 22:28:25 +0700
commit85c3fc0431e7e75a41894d4669f6a46bbda5440b (patch)
tree15b73a82e9eaaa9ac9f2558578c8d7610ad392cd /editor/example.ts
parent891a860299ac76739d59f46280cbed63ff07743e (diff)
downloadpakakeh.ts-85c3fc0431e7e75a41894d4669f6a46bbda5440b.tar.xz
all: fix all linter warnings from tsc and eslint
In this changes we introduce eslint as our linter for TypeScript and update our tsconfig to be more strict. The ".eslintrc.yaml" and "tsconfig.json" is taken from golang/website repository [1]. [1]: https://cs.opensource.google/go/x/website
Diffstat (limited to 'editor/example.ts')
-rw-r--r--editor/example.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/example.ts b/editor/example.ts
index 19bc0b9..a967045 100644
--- a/editor/example.ts
+++ b/editor/example.ts
@@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: 2019 M. Shulhan <ms@kilabit.info>
// SPDX-License-Identifier: GPL-3.0-or-later
-import { WuiEditor, WuiEditorOptions } from "./editor.js";
+import { WuiEditor } from "./editor.js";
import { WuiVfsNodeInterface } from "../vfs/vfs.js";
-let nodeFile: WuiVfsNodeInterface = {
+const nodeFile: WuiVfsNodeInterface = {
name: "Test",
path: "/test",
is_dir: false,
@@ -46,15 +46,15 @@ sudo systemctl status telegraf
`),
};
-let opts = {
+const opts = {
id: "editor",
is_editable: true,
- OnSelection: (begin: number, end: number) => {
+ onSelection: (begin: number, end: number) => {
console.log("OnSelection: ", begin, end);
},
- OnSave: (content: string) => {
+ onSave: (content: string) => {
console.log("OnSave: ", content);
},
};
-let wuiEditor = new WuiEditor(opts);
-wuiEditor.Open(nodeFile);
+const wuiEditor = new WuiEditor(opts);
+wuiEditor.open(nodeFile);