Add option to auto-remove unused lint-deps exceptions

This commit is contained in:
Evan Hahn 2022-02-25 09:24:21 -06:00 committed by GitHub
parent 41b4cce6ec
commit c2a65306e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 39 deletions

View file

@ -1,15 +1,12 @@
// Copyright 2018-2020 Signal Messenger, LLC
// Copyright 2018-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { join } from 'path';
import { writeFileSync } from 'fs';
import type { ExceptionType } from './types';
import { loadJSON, sortExceptions } from './util';
import { loadJSON, writeExceptions } from './util';
const exceptionsPath = join(__dirname, 'exceptions.json');
const exceptions: Array<ExceptionType> = loadJSON(exceptionsPath);
const sorted = sortExceptions(exceptions);
writeFileSync(exceptionsPath, JSON.stringify(sorted, null, ' '));
writeExceptions(exceptionsPath, exceptions);