Permalink
Browse files

Fix JSHint issues

  • Loading branch information...
1 parent d504a7c commit 62d5f5c0f76bd4e1fd3a3b2a98c774dfe86c9130 @arthurvr arthurvr committed Sep 30, 2015
Showing with 23 additions and 23 deletions.
  1. +1 −1 script-base.js
  2. +1 −1 test/app-test.js
  3. +3 −3 test/el-test.js
  4. +1 −1 test/seed-test.js
  5. +17 −17 util.js
View
@@ -39,7 +39,7 @@ Generator.prototype.addImportToFile = function (options) {
polymerUtils.rewriteFile({
file: fullPath,
- needle: options.needleHead || "</head>",
+ needle: options.needleHead || '</head>',
splicable: [
'<link rel="import" href="' + options.importUrl + '">'
]
View
@@ -1,4 +1,4 @@
-/*global describe, beforeEach, it*/
+/*global describe, beforeEach, before, it*/
var path = require('path');
var helpers = require('yeoman-generator').test;
View
@@ -1,4 +1,4 @@
-/*global describe, beforeEach, it*/
+/*global describe, beforeEach, it, before*/
var path = require('path');
var fs = require('fs-extra');
@@ -171,7 +171,7 @@ describe('yo polymer:el TDD test', function () {
assert.noFileContent(
'app/test/x-tag-basic.html',
/(describe\()|(before\()|(it\()/ // These words only appear in BDD test. This is a TDD
- )
+ );
});
});
@@ -211,7 +211,7 @@ describe('yo polymer:el BDD test', function () {
assert.noFileContent(
'app/test/x-tag-basic.html',
/(suite\()|(setup\()|(test\()/ // These words only appear in TDD test. This is a BDD
- )
+ );
});
});
View
@@ -1,4 +1,4 @@
-/*global describe, beforeEach, it*/
+/*global describe, beforeEach, before, it*/
var path = require('path');
var helpers = require('yeoman-generator').test;
View
@@ -2,22 +2,6 @@
var path = require('path');
var fs = require('fs');
-
-module.exports = {
- rewrite: rewrite,
- rewriteFile: rewriteFile
-};
-
-function rewriteFile(args) {
- args.path = args.path || process.cwd();
- var fullPath = path.join(args.path, args.file);
-
- args.haystack = fs.readFileSync(fullPath, 'utf8');
- var body = rewrite(args);
-
- fs.writeFileSync(fullPath, body);
-}
-
function escapeRegExp(str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
}
@@ -58,4 +42,20 @@ function rewrite(args) {
.join('\n'));
return lines.join('\n');
-}
+}
+
+
+function rewriteFile(args) {
+ args.path = args.path || process.cwd();
+ var fullPath = path.join(args.path, args.file);
+
+ args.haystack = fs.readFileSync(fullPath, 'utf8');
+ var body = rewrite(args);
+
+ fs.writeFileSync(fullPath, body);
+}
+
+module.exports = {
+ rewrite: rewrite,
+ rewriteFile: rewriteFile
+};

0 comments on commit 62d5f5c

Please sign in to comment.