From 2bc63c99db517b753fc41c8ad2f03f6f0d7a2a68 Mon Sep 17 00:00:00 2001 From: Richard Race <1273965+richrace@users.noreply.github.com> Date: Mon, 22 May 2023 11:32:53 +0100 Subject: [PATCH] Use TypeScript --- .eslintrc.json | 10 +- .prettierrc | 7 + index.html | 2 +- package-lock.json | 2523 ++++++++---------------- package.json | 14 +- src/{arctis_view.js => arctis_view.ts} | 42 +- main.js => src/main.ts | 27 +- src/preload.js | 7 - src/preload.ts | 7 + src/renderer.js | 15 - src/renderer.ts | 15 + src/tray.js | 51 - src/tray.ts | 49 + tsconfig.json | 14 + 14 files changed, 939 insertions(+), 1844 deletions(-) create mode 100644 .prettierrc rename src/{arctis_view.js => arctis_view.ts} (64%) rename main.js => src/main.ts (64%) delete mode 100644 src/preload.js create mode 100644 src/preload.ts delete mode 100644 src/renderer.js create mode 100644 src/renderer.ts delete mode 100644 src/tray.js create mode 100644 src/tray.ts create mode 100644 tsconfig.json diff --git a/.eslintrc.json b/.eslintrc.json index 908f4d5..9d4d0e3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,9 +1,15 @@ { "root": true, "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint", "jest"], - "extends": ["eslint:recommended", "prettier", "plugin:jest/recommended"], + "plugins": ["@typescript-eslint", "jest", "prettier"], + "extends": [ + "plugin:@typescript-eslint/recommended, plugin:prettier/recommended", + "plugin:jest/recommended" + ], "rules": { + "prettier/prettier": "error", + "arrow-body-style": "off", + "prefer-arrow-callback": "off", "semi": "error" } } diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..3228352 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "semi": true, + "printWidth": 100 +} diff --git a/index.html b/index.html index d0c7403..a62c03d 100644 --- a/index.html +++ b/index.html @@ -28,7 +28,7 @@