mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
TSLint: re-enable no-small-switch rule
This commit is contained in:
parent
8716fcaba3
commit
5ae3f501a2
3 changed files with 6 additions and 18 deletions
|
@ -178,12 +178,10 @@ function defaultHintFilter() {
|
|||
}
|
||||
|
||||
function defaultHintChars() {
|
||||
switch (config.get("hintnames")) {
|
||||
case "numeric":
|
||||
if (config.get("hintnames") == "numeric") {
|
||||
return "1234567890"
|
||||
default:
|
||||
return config.get("hintchars")
|
||||
}
|
||||
return config.get("hintchars")
|
||||
}
|
||||
|
||||
/** An infinite stream of hints
|
||||
|
|
|
@ -3909,22 +3909,13 @@ export async function ttsvoices() {
|
|||
*/
|
||||
//#content
|
||||
export async function ttscontrol(action: string) {
|
||||
let ttsAction: TTS.Action = null
|
||||
|
||||
// convert user input to TTS.Action
|
||||
// only pause seems to be working, so only provide access to that
|
||||
// to avoid exposing users to things that won't work
|
||||
switch (action) {
|
||||
case "stop":
|
||||
ttsAction = "stop"
|
||||
break
|
||||
}
|
||||
|
||||
if (ttsAction) {
|
||||
TTS.doAction(ttsAction)
|
||||
} else {
|
||||
if (action != "stop") {
|
||||
throw new Error("Unknown text-to-speech action: " + action)
|
||||
}
|
||||
|
||||
TTS.doAction(action as TTS.Action)
|
||||
}
|
||||
|
||||
//}}}
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
"no-misleading-array-reverse": false,
|
||||
"no-self-assignment": false,
|
||||
"no-shadowed-variable": false,
|
||||
"no-small-switch": false,
|
||||
"no-string-literal": false,
|
||||
"no-string-throw": false,
|
||||
"no-trailing-whitespace": false,
|
||||
|
|
Loading…
Add table
Reference in a new issue