1
0
mirror of https://github.com/bobwen-dev/react-templates synced 2025-04-12 00:56:39 +02:00

eslint fixes

This commit is contained in:
ido 2015-04-05 17:17:10 +03:00
parent 08f6a601f2
commit a90e88582c
5 changed files with 11 additions and 11 deletions

View File

@ -125,13 +125,13 @@
"wrap-iife": 2,
"no-multi-str": 2,
"quote-props": [1, "as-needed"],
"no-multi-spaces": 1,
"key-spacing": [1, { "beforeColon": false, "afterColon": true }],
"comma-spacing": 1,
"space-unary-ops": [1, { "words": true, "nonwords": false }],
"quote-props": [2, "as-needed"],
"no-multi-spaces": 2,
"key-spacing": [2, { "beforeColon": false, "afterColon": true }],
"comma-spacing": 2,
"space-unary-ops": [2, { "words": true, "nonwords": false }],
"indent": [2, 4],
"space-before-function-paren": [1, {"anonymous": "always", "named": "never"}],
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
"react/display-name": 2,
"react/jsx-quotes": 1,

View File

@ -33,7 +33,7 @@ function convertFile(source, target, options, context) {
}
var js;
if (options.modules === 'jsrt') {
js = convertJSRTToJS(html, options)
js = convertJSRTToJS(html, options);
} else {
js = convertTemplateToReact(html, options);
}

View File

@ -56,7 +56,7 @@ function handleSingleFile(currentOptions, filename) {
try {
var sourceExt = path.extname(filename);
var outputFilename;
if (sourceExt == '.rt') {
if (sourceExt === '.rt') {
if (currentOptions.modules !== 'typescript') {
outputFilename = filename + '.js';
} else {
@ -64,7 +64,7 @@ function handleSingleFile(currentOptions, filename) {
}
} else if (sourceExt === '.jsrt'){
outputFilename = filename.replace(/\.jsrt$/, '.js');
currentOptions = _.assign({},currentOptions, {'modules' : 'jsrt'});
currentOptions = _.assign({}, currentOptions, {modules: 'jsrt'});
} else {
context.error('invalid file, only handle rt/jsrt files', filename);
return;