Migrate util, types, state, sticker-creator to ESLint

This commit is contained in:
Sidney Keese 2020-09-14 14:56:35 -07:00 committed by Josh Perez
parent 372aa44e49
commit 2ade4acd52
115 changed files with 647 additions and 448 deletions

View file

@ -1,4 +1,4 @@
// tslint:disable no-console
/* eslint-disable no-console */
import { readFileSync } from 'fs';
@ -8,7 +8,7 @@ import { ExceptionType } from './types';
export const ENCODING = 'utf8';
export function loadJSON(target: string) {
export function loadJSON<T>(target: string): T {
try {
const contents = readFileSync(target, ENCODING);
@ -19,6 +19,8 @@ export function loadJSON(target: string) {
}
}
export function sortExceptions(exceptions: Array<ExceptionType>) {
export function sortExceptions(
exceptions: Array<ExceptionType>
): Array<ExceptionType> {
return orderBy(exceptions, ['path', 'lineNumber', 'rule']);
}