Add AirBnb TypeScript overrides for linting
AirBnb only imports JavaScript rules and some fail for TypeScript files. This commit overrides those rules with TypeScript equivalents. Changes here can be mostly replaced when Vue natively support TypeScript for Airbnb (vuejs/eslint-config-airbnb#23). Enables @typescript-eslint/indent even though it's broken and it will not be fixed typescript-eslint/typescript-eslint#1824 until prettifier is used, because it is still useful. Change broken rules with TypeScript variants: - `no-useless-constructor` eslint/eslint#14118 typescript-eslint/typescript-eslint#873 - `no-shadow` eslint/eslint#13044 typescript-eslint/typescript-eslint#2483 typescript-eslint/typescript-eslint#325 typescript-eslint/typescript-eslint#2552 typescript-eslint/typescript-eslint#2484 typescript-eslint/typescript-eslint#2466
This commit is contained in:
@@ -3,15 +3,15 @@ import { AsyncLazy } from '@/infrastructure/Threading/AsyncLazy';
|
||||
import { IApplicationFactory } from './IApplicationFactory';
|
||||
import { parseApplication } from './Parser/ApplicationParser';
|
||||
|
||||
export type ApplicationGetter = () => IApplication;
|
||||
const ApplicationGetter: ApplicationGetter = parseApplication;
|
||||
export type ApplicationGetterType = () => IApplication;
|
||||
const ApplicationGetter: ApplicationGetterType = parseApplication;
|
||||
|
||||
export class ApplicationFactory implements IApplicationFactory {
|
||||
public static readonly Current: IApplicationFactory = new ApplicationFactory(ApplicationGetter);
|
||||
|
||||
private readonly getter: AsyncLazy<IApplication>;
|
||||
|
||||
protected constructor(costlyGetter: ApplicationGetter) {
|
||||
protected constructor(costlyGetter: ApplicationGetterType) {
|
||||
if (!costlyGetter) {
|
||||
throw new Error('undefined getter');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user