Skip to content

Commit

Permalink
multiple lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ardalanamini committed Mar 23, 2019
1 parent 5cdfc41 commit f9b7f6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/EventEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function assertListener(listener: (...args: any[]) => void) {
assert(typeof listener === "function", "'listener' must be a function");
}

// tslint:disable-next-line:function-name
function _addListener(
emitter: EventEmitter,
event: string | symbol,
Expand Down Expand Up @@ -80,7 +81,7 @@ class EventEmitter {
if (!listeners) return [];

const length = listeners.length;
const ret = new Array(length);
const ret = [];

for (let i = 0; i < length; i++) {
ret[i] = listeners[i].listener;
Expand Down Expand Up @@ -198,7 +199,7 @@ class EventEmitter {

if (index < 0) return this;

if (index === 0) listeners.shift()!;
if (index === 0) listeners.shift();
else listeners.splice(index, 1);

this._listeners[event as string] = listeners;
Expand Down
3 changes: 2 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"rules": {
"no-namespace": false,
"no-increment-decrement": false,
"no-parameter-reassignment": false,
"interface-name": false,
"quotemark": [true, "double"],
"variable-name": [
Expand All @@ -22,7 +23,7 @@
"static-method-regex": "^\\*?\\[?[a-zA-Z][\\w\\d\\.]*\\]?$",
"function-regex": "^\\*?\\[?[a-zA-Z][\\w\\d\\.]*\\]?$"
}
],
]
},
"rulesDirectory": ["src"]
}

0 comments on commit f9b7f6d

Please sign in to comment.