From: Michał Gołębiowski Date: Wed, 13 Jul 2016 08:49:13 +0000 (+0200) Subject: Build: Fix the regex removing the ESLint comment from wrapper.js X-Git-Tag: 3.1.1~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6e605afb1fb85dddf0e2b3563f5dee26cd77623e;p=jquery.git Build: Fix the regex removing the ESLint comment from wrapper.js 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. --- diff --git a/build/tasks/build.js b/build/tasks/build.js index d086ae8d6..7f0da1d6b 100644 --- a/build/tasks/build.js +++ b/build/tasks/build.js @@ -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, "" diff --git a/src/wrapper.js b/src/wrapper.js index d93d036d0..af90fb29e 100644 --- a/src/wrapper.js +++ b/src/wrapper.js @@ -1,4 +1,4 @@ -/*eslint-disable no-unused-vars*/ +/* eslint-disable no-unused-vars*/ /*! * jQuery JavaScript Library v@VERSION * https://jquery.com/