diff --git a/.eslintrc.js b/.eslintrc.js index 2a1d0bc..a881f38 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -11,7 +11,8 @@ module.exports = { "@vue/eslint-config-prettier" ], parserOptions: { - ecmaVersion: 2020 + ecmaVersion: 2020, + project: "tsconfig.json" }, ignorePatterns: ["src/lib"], rules: { @@ -19,7 +20,14 @@ module.exports = { "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", "vue/script-setup-uses-vars": "warn", "vue/no-mutating-props": "off", - "vue/multi-word-component-names": "off" + "vue/multi-word-component-names": "off", + "@typescript-eslint/strict-boolean-expressions": [ + "error", + { + allowNullableObject: true, + allowNullableBoolean: true + } + ] }, globals: { defineProps: "readonly", diff --git a/src/App.vue b/src/App.vue index 05fa7fd..6535b0a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -31,7 +31,7 @@ const theme = computed(() => themes[settings.theme].variables as CSSProperties); const showTPS = toRef(settings, "showTPS"); const gameComponent = computed(() => { - return coerceComponent(jsx(() => <>{gameComponents.map(render)})); + return coerceComponent(jsx(() => (<>{gameComponents.map(render)}))); }); diff --git a/src/components/Info.vue b/src/components/Info.vue index 1da5db1..24a15e8 100644 --- a/src/components/Info.vue +++ b/src/components/Info.vue @@ -80,7 +80,7 @@ const isOpen = ref(false); const timePlayed = computed(() => formatTime(player.timePlayed)); const infoComponent = computed(() => { - return coerceComponent(jsx(() => <>{infoComponents.map(render)})); + return coerceComponent(jsx(() => (<>{infoComponents.map(render)}))); }); defineExpose({ diff --git a/src/components/Modal.vue b/src/components/Modal.vue index 7a3ee19..9fd5f06 100644 --- a/src/components/Modal.vue +++ b/src/components/Modal.vue @@ -40,7 +40,7 @@