Add option to auto-remove unused lint-deps exceptions
This commit is contained in:
parent
41b4cce6ec
commit
c2a65306e2
3 changed files with 43 additions and 39 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue