Skip to content

Commit

Permalink
[meta] consolidate eslintrc files
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 24, 2025
1 parent 39a975c commit f2ab52b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
16 changes: 14 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@
"max-nested-callbacks": [2, 3],
"max-params": [2, 3],
"max-statements": [2, 14],
"no-invalid-this": [1],
"no-invalid-this": 1,
"no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
}
},

"overrides": [
{
"files": "test/**",
"rules": {
"array-bracket-newline": 0,
"array-element-newline": 0,
"max-statements-per-line": 0,
"no-magic-numbers": 0,
},
},
],
}
8 changes: 0 additions & 8 deletions test/.eslintrc

This file was deleted.

3 changes: 1 addition & 2 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

/* globals window */

var test = require('tape');
var forEach = require('../');

Expand Down Expand Up @@ -42,6 +40,7 @@ test('second argument: iterator', function (t) {
t['throws'](function () { forEach(arr, 42); }, TypeError, '42 is not a function');
t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function');
t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function');
/* eslint-env browser */
if (typeof window !== 'undefined') {
t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function');
}
Expand Down

0 comments on commit f2ab52b

Please sign in to comment.