From 35e72ea9f7ed967b6db9367f37c14031239e1c9a Mon Sep 17 00:00:00 2001 From: Will Roberts Date: Fri, 23 Jun 2017 10:21:25 +0200 Subject: [PATCH] js code: fix eslint errors --- {{cookiecutter.app_name}}/.eslintrc | 3 ++- {{cookiecutter.app_name}}/assets/js/main.js | 6 +++--- {{cookiecutter.app_name}}/assets/js/plugins.js | 2 +- {{cookiecutter.app_name}}/assets/js/script.js | 6 ++---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/{{cookiecutter.app_name}}/.eslintrc b/{{cookiecutter.app_name}}/.eslintrc index 6a7d385..1fd76fb 100644 --- a/{{cookiecutter.app_name}}/.eslintrc +++ b/{{cookiecutter.app_name}}/.eslintrc @@ -14,6 +14,7 @@ "node": true }, "globals": { - "__dirname": true + "__dirname": true, + "jQuery": true } } diff --git a/{{cookiecutter.app_name}}/assets/js/main.js b/{{cookiecutter.app_name}}/assets/js/main.js index 6d90fb5..bb66bea 100644 --- a/{{cookiecutter.app_name}}/assets/js/main.js +++ b/{{cookiecutter.app_name}}/assets/js/main.js @@ -5,9 +5,9 @@ */ // JavaScript modules -require("jquery"); -require("font-awesome-webpack"); -require("bootstrap"); +require('jquery'); +require('font-awesome-webpack'); +require('bootstrap'); // Your own code require('./plugins.js'); diff --git a/{{cookiecutter.app_name}}/assets/js/plugins.js b/{{cookiecutter.app_name}}/assets/js/plugins.js index 957c779..2fedb21 100644 --- a/{{cookiecutter.app_name}}/assets/js/plugins.js +++ b/{{cookiecutter.app_name}}/assets/js/plugins.js @@ -1 +1 @@ -// place any jQuery/helper plugins in here, instead of separate, slower script files. \ No newline at end of file +// place any jQuery/helper plugins in here, instead of separate, slower script files. diff --git a/{{cookiecutter.app_name}}/assets/js/script.js b/{{cookiecutter.app_name}}/assets/js/script.js index 4c75e09..cbe79c2 100644 --- a/{{cookiecutter.app_name}}/assets/js/script.js +++ b/{{cookiecutter.app_name}}/assets/js/script.js @@ -1,5 +1,3 @@ -(function($, window) { +(function myfunc($, window) { // eslint-disable-line no-unused-vars - - -}).call(this, jQuery, window); +}.call(this, jQuery, window));