diff --git a/src/cli.js b/src/cli.js index 3fb9c05..6fb8ab1 100755 --- a/src/cli.js +++ b/src/cli.js @@ -61,7 +61,7 @@ function handleSingleFile(currentOptions, filename) { } else { outputFilename = filename + '.ts'; } - } else if (sourceExt === '.jsrt'){ + } else if (sourceExt === '.jsrt') { outputFilename = filename.replace(/\.jsrt$/, '.js'); currentOptions = _.assign({}, currentOptions, {modules: 'jsrt'}); } else { diff --git a/src/formatters/stylish.js b/src/formatters/stylish.js index 7b448a9..fc04e85 100644 --- a/src/formatters/stylish.js +++ b/src/formatters/stylish.js @@ -27,7 +27,7 @@ var table = require('text-table'); * @returns {string} The original word with an s on the end if count is not one. */ function pluralize(word, count) { - return (count === 1 ? word : word + 's'); + return count === 1 ? word : word + 's'; } //function pluralize(n, single, plural) { diff --git a/src/reactTemplates.js b/src/reactTemplates.js index e2d2713..1781184 100644 --- a/src/reactTemplates.js +++ b/src/reactTemplates.js @@ -293,7 +293,9 @@ function convertHtmlToReact(node, context) { data.scopeMapping[boundParam] = boundParam; }); _.each(node.attribs[scopeProp].split(';'), function (scopePart) { - if (scopePart.trim().length === 0) return; + if (scopePart.trim().length === 0) { + return; + } var scopeSubParts = scopePart.split(' as '); if (scopeSubParts.length < 2) { @@ -351,7 +353,7 @@ function convertHtmlToReact(node, context) { if (node.attribs[templateProp]) { data.repeatFunction = generateInjectedFunc(context, 'repeat' + stringUtils.capitalize(data.item), 'return ' + data.body); data.repeatBinds = ['this'].concat(_.reject(context.boundParams, function (param) { - return (param === data.item || param === data.item + 'Index'); + return param === data.item || param === data.item + 'Index'; })); data.body = repeatTemplate(data); } @@ -364,7 +366,7 @@ function convertHtmlToReact(node, context) { } return data.body; } else if (node.type === 'comment') { - return (commentTemplate(node)); + return commentTemplate(node); } else if (node.type === 'text') { if (node.data.trim()) { return convertText(node, context, node.data); diff --git a/test/src/test.js b/test/src/test.js index dedb989..512b0e6 100644 --- a/test/src/test.js +++ b/test/src/test.js @@ -189,7 +189,7 @@ test('html tests', function (t) { var code = reactTemplates.convertTemplateToReact(html).replace(/\r/g, ''); var defineMap = {'react/addons': React, lodash: _}; //noinspection JSUnusedLocalSymbols - var define = function (requirementsNames, content) { //eslint-disable-line no-unused-vars + var define = function (requirementsNames, content) { //eslint-disable-line no-unused-vars,func-style var requirements = _.map(requirementsNames, function (reqName) { return defineMap[reqName]; });