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
(cherry picked from commit bbad821c39
)
This commit is contained in:
parent
ff5a43eb93
commit
ac2da4e6b9
@ -10,5 +10,9 @@
|
||||
"env": {
|
||||
"es6": 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 ) {
|
||||
var stripJSONComments = require( "strip-json-comments" ),
|
||||
data = {};
|
||||
|
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
var fs = require( "fs" );
|
||||
|
||||
module.exports = function( Release ) {
|
||||
|
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
var
|
||||
fs = require( "fs" ),
|
||||
shell = require( "shelljs" ),
|
||||
|
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function( Release, files, complete ) {
|
||||
|
||||
var
|
||||
|
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
var fs = require( "fs" ),
|
||||
npm = require( "npm" ),
|
||||
chalk = require( "chalk" ),
|
||||
|
@ -4,10 +4,9 @@
|
||||
* and includes/excludes specified modules
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = function( grunt ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var fs = require( "fs" ),
|
||||
requirejs = require( "requirejs" ),
|
||||
Insight = require( "insight" ),
|
||||
|
@ -1,7 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function( grunt ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var fs = require( "fs" ),
|
||||
filename = grunt.option( "filename" ),
|
||||
distpaths = [
|
||||
|
@ -1,7 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = ( grunt ) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
const fs = require( "fs" );
|
||||
const spawnTest = require( "./lib/spawn_test.js" );
|
||||
const testsDir = "./test/node_smoke_tests/";
|
||||
|
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
var fs = require( "fs" );
|
||||
|
||||
module.exports = function( grunt ) {
|
||||
|
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
var fs = require( "fs" );
|
||||
|
||||
module.exports = function( grunt ) {
|
||||
|
@ -1,7 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function( grunt ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
grunt.registerTask( "testswarm", function( commit, configFile, projectName, browserSets,
|
||||
timeout, testMode ) {
|
||||
var jobName, config, tests,
|
||||
|
Loading…
Reference in New Issue
Block a user