lint vendor/*.js

This commit is contained in:
chico 2015-02-20 04:37:45 +03:00
parent ed6d02e1a8
commit 90ce7f67d7
3 changed files with 6 additions and 5 deletions

View File

@ -11,7 +11,6 @@ test/the-files-to-test.generated.js
vendor/fbtransform/syntax.js vendor/fbtransform/syntax.js
vendor/jasmine/ vendor/jasmine/
vendor/jasmine-jsreporter/ vendor/jasmine-jsreporter/
vendor/*.js
# But not in docs/_js/examples/* # But not in docs/_js/examples/*
docs/_js/*.js docs/_js/*.js
docs/js/ docs/js/

View File

@ -8,6 +8,8 @@
*/ */
/* jshint browser: true */ /* jshint browser: true */
/* jslint evil: true */ /* jslint evil: true */
/*eslint-disable no-eval */
/*eslint-disable block-scoped-var */
'use strict'; 'use strict';
@ -141,7 +143,7 @@ function transformCode(code, url, options) {
var source; var source;
if (url == null) { if (url == null) {
source = "Inline JSX script"; source = 'Inline JSX script';
inlineScriptCount++; inlineScriptCount++;
if (inlineScriptCount > 1) { if (inlineScriptCount > 1) {
source += ' (' + inlineScriptCount + ')'; source += ' (' + inlineScriptCount + ')';
@ -202,7 +204,7 @@ function load(url, successCallback, errorCallback) {
successCallback(xhr.responseText); successCallback(xhr.responseText);
} else { } else {
errorCallback(); errorCallback();
throw new Error("Could not load " + url); throw new Error('Could not load ' + url);
} }
} }
}; };
@ -316,7 +318,7 @@ function runScripts() {
// Listen for load event if we're in a browser and then kick off finding and // Listen for load event if we're in a browser and then kick off finding and
// running of scripts. // running of scripts.
if (typeof window !== "undefined" && window !== null) { if (typeof window !== 'undefined' && window !== null) {
headEl = document.getElementsByTagName('head')[0]; headEl = document.getElementsByTagName('head')[0];
dummyAnchor = document.createElement('a'); dummyAnchor = document.createElement('a');

View File

@ -8,7 +8,7 @@
*/ */
'use strict'; 'use strict';
/*eslint-disable no-undef*/
var Buffer = require('buffer').Buffer; var Buffer = require('buffer').Buffer;
function inlineSourceMap(sourceMap, sourceCode, sourceFilename) { function inlineSourceMap(sourceMap, sourceCode, sourceFilename) {