mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Migrate util, types, state, sticker-creator to ESLint
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user