From cc77e13eb0b88af5ee041e08cda7c660a6f5cf9e Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Mon, 7 Oct 2019 11:18:40 -0400 Subject: [PATCH] chore: Add `use strict` to all except fixtures (#1197) --- bin/wrap.js | 2 ++ build-self-coverage.js | 2 ++ lib/commands/check-coverage.js | 2 ++ lib/commands/instrument.js | 2 ++ lib/commands/report.js | 2 ++ lib/process-args.js | 2 ++ lib/source-maps.js | 2 ++ lib/wrap.js | 2 ++ self-coverage-helper.js | 2 ++ test/helpers/parse-argv.js | 2 ++ test/helpers/spawn.js | 2 ++ test/should-instrument.js | 2 ++ 12 files changed, 24 insertions(+) diff --git a/bin/wrap.js b/bin/wrap.js index 63d820556..ff810a420 100644 --- a/bin/wrap.js +++ b/bin/wrap.js @@ -1,2 +1,4 @@ +'use strict' + require('../lib/wrap') require('spawn-wrap').runMain() diff --git a/build-self-coverage.js b/build-self-coverage.js index 6526d0100..42a0fe5d8 100644 --- a/build-self-coverage.js +++ b/build-self-coverage.js @@ -1,3 +1,5 @@ +'use strict' + const path = require('path') const fs = require('fs') const istanbul = require('istanbul-lib-instrument') diff --git a/lib/commands/check-coverage.js b/lib/commands/check-coverage.js index 2816a5876..56ffdf219 100644 --- a/lib/commands/check-coverage.js +++ b/lib/commands/check-coverage.js @@ -1,3 +1,5 @@ +'use strict' + const NYC = require('../../index.js') const { cliWrapper, setupOptions } = require('./helpers.js') diff --git a/lib/commands/instrument.js b/lib/commands/instrument.js index f88cccfd0..036597f9a 100644 --- a/lib/commands/instrument.js +++ b/lib/commands/instrument.js @@ -1,3 +1,5 @@ +'use strict' + const NYC = require('../../index.js') const path = require('path') const { promisify } = require('util') diff --git a/lib/commands/report.js b/lib/commands/report.js index 4c2b29752..8293bf790 100644 --- a/lib/commands/report.js +++ b/lib/commands/report.js @@ -1,3 +1,5 @@ +'use strict' + const NYC = require('../../index.js') const { cliWrapper, setupOptions } = require('./helpers.js') diff --git a/lib/process-args.js b/lib/process-args.js index 695f8e62a..9eb1e9cf1 100644 --- a/lib/process-args.js +++ b/lib/process-args.js @@ -1,3 +1,5 @@ +'use strict' + const parser = require('yargs-parser') const commands = [ 'report', diff --git a/lib/source-maps.js b/lib/source-maps.js index 3978971f5..be02a46e8 100644 --- a/lib/source-maps.js +++ b/lib/source-maps.js @@ -1,3 +1,5 @@ +'use strict' + const convertSourceMap = require('convert-source-map') const libCoverage = require('istanbul-lib-coverage') const libSourceMaps = require('istanbul-lib-source-maps') diff --git a/lib/wrap.js b/lib/wrap.js index 3f18f8a29..cf30637f4 100644 --- a/lib/wrap.js +++ b/lib/wrap.js @@ -1,3 +1,5 @@ +'use strict' + const NYC = require('../index.js') const config = JSON.parse( diff --git a/self-coverage-helper.js b/self-coverage-helper.js index 51ebd764b..2ef7e82e1 100644 --- a/self-coverage-helper.js +++ b/self-coverage-helper.js @@ -1,3 +1,5 @@ +'use strict' + /* global ___NYC_SELF_COVERAGE___ */ const path = require('path') diff --git a/test/helpers/parse-argv.js b/test/helpers/parse-argv.js index 2e3c12de5..68e874219 100644 --- a/test/helpers/parse-argv.js +++ b/test/helpers/parse-argv.js @@ -1,3 +1,5 @@ +'use strict' + const configUtil = require('../../self-coverage/lib/config-util') async function parseArgv (cwd, argv) { diff --git a/test/helpers/spawn.js b/test/helpers/spawn.js index c8aae3029..c24d484c8 100644 --- a/test/helpers/spawn.js +++ b/test/helpers/spawn.js @@ -1,3 +1,5 @@ +'use strict' + const cp = require('child_process') function spawn (exe, args, opts) { diff --git a/test/should-instrument.js b/test/should-instrument.js index 8afc3d858..5dde8e714 100644 --- a/test/should-instrument.js +++ b/test/should-instrument.js @@ -1,3 +1,5 @@ +'use strict' + const path = require('path') const NYC = require('../self-coverage')