mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Build: Require strict mode in Node.js scripts via ESLint
So far, only browser-based JS files were required to be in strict mode (in the function form). This commit adds such a requirement to Node.js scripts where the global form is preferred. All Node.js scripts in sloppy mode were converted to strict mode. Closes gh-4499
This commit is contained in:
parent
4504fc3d72
commit
bbad821c39
@ -10,5 +10,9 @@
|
|||||||
"env": {
|
"env": {
|
||||||
"es6": true,
|
"es6": true,
|
||||||
"node": true
|
"node": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"rules": {
|
||||||
|
"strict": ["error", "global"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
module.exports = function( grunt ) {
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = function( grunt ) {
|
||||||
function readOptionalJSON( filepath ) {
|
function readOptionalJSON( filepath ) {
|
||||||
var stripJSONComments = require( "strip-json-comments" ),
|
var stripJSONComments = require( "strip-json-comments" ),
|
||||||
data = {};
|
data = {};
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
var fs = require( "fs" );
|
var fs = require( "fs" );
|
||||||
|
|
||||||
module.exports = function( Release ) {
|
module.exports = function( Release ) {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
var
|
var
|
||||||
fs = require( "fs" ),
|
fs = require( "fs" ),
|
||||||
shell = require( "shelljs" ),
|
shell = require( "shelljs" ),
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
module.exports = function( Release, files, complete ) {
|
module.exports = function( Release, files, complete ) {
|
||||||
|
|
||||||
var
|
var
|
||||||
|
@ -4,10 +4,9 @@
|
|||||||
* and includes/excludes specified modules
|
* and includes/excludes specified modules
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = function( grunt ) {
|
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = function( grunt ) {
|
||||||
var fs = require( "fs" ),
|
var fs = require( "fs" ),
|
||||||
requirejs = require( "requirejs" ),
|
requirejs = require( "requirejs" ),
|
||||||
Insight = require( "insight" ),
|
Insight = require( "insight" ),
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
module.exports = function( grunt ) {
|
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = function( grunt ) {
|
||||||
var fs = require( "fs" ),
|
var fs = require( "fs" ),
|
||||||
filename = grunt.option( "filename" ),
|
filename = grunt.option( "filename" ),
|
||||||
distpaths = [
|
distpaths = [
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
module.exports = ( grunt ) => {
|
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = ( grunt ) => {
|
||||||
const fs = require( "fs" );
|
const fs = require( "fs" );
|
||||||
const spawnTest = require( "./lib/spawn_test.js" );
|
const spawnTest = require( "./lib/spawn_test.js" );
|
||||||
const testsDir = "./test/node_smoke_tests/";
|
const testsDir = "./test/node_smoke_tests/";
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
var fs = require( "fs" );
|
var fs = require( "fs" );
|
||||||
|
|
||||||
module.exports = function( grunt ) {
|
module.exports = function( grunt ) {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
var fs = require( "fs" );
|
var fs = require( "fs" );
|
||||||
|
|
||||||
module.exports = function( grunt ) {
|
module.exports = function( grunt ) {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
module.exports = function( grunt ) {
|
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = function( grunt ) {
|
||||||
grunt.registerTask( "testswarm", function( commit, configFile, projectName, browserSets,
|
grunt.registerTask( "testswarm", function( commit, configFile, projectName, browserSets,
|
||||||
timeout, testMode ) {
|
timeout, testMode ) {
|
||||||
var jobName, config, tests,
|
var jobName, config, tests,
|
||||||
|
Loading…
Reference in New Issue
Block a user