From 0b522f36cb211485e73483f621f038f611365578 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Sat, 24 May 2014 14:47:34 +0100 Subject: [PATCH] Issue #2227731 by _nod: Replace JSHint with ESLint for JavaScript validation. --- .eslintignore | 5 +++++ .eslintrc | 33 +++++++++++++++++++++++++++++++++ .jshintignore | 4 ---- .jshintrc | 25 ------------------------- 4 files changed, 38 insertions(+), 29 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc delete mode 100644 .jshintignore delete mode 100644 .jshintrc diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000000..a04f7ea215e0 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,5 @@ +core/assets/vendor/* +core/modules/locale/tests/locale_test.js +core/modules/tour/js/jquery.joyride-2.0.3.js +core/vendor/* +sites/*/files diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 000000000000..b33ca06a81aa --- /dev/null +++ b/.eslintrc @@ -0,0 +1,33 @@ +{ + "env": { + "browser": true + }, + "globals": { + "Drupal": true, + "drupalSettings": true, + "domready": true, + "jQuery": true, + "_": true, + "matchMedia": true, + "Backbone": true, + "Modernizr": true, + "CKEDITOR": true + }, + "rules": { + "eqeqeq": [2, "smart"], + "guard-for-in": 2, + "no-undef": 2, + //"no-unused-vars": [2, {"vars": "local", "args": "none"}], + "no-unused-vars": 0, + "strict": 2, + "new-cap": 0, + "quotes": 0, + "camelcase": 0, + "no-underscore-dangle": 0, + "no-new": 0, + "no-alert": 0, + "no-use-before-define": 0, + "consistent-return": 0, + "no-constant-condition": 0 + } +} diff --git a/.jshintignore b/.jshintignore deleted file mode 100644 index 48dd3ef40c88..000000000000 --- a/.jshintignore +++ /dev/null @@ -1,4 +0,0 @@ -core/assets/vendor -core/modules/tour/js/jquery.joyride-2.0.3.js -core/vendor -sites/*/files diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 9bd6b54d55bd..000000000000 --- a/.jshintrc +++ /dev/null @@ -1,25 +0,0 @@ -{ - "browser" : true, - "curly" : true, - "eqeqeq" : true, - "forin" : true, - "indent" : 2, - "latedef" : true, - "newcap" : true, - "noarg" : true, - "strict" : true, - "trailing" : true, - "undef" : true, - "unused" : "vars", - "predef" : [ - "Drupal", - "drupalSettings", - "domready", - "jQuery", - "_", - "matchMedia", - "Backbone", - "Modernizr", - "CKEDITOR" - ] -} -- GitLab