Custom linter to check code quality (#2753)

This commit is contained in:
Scott Nonnenberg 2018-09-20 15:24:52 -07:00 committed by GitHub
parent 366401f77a
commit ecb126e74c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 7467 additions and 66 deletions

View file

@ -0,0 +1,14 @@
// tslint:disable no-console
import { join } from 'path';
import { writeFileSync } from 'fs';
import { ExceptionType } from './types';
import { loadJSON, sortExceptions } from './util';
const exceptionsPath = join(__dirname, 'exceptions.json');
const exceptions: Array<ExceptionType> = loadJSON(exceptionsPath);
const sorted = sortExceptions(exceptions);
writeFileSync(exceptionsPath, JSON.stringify(sorted, null, ' '));