Skip to content

Commit 11b7d85

Browse files
committed
[Refactor] make everything strict mode
1 parent 0715294 commit 11b7d85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+201
-1
lines changed

.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"named": "never",
1717
}],
1818
"no-undef": "error",
19+
"strict": "error",
1920
},
2021
"overrides": [
2122
{

bin/tape

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env node
22

3+
'use strict';
4+
35
var resolveModule = require('resolve').sync;
46
var resolvePath = require('path').resolve;
57
var parseOpts = require('minimist');

example/array.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var falafel = require('falafel');
24
var test = require('../');
35

example/fail.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var falafel = require('falafel');
24
var test = require('../');
35

example/nested.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var falafel = require('falafel');
24
var test = require('../');
35

example/nested_fail.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var falafel = require('falafel');
24
var test = require('../');
35

example/no_callback.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../');
24

35
test('No cb test');

example/not_enough.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var falafel = require('falafel');
24
var test = require('../');
35

example/static/server.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var http = require('http');
24
var ecstatic = require('ecstatic')(__dirname);
35
var server = http.createServer(ecstatic);

example/stream/object.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24
var path = require('path');
35

example/stream/tap.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24
var path = require('path');
35

example/stream/test/x.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../../');
24
test(function (t) {
35
t.plan(1);

example/stream/test/y.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../../');
24
test(function (t) {
35
t.plan(2);

example/throw.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var falafel = require('falafel');
24
var test = require('../');
35

example/timing.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../');
24

35
test('timing test', function (t) {

example/too_many.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var falafel = require('falafel');
24
var test = require('../');
35

example/two.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../');
24

35
test('one', function (t) {

index.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var defined = require('defined');
24
var createDefaultStream = require('./lib/default_stream');
35
var Test = require('./lib/test');

lib/default_stream.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var through = require('through');
24
var fs = require('fs');
35

lib/results.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var defined = require('defined');
24
var EventEmitter = require('events').EventEmitter;
35
var inherits = require('inherits');

lib/test.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
23
var deepEqual = require('deep-equal');
34
var defined = require('defined');
45
var path = require('path');

test/add-subtest-async.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../');
24

35
test('parent', function (t) {

test/anonymous-fn.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var tape = require('../');
24
var tap = require('tap');
35
var concat = require('concat-stream');

test/anonymous-fn/test-wrapper.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
// Example of wrapper function that would invoke tape
24
module.exports = function (testCase) {
35
return function (t) {

test/array.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var falafel = require('falafel');
24
var tape = require('../');
35
var tap = require('tap');

test/async-await.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var tap = require('tap');
24

35
var stripFullStack = require('./common').stripFullStack;
@@ -185,7 +187,7 @@ tap.test('sync-error', function (t) {
185187
stderr = lines.join('\n');
186188

187189
t.same(stripFullStack(stderr), [
188-
'$TEST/async-await/sync-error.js:5',
190+
'$TEST/async-await/sync-error.js:7',
189191
' throw new Error(\'oopsie\');',
190192
' ^',
191193
'',

test/async-await/async-error.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
test('async-error', async function myTest(t) {

test/async-await/async1.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
test('async1', async function myTest(t) {

test/async-await/async2.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
test('async2', async function myTest(t) {

test/async-await/async3.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
test('async3', async function myTest(t) {

test/async-await/async4.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
test('async4', async function myTest(t) {

test/async-await/async5.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var util = require('util');
24
var http = require('http');
35

test/async-await/sync-error.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
test('sync-error', function myTest(t) {

test/bound.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../');
24

35
test('bind works', function (t) {

test/browser/asserts.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
test(function (t) {

test/child_ordering.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../');
24

35
var childRan = false;

test/circular-things.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var tape = require('../');
24
var tap = require('tap');
35
var concat = require('concat-stream');

test/comment.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var concat = require('concat-stream');
24
var tap = require('tap');
35
var tape = require('../');

test/common.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var path = require('path');
24
var spawn = require('child_process').spawn;
35
var concat = require('concat-stream');

test/create_multiple_streams.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var tape = require('../');
24

35
tape.test('createMultipleStreams', function (tt) {

test/deep-equal-failure.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var tape = require('../');
24
var tap = require('tap');
35
var concat = require('concat-stream');

test/deep.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../');
24

35
test('deep strict equal', function (t) {

test/default-messages.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var tap = require('tap');
24
var path = require('path');
35
var spawn = require('child_process').spawn;

test/double_end.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('tap').test;
24
var path = require('path');
35
var concat = require('concat-stream');

test/double_end/double.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
test('double end', function (t) {

test/end-as-callback.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var tap = require("tap");
24
var forEach = require("for-each");
35
var tape = require("../");

test/error.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var tape = require('../');
24
var tap = require('tap');
35
var concat = require('concat-stream');

test/exit.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var tap = require('tap');
24
var path = require('path');
35
var spawn = require('child_process').spawn;

test/exit/fail.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24
var falafel = require('falafel');
35

test/exit/ok.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var falafel = require('falafel');
24
var test = require('../../');
35

test/exit/second.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
test('first', function (t) {

test/exit/todo.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
test('todo pass', { todo: true }, function (t) {

test/exit/todo_fail.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
test('todo fail', { todo: true }, function (t) {

test/exit/too_few.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var falafel = require('falafel');
24
var test = require('../../');
35

test/exposed-harness.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var tape = require('../');
24
var tap = require('tap');
35

test/fail.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var falafel = require('falafel');
24
var tape = require('../');
35
var tap = require('tap');

test/has spaces.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var tape = require('../');
24
var tap = require('tap');
35
var concat = require('concat-stream');

test/many.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../');
24

35
test('many tests', function (t) {

test/max_listeners.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var spawn = require('child_process').spawn;
24
var path = require('path');
35

test/max_listeners/source.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
for (var i = 0; i < 11; i ++) {

test/messages/defaults.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../../');
24

35
test('default messages', function (t) {

test/nested-async-plan-noend.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var test = require('../');
24

35
test('Harness async test support', function (t) {

test/nested-sync-noplan-noend.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var tape = require('../');
24
var tap = require('tap');
35
var concat = require('concat-stream');

test/nested.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var falafel = require('falafel');
24
var tape = require('../');
35
var tap = require('tap');

0 commit comments

Comments
 (0)