mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add no-useless-constructor eslint rule and fix issues
This commit is contained in:
parent
e9f0a82d8c
commit
bef05ba117
3 changed files with 6 additions and 9 deletions
|
@ -56,6 +56,7 @@ module.exports = {
|
||||||
'no-sequences': ['error', { 'allowInParentheses': false }],
|
'no-sequences': ['error', { 'allowInParentheses': false }],
|
||||||
'no-trailing-spaces': ['error'],
|
'no-trailing-spaces': ['error'],
|
||||||
'@babel/no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true, 'allowTaggedTemplates': true }],
|
'@babel/no-unused-expressions': ['error', { 'allowShortCircuit': true, 'allowTernary': true, 'allowTaggedTemplates': true }],
|
||||||
|
'no-useless-constructor': ['error'],
|
||||||
'no-void': ['error', { 'allowAsStatement': true }],
|
'no-void': ['error', { 'allowAsStatement': true }],
|
||||||
'no-nested-ternary': ['error'],
|
'no-nested-ternary': ['error'],
|
||||||
'one-var': ['error', 'never'],
|
'one-var': ['error', 'never'],
|
||||||
|
@ -256,7 +257,11 @@ module.exports = {
|
||||||
'plugin:react/recommended',
|
'plugin:react/recommended',
|
||||||
'plugin:react-hooks/recommended',
|
'plugin:react-hooks/recommended',
|
||||||
'plugin:jsx-a11y/recommended'
|
'plugin:jsx-a11y/recommended'
|
||||||
]
|
],
|
||||||
|
rules: {
|
||||||
|
'no-useless-constructor': ['off'],
|
||||||
|
'@typescript-eslint/no-useless-constructor': ['error']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,10 +9,6 @@ import TimeSync from './TimeSync';
|
||||||
* Class that manages time syncing with server.
|
* Class that manages time syncing with server.
|
||||||
*/
|
*/
|
||||||
class TimeSyncServer extends TimeSync {
|
class TimeSyncServer extends TimeSync {
|
||||||
constructor(syncPlayManager) {
|
|
||||||
super(syncPlayManager);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes a ping request to the server.
|
* Makes a ping request to the server.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,10 +10,6 @@ import HtmlVideoPlayer from './HtmlVideoPlayer';
|
||||||
*/
|
*/
|
||||||
class HtmlAudioPlayer extends HtmlVideoPlayer {
|
class HtmlAudioPlayer extends HtmlVideoPlayer {
|
||||||
static type = 'htmlaudioplayer';
|
static type = 'htmlaudioplayer';
|
||||||
|
|
||||||
constructor(player, syncPlayManager) {
|
|
||||||
super(player, syncPlayManager);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default HtmlAudioPlayer;
|
export default HtmlAudioPlayer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue