Migrate util, types, state, sticker-creator to ESLint
This commit is contained in:
parent
372aa44e49
commit
2ade4acd52
115 changed files with 647 additions and 448 deletions
|
@ -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']);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue