Custom linter to check code quality (#2753)
This commit is contained in:
parent
366401f77a
commit
ecb126e74c
13 changed files with 7467 additions and 66 deletions
14
ts/util/lint/sort_exceptions.ts
Normal file
14
ts/util/lint/sort_exceptions.ts
Normal 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, ' '));
|
Loading…
Add table
Add a link
Reference in a new issue