diff --git a/.eslintrc.json b/.eslintrc.json index 25e181c..c3e08d9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,13 +23,23 @@ , "no-prototype-builtins": "off" , "no-async-promise-executor": "off" , "semi": [ "error", "always"] - , "comma-dangle": [ "error", "never"] - , "comma-style": [ "error", "first"] + , "comma-dangle": [ "error", "never" ] + , "comma-style": [ "error", "first" ] , "no-multiple-empty-lines": [ "error", { "max": 2 }] , "no-console": [ "error", { "allow": [ "info", "error" ] }] - + , "operator-linebreak": [ "error", "after", { + "overrides": { + "?": "before" + , ":": "before" + , "&": "before" + , "|": "before" + , "??": "ignore" + , "&&": "ignore" + , "||": "ignore" + } + }] , "object-curly-spacing": [ "error", "always", { "arraysInObjects": false , "objectsInObjects": false diff --git a/ext/src/senders/media/index.ts b/ext/src/senders/media/index.ts index ad3d5c1..35c6af6 100644 --- a/ext/src/senders/media/index.ts +++ b/ext/src/senders/media/index.ts @@ -117,8 +117,8 @@ function getMedia(opts: InitOptions): Promise { try { // Wait until media server is listening - const { localAddress, mediaPath, subtitlePaths } - = await startMediaServer(mediaTitle, port); + const { localAddress, mediaPath, subtitlePaths } = + await startMediaServer(mediaTitle, port); const baseUrl = new URL(`http://${localAddress}:${port}/`); mediaUrl = new URL(mediaPath, baseUrl); diff --git a/ext/src/shim/cast/classes/Session.ts b/ext/src/shim/cast/classes/Session.ts index 3f3b937..20e46b0 100755 --- a/ext/src/shim/cast/classes/Session.ts +++ b/ext/src/shim/cast/classes/Session.ts @@ -174,8 +174,8 @@ export default class Session { case "shim:session/impl_stop": { const { stopId, error } = message.data; - const [ successCallback, errorCallback ] - = this.#stopCallbacks.get(stopId) ?? []; + const [ successCallback, errorCallback ] = + this.#stopCallbacks.get(stopId) ?? []; // Disconnect from extension messages this.#listener.disconnect(); diff --git a/ext/src/shim/cast/media/classes/Media.ts b/ext/src/shim/cast/media/classes/Media.ts index 3dda863..7e98017 100644 --- a/ext/src/shim/cast/media/classes/Media.ts +++ b/ext/src/shim/cast/media/classes/Media.ts @@ -83,8 +83,8 @@ export default class Media { case "shim:media/sendMediaMessageResponse": { const { messageId, error } = message.data; - const [ successCallback, errorCallback ] - = this.#sendMediaMessageCallbacks + const [ successCallback, errorCallback ] = + this.#sendMediaMessageCallbacks .get(messageId) ?? []; if (error && errorCallback) { diff --git a/ext/src/ui/options/Bridge.tsx b/ext/src/ui/options/Bridge.tsx index c728053..31de84f 100644 --- a/ext/src/ui/options/Bridge.tsx +++ b/ext/src/ui/options/Bridge.tsx @@ -96,8 +96,8 @@ export default class Bridge extends Component { } public render() { - const [ backupMessageStart, backupMessageEnd ] - = _("optionsBridgeBackupEnabled", "\0").split("\0"); + const [ backupMessageStart, backupMessageEnd ] = + _("optionsBridgeBackupEnabled", "\0").split("\0"); return (