diff --git a/.eslintrc.json b/.eslintrc.json index d3ee9140cc..244fa2403f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,18 +13,17 @@ "rules": { "linebreak-style": ["error", "unix"], "no-duplicate-imports": "error", + "prefer-spread": "off", + "prefer-rest-params": "off", "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-this-alias": "off", "@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }], "@typescript-eslint/no-empty-interface": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", "eqeqeq": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "prefer-spread": "off", - "prefer-rest-params": "off", - "no-useless-escape": "off", "no-constant-condition": "off", "no-async-promise-executor": "off" } diff --git a/ui/analyse/src/ctrl.ts b/ui/analyse/src/ctrl.ts index 97d34c825a..9201968ce8 100644 --- a/ui/analyse/src/ctrl.ts +++ b/ui/analyse/src/ctrl.ts @@ -351,7 +351,7 @@ export default class AnalyseCtrl { if (this.node.san!.includes('x')) this.sound.capture(); else this.sound.move(); } - if (/\+|\#/.test(this.node.san!)) this.sound.check(); + if (/\+|#/.test(this.node.san!)) this.sound.check(); } this.threatMode(false); this.ceval.stop(); diff --git a/ui/chat/src/enhance.ts b/ui/chat/src/enhance.ts index ac87187fe6..0c8ac028d0 100644 --- a/ui/chat/src/enhance.ts +++ b/ui/chat/src/enhance.ts @@ -31,7 +31,7 @@ function autoLink(html: string) { return html.replace(userPattern, userLinkReplace).replace(linkPattern, linkReplace); } -const movePattern = /\b(\d+)\s*(\.+)\s*(?:[o0-]+[o0]|[NBRQKP\u2654\u2655\u2656\u2657\u2658\u2659]?[a-h]?[1-8]?[x@]?[a-z][1-8](?:=[NBRQK\u2654\u2655\u2656\u2657\u2658\u2659])?)\+?\#?[!\?=]{0,5}/gi; +const movePattern = /\b(\d+)\s*(\.+)\s*(?:[o0-]+[o0]|[NBRQKP\u2654\u2655\u2656\u2657\u2658\u2659]?[a-h]?[1-8]?[x@]?[a-z][1-8](?:=[NBRQK\u2654\u2655\u2656\u2657\u2658\u2659])?)\+?#?[!\?=]{0,5}/gi; function moveReplacer(match: string, turn: number, dots: string) { if (turn < 1 || turn > 200) return match; const ply = turn * 2 - (dots.length > 1 ? 0 : 1); diff --git a/ui/puzzle/src/ctrl.ts b/ui/puzzle/src/ctrl.ts index 61b58f64b6..0f6fe2c726 100644 --- a/ui/puzzle/src/ctrl.ts +++ b/ui/puzzle/src/ctrl.ts @@ -382,7 +382,7 @@ export default function (opts: PuzzleOpts, redraw: Redraw): Controller { if (vm.node.san!.includes('x')) sound.capture(); else sound.move(); } - if (/\+|\#/.test(vm.node.san!)) sound.check(); + if (/\+|#/.test(vm.node.san!)) sound.check(); } threatMode(false); ceval.stop();