]> source.dussan.org Git - jquery.git/commitdiff
Build: Fix the regex removing the ESLint comment from wrapper.js
authorMichał Gołębiowski <m.goleb@gmail.com>
Wed, 13 Jul 2016 08:49:13 +0000 (10:49 +0200)
committerMichał Gołębiowski <m.goleb@gmail.com>
Wed, 13 Jul 2016 08:49:13 +0000 (10:49 +0200)
The new regex from after the switch from JSHint to ESLint wasn't catching
the ESLint pragma correctly.

Also, the spacing of the pragma comment was updated to match other comments.

build/tasks/build.js
src/wrapper.js

index d086ae8d625bc970a6fbde2cbe8f8e0373ce4b0d..7f0da1d6b40cf5e31a2d073acf8f6c6db02caf54 100644 (file)
@@ -38,7 +38,7 @@ module.exports = function( grunt ) {
                        // Avoid breaking semicolons inserted by r.js
                        skipSemiColonInsertion: true,
                        wrap: {
-                               start: wrapper[ 0 ].replace( /\/\*eslint .* \*\/\n/, "" ),
+                               start: wrapper[ 0 ].replace( /\/\*\s*eslint(?: |-).*\s*\*\/\n/, "" ),
                                end: globals.replace(
                                        /\/\*\s*ExcludeStart\s*\*\/[\w\W]*?\/\*\s*ExcludeEnd\s*\*\//ig,
                                        ""
index d93d036d09076942ab792f06bd811f7c688c44a6..af90fb29e97b84dbb75fcd031b561c52b5034dae 100644 (file)
@@ -1,4 +1,4 @@
-/*eslint-disable no-unused-vars*/
+/* eslint-disable no-unused-vars*/
 /*!
  * jQuery JavaScript Library v@VERSION
  * https://jquery.com/