Skip to content

Commit

Permalink
Enable more eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
wagenet committed Feb 1, 2022
1 parent a9b976c commit d11de20
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,16 @@ module.exports = {
// TODO: stop disabling these rules
'prefer-const': 'off',
'no-prototype-builtins': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-types': [
'error',
{
extendDefaults: true,
types: {
'{}': false,
},
},
],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-this-alias': 'off',
},
},

Expand Down
2 changes: 1 addition & 1 deletion lib/router/route-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface Route<T extends IModel = {}> {
routeName: string;
_internalName: string;
context: T | undefined;
events?: Dict<Function>;
events?: Dict<(...args: unknown[]) => unknown>;
model?(params: Dict<unknown>, transition: Transition): PromiseLike<T> | undefined | T;
deserialize?(params: Dict<unknown>, transition: Transition): T | PromiseLike<T> | undefined;
serialize?(model: T | undefined, params: string[]): Dict<unknown> | undefined;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { isTransitionAborted } from 'router/transition-aborted-error';
QUnit.config.testTimeout = 1000;

let bb = new Backburner(['promises']);
function customAsync(callback: Function, promise: Promise<unknown>) {
function customAsync(callback: (...args: unknown[]) => unknown, promise: Promise<unknown>) {
bb.defer('promises', promise, callback, promise);
}

Expand Down

0 comments on commit d11de20

Please sign in to comment.