Showing 3 of 3 total issues
Function compileAlexaEvents
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
compileAlexaEvents() {
if (!this.serverless.service.resources.Resources) {
throw new this.serverless.classes
.Error('This plugin needs access to Resources section of the AWS CloudFormation template');
}
Function testBrowser
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function testBrowser() {
// Our testing bundle is made up of our unit tests, which
// should individually load up pieces of our application.
// We also include the browser setup file.
const testFiles = glob.sync('./test/unit/**/*.js');
Avoid deeply nested control flow statements. Open
Open
if (typeof event.alexaSmartHome !== 'string') {
const errorMessage = [
`Alexa Smart Home event of function ${functionName} is not a string`,
' The correct syntax requires your skill\'s application ID from the',
' Alexa Developer Console, example:',