Skip to content

Commit

Permalink
[eslint] fix remaining undeclared variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 29, 2019
1 parent 07e13a8 commit 1a59e0b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"root": true,
"env": {
"browser": true,
"node": true,
},
"globals": {
"Promise": false,
},
"rules": {
"indent": ["error", 4],
"key-spacing": "error",
Expand All @@ -8,6 +15,7 @@
"anonymous": "always",
"named": "never",
}],
"no-undef": "error",
},
"overrides": [
{
Expand All @@ -16,5 +24,11 @@
"ecmaVersion": 2017,
},
},
{
"files": ["example/**", "test/**"],
"globals": {
"g": false,
},
},
],
}
4 changes: 2 additions & 2 deletions test/stackTrace.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ tap.test('preserves stack trace for failed assertions', function (tt) {
parser.once('assert', function (data) {
tt.equal(typeof data.diag.at, 'string');
tt.equal(typeof data.diag.stack, 'string');
at = data.diag.at || '';
var at = data.diag.at || '';
stack = data.diag.stack || '';
tt.ok(/^Error: true should be false(\n at .+)+/.exec(stack), 'stack should be a stack');
tt.deepEqual(data, {
Expand Down Expand Up @@ -172,7 +172,7 @@ tap.test('preserves stack trace for failed assertions where actual===falsy', fun
parser.once('assert', function (data) {
tt.equal(typeof data.diag.at, 'string');
tt.equal(typeof data.diag.stack, 'string');
at = data.diag.at || '';
var at = data.diag.at || '';
stack = data.diag.stack || '';
tt.ok(/^Error: false should be true(\n at .+)+/.exec(stack), 'stack should be a stack');
tt.deepEqual(data, {
Expand Down

0 comments on commit 1a59e0b

Please sign in to comment.