diff --git a/.eslintrc.json.license b/.eslintrc.json.license deleted file mode 100644 index b253ad42..00000000 --- a/.eslintrc.json.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2024 John Livingston - -SPDX-License-Identifier: AGPL-3.0-only diff --git a/client/.eslintrc.json b/client/.eslintrc.json deleted file mode 100644 index 44bcc71d..00000000 --- a/client/.eslintrc.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "root": true, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint-config-love", - "plugin:lit/recommended" - ], - "globals": {}, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2018, - "project": [ - "./client/tsconfig.json" - ] - }, - "plugins": [ - "@typescript-eslint" - ], - "ignorePatterns": [], - "rules": { - "@typescript-eslint/no-unused-vars": [2, {"argsIgnorePattern": "^_"}], - "@typescript-eslint/no-floating-promises": "error", - "@typescript-eslint/no-misused-promises": "error", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/strict-boolean-expressions": "off", - "@typescript-eslint/return-await": [2, "in-try-catch"], // FIXME: correct? - "@typescript-eslint/no-invalid-void-type": "off", - "@typescript-eslint/triple-slash-reference": "off", - "max-len": [ - "error", - { - "code": 120, - "comments": 120 - } - ], - "no-unused-vars": "off" - } -} diff --git a/client/.eslintrc.json.license b/client/.eslintrc.json.license deleted file mode 100644 index b253ad42..00000000 --- a/client/.eslintrc.json.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2024 John Livingston - -SPDX-License-Identifier: AGPL-3.0-only diff --git a/conversejs/.eslintrc.json b/conversejs/.eslintrc.json deleted file mode 100644 index 710a1196..00000000 --- a/conversejs/.eslintrc.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "root": true, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint-config-love" - ], - "globals": {}, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2018, - "project": [ - "./conversejs/tsconfig.json" - ] - }, - "plugins": [ - "@typescript-eslint" - ], - "ignorePatterns": [], - "rules": { - "@typescript-eslint/no-unused-vars": [2, {"argsIgnorePattern": "^_"}], - "@typescript-eslint/no-floating-promises": "error", - "@typescript-eslint/no-misused-promises": "error", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/strict-boolean-expressions": "off", - "@typescript-eslint/return-await": [2, "in-try-catch"], // FIXME: correct? - "@typescript-eslint/no-invalid-void-type": "off", - "@typescript-eslint/triple-slash-reference": "off", - "max-len": [ - "error", - { - "code": 120, - "comments": 120 - } - ], - "no-unused-vars": "off" -} -} diff --git a/conversejs/.eslintrc.json.license b/conversejs/.eslintrc.json.license deleted file mode 100644 index b253ad42..00000000 --- a/conversejs/.eslintrc.json.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2024 John Livingston - -SPDX-License-Identifier: AGPL-3.0-only diff --git a/eslint.config.mjs b/eslint.config.mjs index 8d402c76..3189e363 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -2,12 +2,6 @@ // // SPDX-License-Identifier: AGPL-3.0-only -// FIXME: -// * lint shared -// * lint conversejs -// * use eslint-plugin-lit -// * delete old .eslintrc.json files - import love from 'eslint-config-love' import eslint from '@eslint/js' import tseslint from 'typescript-eslint' @@ -23,9 +17,7 @@ export default tseslint.config( 'build/', 'vendor/', 'support/documentation', 'support', - 'build-*js', - - 'shared' // FIXME + 'build-*js' ] }, eslint.configs.recommended, @@ -132,7 +124,10 @@ export default tseslint.config( } }, { - files: ['server/**/*.js', 'server/**/*.ts'], // only ts? + files: [ + 'server/**/*.js', 'server/**/*.ts' + // 'shared/**/*.js', 'shared/**/*.ts' // we also inlcude shared files here. + ], languageOptions: { ecmaVersion: 6, globals: { @@ -157,13 +152,15 @@ export default tseslint.config( parserOptions: { ecmaVersion: 2018, project: [ - './server/tsconfig.json', - './client/tsconfig.json' + './server/tsconfig.json' + // './client/tsconfig.json' // FIXME: dont really know what is necessary here. ], - projectService: { - allowDefaultProject: 'shared/**/*.ts', - defaultProject: './server/tsconfig.json' - } + // FIXME: how to make projectService work? + projectService: false + // projectService: { + // allowDefaultProject: ['shared/lib/*.js', 'shared/lib/*.ts'], + // defaultProject: './server/tsconfig.json' + // } } } }, diff --git a/server/.eslintrc.json.license b/server/.eslintrc.json.license deleted file mode 100644 index b253ad42..00000000 --- a/server/.eslintrc.json.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2024 John Livingston - -SPDX-License-Identifier: AGPL-3.0-only diff --git a/shared/.eslintrc.json b/shared/.eslintrc.json deleted file mode 100644 index b11dc9f5..00000000 --- a/shared/.eslintrc.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "root": true, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint-config-love" - ], - "globals": {}, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2018, - "project": [ - "./server/tsconfig.json", - "./client/tsconfig.json" - ] - }, - "plugins": [ - "@typescript-eslint" - ], - "ignorePatterns": [], - "rules": { - "@typescript-eslint/no-unused-vars": [2, {"argsIgnorePattern": "^_"}], - "@typescript-eslint/no-floating-promises": "error", - "@typescript-eslint/no-misused-promises": "error", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/strict-boolean-expressions": "off", - "@typescript-eslint/return-await": [2, "in-try-catch"], // FIXME: correct? - "@typescript-eslint/no-invalid-void-type": "off", - "@typescript-eslint/triple-slash-reference": "off", - "max-len": [ - "error", - { - "code": 120, - "comments": 120 - } - ], - "no-unused-vars": "off" - } -} diff --git a/shared/.eslintrc.json.license b/shared/.eslintrc.json.license deleted file mode 100644 index b253ad42..00000000 --- a/shared/.eslintrc.json.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2024 John Livingston - -SPDX-License-Identifier: AGPL-3.0-only diff --git a/shared/lib/video.ts b/shared/lib/video.ts index 7583e72b..253b3a5c 100644 --- a/shared/lib/video.ts +++ b/shared/lib/video.ts @@ -44,7 +44,7 @@ function videoHasWebchat (settings: VideoHasWebchatSettings, video: SharedVideo) if (video.remote) return false } - if (settings['chat-per-live-video'] && video.isLive && video.pluginData && video.pluginData['livechat-active']) { + if (settings['chat-per-live-video'] && video.isLive && video.pluginData?.['livechat-active']) { return true }