diff --git a/eslint.config.js b/eslint.config.js index a1e5a02e2..e2c4547f4 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -5,7 +5,7 @@ export default [ js.configs.recommended, { languageOptions: { - ecmaVersion: 2021, + ecmaVersion: 'latest', sourceType: 'module', globals: { ...globals.browser, @@ -14,7 +14,7 @@ export default [ }, rules: { 'no-console': 'off', - indent: ['error', 4], + indent: ['warn', 4], 'linebreak-style': ['error', 'unix'], quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }], semi: ['error', 'always'], diff --git a/packages/artplayer-plugin-danmuku/src/setting.js b/packages/artplayer-plugin-danmuku/src/setting.js index ccc6b056e..d941b8dc6 100644 --- a/packages/artplayer-plugin-danmuku/src/setting.js +++ b/packages/artplayer-plugin-danmuku/src/setting.js @@ -63,20 +63,22 @@ export default class Setting { art.on('fullscreenWeb', (state) => this.onFullscreen(state)); } - static icons = { - $on, - $off, - $config, - $style, - $mode_0_off, - $mode_0_on, - $mode_1_off, - $mode_1_on, - $mode_2_off, - $mode_2_on, - $check_on, - $check_off, - }; + static get icons() { + return { + $on, + $off, + $config, + $style, + $mode_0_off, + $mode_0_on, + $mode_1_off, + $mode_1_on, + $mode_2_off, + $mode_2_on, + $check_on, + $check_off, + }; + } get option() { return this.danmuku.option;