diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2016-05-10 12:12:28 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2016-06-11 10:41:33 +0300 |
commit | 58c6ca9822afa42d3b40cca8edb0abe90a2bcb34 (patch) | |
tree | eb8c4c93031b4f0d88ffe5d58af7d58337c7b116 /build | |
parent | a4474c9a0025095f82d734a9d7230eace2f08ef8 (diff) | |
download | jquery-58c6ca9822afa42d3b40cca8edb0abe90a2bcb34.tar.gz jquery-58c6ca9822afa42d3b40cca8edb0abe90a2bcb34.zip |
Build: ESLint details
Use eslint pragmas, fix new errors, etc
Closes gh-3148
Diffstat (limited to 'build')
-rw-r--r-- | build/.eslintrc | 7 | ||||
-rw-r--r-- | build/release.js | 5 | ||||
-rw-r--r-- | build/tasks/build.js | 11 | ||||
-rw-r--r-- | build/tasks/lib/spawn_test.js | 4 |
4 files changed, 15 insertions, 12 deletions
diff --git a/build/.eslintrc b/build/.eslintrc deleted file mode 100644 index 11368d984..000000000 --- a/build/.eslintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "env": { - "node": true - }, - "extends": "../.eslintrc", - "root": true -} diff --git a/build/release.js b/build/release.js index 72d6ab5a3..22cd90c86 100644 --- a/build/release.js +++ b/build/release.js @@ -21,6 +21,7 @@ module.exports = function( Release ) { Release.define( { npmPublish: true, issueTracker: "github", + /** * Ensure the repo is in a proper state before release * @param {Function} callback @@ -28,6 +29,7 @@ module.exports = function( Release ) { checkRepoState: function( callback ) { ensureSizzle( Release, callback ); }, + /** * Set the version in the src folder for distributing AMD */ @@ -37,6 +39,7 @@ module.exports = function( Release ) { contents = contents.replace( /@VERSION/g, Release.newVersion ); fs.writeFileSync( corePath, contents, "utf8" ); }, + /** * Generates any release artifacts that should be included in the release. * The callback must be invoked with an array of files that should be @@ -54,6 +57,7 @@ module.exports = function( Release ) { Release._setSrcVersion(); callback( files ); }, + /** * Acts as insertion point for restoring Release.dir.repo * It was changed to reuse npm publish code in jquery-release @@ -65,6 +69,7 @@ module.exports = function( Release ) { Release.dir.repo = Release.dir.origRepo || Release.dir.repo; return npmTags(); }, + /** * Publish to distribution repo and npm * @param {Function} callback diff --git a/build/tasks/build.js b/build/tasks/build.js index ab1c993a0..d086ae8d6 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( /\/\*jshint .* \*\/\n/, "" ), + start: wrapper[ 0 ].replace( /\/\*eslint .* \*\/\n/, "" ), end: globals.replace( /\/\*\s*ExcludeStart\s*\*\/[\w\W]*?\/\*\s*ExcludeEnd\s*\*\//ig, "" @@ -64,7 +64,12 @@ module.exports = function( grunt ) { // Convert var modules if ( /.\/var\//.test( path.replace( process.cwd(), "" ) ) ) { contents = contents - .replace( /define\([\w\W]*?return/, "var " + ( /var\/([\w-]+)/.exec( name )[ 1 ] ) + " =" ) + .replace( + /define\([\w\W]*?return/, + "var " + + ( /var\/([\w-]+)/.exec( name )[ 1 ] ) + + " =" + ) .replace( rdefineEnd, "" ); // Sizzle treatment @@ -130,6 +135,7 @@ module.exports = function( grunt ) { excluded = [], included = [], version = grunt.config( "pkg.version" ), + /** * Recursively calls the excluder to remove on all modules in the list * @param {Array} list @@ -167,6 +173,7 @@ module.exports = function( grunt ) { } ); } }, + /** * Adds the specified module to the excluded or included list, depending on the flag * @param {String} flag A module path relative to diff --git a/build/tasks/lib/spawn_test.js b/build/tasks/lib/spawn_test.js index e633755ee..34353a783 100644 --- a/build/tasks/lib/spawn_test.js +++ b/build/tasks/lib/spawn_test.js @@ -1,5 +1,3 @@ -/* jshint node: true */ - "use strict"; // Run Node with provided parameters: the first one being the Grunt @@ -13,4 +11,4 @@ module.exports = function spawnTest( done ) { .on( "close", function( code ) { done( code === 0 ); } ); -} ; +}; |