Skip to content

Commit

Permalink
disable no-undef for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed May 29, 2015
1 parent 99d9278 commit 4c2445a
Show file tree
Hide file tree
Showing 17 changed files with 16 additions and 19 deletions.
9 changes: 6 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ rules:
no-unreachable: 2
## require valid typeof compared string like typeof foo === 'strnig'
valid-typeof: 2
## disallow use of undefined variables (globals)
no-undef: 2

# Best Practices
# list: https://github.com/eslint/eslint/tree/master/docs/rules#best-practices
Expand Down Expand Up @@ -64,6 +62,11 @@ rules:
## 'use strict' on top
strict: [2, "global"]

# Variables
# list: https://github.com/eslint/eslint/tree/master/docs/rules#variables
## disallow use of undefined variables (globals)
no-undef: 2

# Global scoped method and vars
globals:
DTRACE_HTTP_CLIENT_REQUEST: false
Expand Down Expand Up @@ -104,4 +107,4 @@ globals:
root: false
setImmediate: false
setInterval: false
setTimeout: false
setTimeout: false
4 changes: 3 additions & 1 deletion test/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
rules:
## allow unreachable code
no-unreachable: 0
## allow undeclared variables
no-undef: 0

globals:
gc: false
gc: false
1 change: 0 additions & 1 deletion test/message/nexttick_throw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
'use strict';
var common = require('../common');
var assert = require('assert');
Expand Down
1 change: 0 additions & 1 deletion test/message/timeout_throw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
'use strict';
var common = require('../common');
var assert = require('assert');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-domain-crypto.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable strict, no-undef */
/* eslint-disable strict */
try {
var crypto = require('crypto');
} catch (e) {
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-domain-exit-dispose-again.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
'use strict';
var common = require('../common');
var assert = require('assert');
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-domain-exit-dispose.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
'use strict';
var common = require('../common');
var assert = require('assert');
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-exception-handler2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
'use strict';
var common = require('../common');
var assert = require('assert');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-global.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable strict, no-undef */
/* eslint-disable strict */
var common = require('../common');
var assert = require('assert');

Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-http-exceptions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
'use strict';
var common = require('../common');
var assert = require('assert');
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-next-tick-errors.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
'use strict';
var common = require('../common');
var assert = require('assert');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-repl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable max-len, strict, no-undef */
/* eslint-disable max-len, strict */
var common = require('../common');
var assert = require('assert');

Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
'use strict';
var common = require('../common');
var assert = require('assert');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-vm-new-script-new-context.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable strict, no-undef */
/* eslint-disable strict */
var common = require('../common');
var assert = require('assert');
var Script = require('vm').Script;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-vm-new-script-this-context.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable strict, no-undef */
/* eslint-disable strict */
var common = require('../common');
var assert = require('assert');
var Script = require('vm').Script;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-vm-run-in-new-context.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable strict, no-undef */
/* eslint-disable strict */
// Flags: --expose-gc

var common = require('../common');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-vm-static-this.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable strict, no-undef */
/* eslint-disable strict */
var common = require('../common');
var assert = require('assert');
var vm = require('vm');
Expand Down

0 comments on commit 4c2445a

Please sign in to comment.