TSLint: re-enable no-small-switch rule

This commit is contained in:
glacambre 2019-04-03 13:49:38 +02:00
parent 8716fcaba3
commit 5ae3f501a2
No known key found for this signature in database
GPG key ID: B9625DB1767553AC
3 changed files with 6 additions and 18 deletions

View file

@ -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

View file

@ -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)
}
//}}}

View file

@ -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,