Skip to content

Commit ca2c1bb

Browse files
committed
Lint fixes
1 parent b84ad6d commit ca2c1bb

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

lib/actionbuilder.js

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -82,56 +82,56 @@ class ActionBuilder {
8282
return this.xml
8383
}
8484

85-
say(text, attributes = {}) {
86-
const params = { ...attributes, text }
85+
say (text, attributes = {}) {
86+
const params = { ...attributes, text }
8787

88-
let validationError
88+
let validationError
8989

90-
const _validateParams = function () {
91-
const errors = []
90+
const _validateParams = function () {
91+
const errors = []
9292

93-
// text validation
94-
if (params.text === undefined || params.text === null || params.text === '') {
95-
errors.push('text can\'t be blank')
96-
} else if (typeof params.text !== 'string') {
97-
errors.push('text must be a string')
98-
}
93+
// text validation
94+
if (params.text === undefined || params.text === null || params.text === '') {
95+
errors.push('text can\'t be blank')
96+
} else if (typeof params.text !== 'string') {
97+
errors.push('text must be a string')
98+
}
9999

100-
// voice validation
101-
if (params.voice !== undefined) {
102-
const choices = ['man', 'woman']
103-
if (!choices.includes(params.voice)) {
104-
errors.push('invalid option')
100+
// voice validation
101+
if (params.voice !== undefined) {
102+
const choices = ['man', 'woman']
103+
if (!choices.includes(params.voice)) {
104+
errors.push('invalid option')
105+
}
105106
}
106-
}
107107

108-
// playBeep validation
109-
if (params.playBeep !== undefined) {
110-
if (typeof params.playBeep !== 'boolean') {
111-
errors.push('invalid option')
108+
// playBeep validation
109+
if (params.playBeep !== undefined) {
110+
if (typeof params.playBeep !== 'boolean') {
111+
errors.push('invalid option')
112+
}
112113
}
113-
}
114114

115-
if (errors.length > 0) {
116-
validationError = new Error(errors.join('; '))
115+
if (errors.length > 0) {
116+
validationError = new Error(errors.join('; '))
117+
}
117118
}
118-
}
119119

120-
_validateParams()
120+
_validateParams()
121121

122-
if (validationError) {
123-
throw validationError
124-
}
122+
if (validationError) {
123+
throw validationError
124+
}
125125

126-
const action = {
127-
tag: 'Say',
128-
text,
129-
attributes
130-
}
126+
const action = {
127+
tag: 'Say',
128+
text,
129+
attributes
130+
}
131131

132-
this.buildAction(action)
133-
return this
134-
}
132+
this.buildAction(action)
133+
return this
134+
}
135135

136136
play (url) {
137137
const attributes = { url }

0 commit comments

Comments
 (0)