src: lint using putout

This commit is contained in:
coderaiser
2020-10-25 10:05:41 +02:00
parent 99b1a7a49b
commit 246d137c2c
7 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -89,7 +89,7 @@ export class OptionsService implements IOptionsService {
if (!(key in DEFAULT_OPTIONS)) {
throw new Error('No option with key "' + key + '"');
}
if (CONSTRUCTOR_ONLY_OPTIONS.indexOf(key) !== -1) {
if (CONSTRUCTOR_ONLY_OPTIONS.includes(key)) {
throw new Error(`Option "${key}" can only be set in the constructor`);
}
if (this.options[key] === value) {
@@ -123,7 +123,7 @@ export class OptionsService implements IOptionsService {
// already valid numeric value
break;
}
value = FONT_WEIGHT_OPTIONS.indexOf(value) !== -1 ? value : DEFAULT_OPTIONS[key];
value = FONT_WEIGHT_OPTIONS.includes(value) ? value : DEFAULT_OPTIONS[key];
break;
case 'cursorWidth':
value = Math.floor(value);