From f1c2af54f8c4ca336e9b54bfec791c30eb9f734a Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Tue, 7 Feb 2017 21:05:46 +0100 Subject: [PATCH] Lint --- bin/cli.js | 2 +- bin/server.js | 4 ++-- package.json | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/cli.js b/bin/cli.js index ab9abac..555fe14 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -71,7 +71,7 @@ if(pathArg === 'demo') { } if (program.theme && program.theme.match(/^http.*css$/)) { - theme = program.theme + theme = program.theme; } else { theme = glob.sync('css/theme/*.css', { cwd: revealPath diff --git a/bin/server.js b/bin/server.js index 55102ec..5baa39d 100644 --- a/bin/server.js +++ b/bin/server.js @@ -55,7 +55,7 @@ var fillOpts = function(options) { // if there is no preprocessor, create a passthu function opts.preprocessor = options.preprocessor ? require( serverBasePath + '/' + options.preprocessor ) - : function(raw_text) { return raw_text }; + : function(raw_text) { return raw_text; }; opts.scripts = {}; options.scripts.forEach(function(script) { @@ -101,7 +101,7 @@ var startMarkdownServer = function(options) { console.log('Make sure to have PhantomJS installed (and in your path).'); exec('phantomjs ' + printPluginPath + ' ' + initialFilePath + '?print-pdf' + ' ' + printFile, function(err, stdout, stderr) { if(err) { - console.log(("[Error with path '" + printFile + "']\n" + stderr + "\n" + err.toString()).red); + console.log(('[Error with path \'' + printFile + '\']\n' + stderr + '\n' + err.toString()).red); } else { console.log(stdout); } diff --git a/package.json b/package.json index d939181..9e278ff 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,9 @@ "bin": { "reveal-md": "bin/cli.js" }, + "scripts": { + "lint": "eslint bin" + }, "dependencies": { "reveal.js": "3.4.1", "express": "4.14.1", @@ -27,5 +30,8 @@ "commander": "2.9.0", "highlight.js": "9.9.0", "yaml-front-matter": "^3.4.0" + }, + "devDependencies": { + "eslint": "^3.15.0" } }