diff --git a/.eslintrc.js b/.eslintrc.js index 19395b1df..3b2bf44ec 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -84,6 +84,7 @@ module.exports = { 'lines-between-class-members': 'off', radix: ['error', 'as-needed'], 'max-classes-per-file': 'off', + 'class-methods-use-this': 'off', 'prefer-destructuring': [ 'error', { diff --git a/registry/lib/components/video/player/extend-speed/component.ts b/registry/lib/components/video/player/extend-speed/component.ts index adf92751a..30c516fdb 100644 --- a/registry/lib/components/video/player/extend-speed/component.ts +++ b/registry/lib/components/video/player/extend-speed/component.ts @@ -307,7 +307,6 @@ export class ExtendSpeedComponent extends EntrySpeedComponent { } } - // eslint-disable-next-line class-methods-use-this getSpeedContextMixin({ menuListElement }: SpeedContext): Partial { return { query: (speed: number) => @@ -444,7 +443,6 @@ export class ExtendSpeedComponent extends EntrySpeedComponent { setTimeout(() => this.forceUpdateStyle(value)) } - // eslint-disable-next-line class-methods-use-this protected readonly filterNativeSpeed = () => ({ subscribe, next }: PublishContext) => { diff --git a/src/components/i18n/dom-translator.ts b/src/components/i18n/dom-translator.ts index 9b95f4ec8..57d8c5675 100644 --- a/src/components/i18n/dom-translator.ts +++ b/src/components/i18n/dom-translator.ts @@ -12,15 +12,11 @@ export class Translator { static map: Map static regex: [RegExp, string][] - // eslint-disable-next-line class-methods-use-this protected accepts = (node: Node) => node.nodeType === Node.ELEMENT_NODE - // eslint-disable-next-line class-methods-use-this protected getValue = (node: Node) => node.nodeValue - // eslint-disable-next-line class-methods-use-this protected setValue = (node: Node, value: string) => { node.nodeValue = value } - // eslint-disable-next-line class-methods-use-this protected getElement = (node: Node) => node as Element translate(node: Node) { let value = this.getValue(node) @@ -103,23 +99,17 @@ export class Translator { } } export class TextNodeTranslator extends Translator { - // eslint-disable-next-line class-methods-use-this accepts = (node: Node) => node.nodeType === Node.TEXT_NODE - // eslint-disable-next-line class-methods-use-this getElement = (node: Node) => node.parentElement } export class TitleTranslator extends Translator { - // eslint-disable-next-line class-methods-use-this getValue = (node: Node) => (node as Element).getAttribute('title') - // eslint-disable-next-line class-methods-use-this setValue = (node: Node, value: string) => { ;(node as Element).setAttribute('title', value) } } export class PlaceholderTranslator extends Translator { - // eslint-disable-next-line class-methods-use-this getValue = (node: Node) => (node as Element).getAttribute('placeholder') - // eslint-disable-next-line class-methods-use-this setValue = (node: Node, value: string) => { ;(node as Element).setAttribute('placeholder', value) } diff --git a/src/components/video/player-agent/base.ts b/src/components/video/player-agent/base.ts index 0046002b8..cce5fa52f 100644 --- a/src/components/video/player-agent/base.ts +++ b/src/components/video/player-agent/base.ts @@ -1,4 +1,3 @@ -/* eslint-disable class-methods-use-this */ import { select } from '@/core/spin-query' import { raiseEvent } from '@/core/utils' import { diff --git a/src/components/video/video-info.ts b/src/components/video/video-info.ts index af1bb7400..f8b63cad8 100644 --- a/src/components/video/video-info.ts +++ b/src/components/video/video-info.ts @@ -68,7 +68,6 @@ export class VideoInfo { } /** @deprecated */ - // eslint-disable-next-line class-methods-use-this get subtitles(): { id: number languageCode: string diff --git a/src/core/utils/index.ts b/src/core/utils/index.ts index 5b0683648..b8adab044 100644 --- a/src/core/utils/index.ts +++ b/src/core/utils/index.ts @@ -407,7 +407,6 @@ export class DoubleClickEvent { singleClickHandler: (e: MouseEvent) => void = none private clickedOnce = false - // eslint-disable-next-line class-methods-use-this private readonly stopPropagationHandler = (e: MouseEvent) => { e.stopImmediatePropagation() }