Added @typescript-eslint/recommended config with suppressions (#2345)

* Disabled @blueprintjs/classes-constants. #2288.

* thuang-eslint-bp-off (#2344)

* Disabled @blueprintjs/classes-constants on webpack dev and shared. #2288.

* Added TS recommended, suppress lint errors codemod.

* Added per-error/warning ignore for tests.

* Added per-error/warning ignore for configuration.

* Added per-error/warning ignore for src. Removed suppress package.

* Minor linting.

Co-authored-by: Timmy Huang <tihuan@users.noreply.github.com>
This commit is contained in:
Mim Hastie
2021-07-28 16:06:34 -07:00
committed by GitHub
co-authored by Timmy Huang
parent 32f60a1547
commit 27575b8d86
163 changed files with 1827 additions and 64 deletions
+6
View File
@@ -11,6 +11,7 @@ Undoable metareducer and the AnnoMatrix private API. It would be helpful
to make the Undoable interface better factored.
*/
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
const annoMatrixGC = (store: any) => (next: any) => (action: any) => {
if (_itIsTimeForGC()) {
_doGC(store);
@@ -34,6 +35,7 @@ function _itIsTimeForGC() {
return false;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
function _doGC(store: any) {
const state = store.getState();
@@ -43,7 +45,9 @@ function _doGC(store: any) {
const undoableFuture = state["@@undoable/future"];
const undoableStack = undoablePast
.concat(undoableFuture)
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
.flatMap((snapshot: any) =>
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
snapshot.filter((v: any) => v[0] === "annoMatrix").map((v: any) => v[1])
);
const currentAnnoMatrix = state.annoMatrix;
@@ -53,6 +57,7 @@ function _doGC(store: any) {
as our current gc algo is more aggressive with those not hot.
*/
const allAnnoMatrices = new Map(
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
undoableStack.map((m: any) => [m, { isHot: false }])
);
let am = currentAnnoMatrix;
@@ -61,6 +66,7 @@ function _doGC(store: any) {
am = am.viewOf;
}
allAnnoMatrices.forEach((hints, annoMatrix) =>
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
(annoMatrix as any)._gc(hints)
);
}