This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 885
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ban: Refactor and add new option format (#2547)
- Loading branch information
Showing
3 changed files
with
154 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,37 @@ | ||
console.time(); | ||
window.toString(); | ||
~~~~~~~~~~~~~~~ [Calls to 'window.toString' are not allowed.] | ||
~~~~~~~~~~~~~~~ [err % ('window.toString')] | ||
console.log(); | ||
document.window.toString(); | ||
~~~~~~~~~~~~~~~~~~~~~~~~ [Calls to 'window.toString' are not allowed.] | ||
reference.randomContainer.window.toString(); | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [Calls to 'window.toString' are not allowed.] | ||
globals.getDocument().window.toString(); | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [Calls to 'window.toString' are not allowed.] | ||
_.keys(obj).forEach(fun); | ||
_.forEach(fun); | ||
~~~~~~~~~ [Calls to '_.forEach' are not allowed.] | ||
~~~~~~~~~~~~~~~~~~~ [err % ('*.forEach', 'Use a regular for loop instead.')] | ||
_.map(fun, (x) => x); | ||
~~~~~ [err % ('_.map')] | ||
_.filter(array); | ||
~~~~~~~~ [Calls to '_.filter' are not allowed. Use the native JavaScript 'myArray.filter' instead.] | ||
~~~~~~~~ [err % ('_.filter', "Use the native JavaScript 'myArray.filter' instead.")] | ||
describe("some text", () => {}); | ||
xdescribe("some text", () => {}); | ||
~~~~~~~~~ [Calls to 'xdescribe' are not allowed.] | ||
~~~~~~~~~ [err % ('xdescribe')] | ||
fdescribe("some text", () => {}); | ||
~~~~~~~~~ [Calls to 'fdescribe' are not allowed.] | ||
~~~~~~~~~ [err % ('fdescribe')] | ||
it("some text", () => {}); | ||
xit("some text", () => {}); | ||
~~~ [Calls to 'xit' are not allowed.] | ||
~~~ [err % ('xit')] | ||
fit("some text", () => {}); | ||
~~~ [Calls to 'fit' are not allowed.] | ||
someObject.fit() | ||
~~~ [err % ('fit')] | ||
someObject.fit() | ||
chai.assert.equal(1, "1"); | ||
~~~~~~~~~~~~~~~~~ [err % ('chai.assert.equal', "Use 'strictEqual' instead.")] | ||
assert.equal(1, "1"); | ||
foo.assert.equal(1, "1"); | ||
someObject.chai.assert.equal(1, "1"); | ||
[].forEach(() => {}); | ||
~~~~~~~~~~ [err % ('*.forEach', 'Use a regular for loop instead.')] | ||
arr.forEach(() => {}); | ||
~~~~~~~~~~~ [err % ('*.forEach', 'Use a regular for loop instead.')] | ||
someObject.someProperty.forEach(() => {}); | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [err % ('*.forEach', 'Use a regular for loop instead.')] | ||
|
||
[err]: Calls to '%s' are not allowed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters