Skip to content

Commit

Permalink
[lint] Remove all traces of eslint and prettier. Closes #218
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Sep 11, 2022
1 parent f97ee18 commit 7cccdcf
Show file tree
Hide file tree
Showing 26 changed files with 0 additions and 38 deletions.
2 changes: 0 additions & 2 deletions src/bin/order.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/no-var-requires */

import { KPuzzle } from "../cubing/kpuzzle";
import { getPuzzleGeometryByName } from "../cubing/puzzle-geometry";

Expand Down
1 change: 0 additions & 1 deletion src/cubing/alg/Alg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ export class Alg extends AlgCommon<Alg> {

/** @deprecated */
experimentalIsEmpty(): boolean {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
for (const _ of this.#algNodes) {
return false;
}
Expand Down
1 change: 0 additions & 1 deletion src/cubing/alg/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export function setAlgDebugField(debug: boolean): void {
}

export abstract class Comparable {
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
is(c: any): boolean {
return this instanceof c;
}
Expand Down
1 change: 0 additions & 1 deletion src/cubing/alg/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Conjugate } from "./alg-nodes/containers/Conjugate";
import { Move } from "./alg-nodes/leaves/Move";
import { Pause } from "./alg-nodes/leaves/Pause";

// eslint-disable-next-line @typescript-eslint/no-namespace
export const Example = {
Sune: new Alg([
new Move("R", 1),
Expand Down
2 changes: 0 additions & 2 deletions src/cubing/alg/is.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
} from "./alg-nodes";

export function experimentalIs(
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
v: any,
c:
| typeof Alg
Expand All @@ -24,7 +23,6 @@ export function experimentalIs(
): boolean {
return v instanceof c;
}
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export function experimentalIsAlgNode(v: any): boolean {
return (
experimentalIs(v, Grouping) ||
Expand Down
1 change: 0 additions & 1 deletion src/cubing/alg/parseAlg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ class AlgParser {

let quantumMove = this.parseQuantumMoveImpl();
// Only `hadEmptyAbsAmount` is `const`.
// eslint-disable-next-line prefer-const
let [amount, hadEmptyAbsAmount] = this.parseAmountAndTrackEmptyAbsAmount();
const suffix = this.parseMoveSuffix();

Expand Down
1 change: 0 additions & 1 deletion src/cubing/bluetooth/connect/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ function requestOptions<T>(
};
for (const config of configs) {
if (!acceptAllDevices) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
options.filters = options.filters!.concat(config.filters);
}
options.optionalServices = options.optionalServices.concat(
Expand Down
1 change: 0 additions & 1 deletion src/cubing/puzzle-geometry/PermOriSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,6 @@ export class PGTransform extends PGTransformBase {
if (n === 0) {
return this.e();
}
// eslint-disable-next-line @typescript-eslint/no-this-alias
let t: PGTransform = this;
if (n < 0) {
t = t.inv();
Expand Down
3 changes: 0 additions & 3 deletions src/cubing/puzzle-geometry/PuzzleGeometry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1104,10 +1104,8 @@ export class PuzzleGeometry {
if (this.options.verbosity > 1) {
console.log(`# Face names: ${facenames.map((_) => _[1]).join(" ")}`);
// TODO
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
console.log(`# Edge names: ${edgenames.map((_) => _[1]).join(" ")}`);
// TODO
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
console.log(`# Vertex names: ${vertexnames.map((_) => _[1]).join(" ")}`);
}
const geonormals: [Quat, string, string][] = [];
Expand Down Expand Up @@ -2264,7 +2262,6 @@ export class PuzzleGeometry {
r = newr;
}
// TODO
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return r;
}

Expand Down
1 change: 0 additions & 1 deletion src/cubing/search/inside/solve/puzzles/redi_cube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ import { searchDynamicUnofficial } from "./dynamic/sgs-unofficial";

export async function randomRediCubeScramble(): Promise<Alg> {
mustBeInsideWorker();
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return (await searchDynamicUnofficial).getRandomRediCubeScramble();
}
1 change: 0 additions & 1 deletion src/cubing/search/inside/solve/tremble.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function calculateMoves(
);
}
let transformation = kpuzzle.identityTransformation();
// eslint-disable-next-line no-constant-condition
for (let i = 1; true; i++) {
transformation = transformation.applyMove(rootMove);
if (transformation.isIdentityTransformation()) {
Expand Down
1 change: 0 additions & 1 deletion src/cubing/twisty/controllers/indexer/AlgDuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export function defaultDurationForAmount(amount: number): Duration {
return 2000;
}
}
// eslint-disable-next-line no-inner-declarations
export function ExperimentalScaledDefaultDurationForAmount(
scale: number,
amount: number,
Expand Down
1 change: 0 additions & 1 deletion src/cubing/twisty/model/props/TwistyProp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { from } from "../../../vendor/p-lazy/p-lazy";
import { StaleDropper } from "../PromiseFreshener";
import type { UserVisibleErrorTracker } from "../UserVisibleErrorTracker";

/*eslint @typescript-eslint/ban-types:off */
type InputRecord = {};

export type InputProps<T extends InputRecord> = {
Expand Down
1 change: 0 additions & 1 deletion src/cubing/twisty/views/3D/puzzles/Cube3D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,6 @@ export class Cube3D extends Object3D implements Twisty3DPuzzle {
) {
this.options.experimentalStickering = experimentalStickering;
// TODO
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.setStickering(experimentalStickering);
this.scheduleRenderCallback!(); // TODO
Expand Down
1 change: 0 additions & 1 deletion src/cubing/twisty/views/TwistyPlayerSettable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function err(propName: string): Error {
);
}

// prettier-ignore
export abstract class TwistyPlayerSettable extends ManagedCustomElement {
experimentalModel: TwistyPlayerModel = new TwistyPlayerModel();

Expand Down
3 changes: 0 additions & 3 deletions src/cubing/vendor/cstimer/src/js/scramble/444-solver.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck

/*eslint no-implicit-globals: "error"*/
/* eslint-disable @typescript-eslint/no-unsafe-return */
import { Alg } from "../../../../../alg";
import {
random333Scramble as getRandomScramble333,
Expand Down
4 changes: 0 additions & 4 deletions src/cubing/vendor/p-lazy/p-lazy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck

// TODO: Use private class fields when ESLint support it.

export class PLazy<T> extends Promise<T> {
constructor(executor) {
Expand Down Expand Up @@ -33,14 +31,12 @@ export class PLazy<T> extends Promise<T> {
then(onFulfilled, onRejected) {
this._promise = this._promise || new Promise(this._executor);

// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return this._promise.then(onFulfilled, onRejected);
}

catch(onRejected) {
this._promise = this._promise || new Promise(this._executor);

// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return this._promise.catch(onRejected);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/cubing/vendor/xyzzy/fto-solver-original.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable */
/* ftosolver.js - An FTO solver
version 0.5.1 (2021-04-20)
Expand Down
1 change: 0 additions & 1 deletion src/cubing/vendor/xyzzy/fto-solver.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable */
/* ftosolver.js - An FTO solver
version 0.5.1 (2021-04-20)
Expand Down
1 change: 0 additions & 1 deletion src/cubing/vendor/xyzzy/kilosolver.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable */
/* kilosolver.js - A kilominx solver
version 0.7 (2021-04-03)
Copyright (c) 2016, 2020, 2021
Expand Down
1 change: 0 additions & 1 deletion src/cubing/vendor/xyzzy/master_tetraminx-solver.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable */
/* master pyraminx scramble generator */
// From https://gist.github.com/torchlight/9a5c53da09d8e090756a228f4b5f3471
// Added to `cubing.js` under the GPL license by permission from the author (@torchlight/xyzzy).
Expand Down
1 change: 0 additions & 1 deletion src/cubing/vendor/xyzzy/redi_cube.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable */
/* Redi cube scramble generator */
// From https://torchlight.github.io/rediscrambler.js
// Added to `cubing.js` under the GPL license by permission from the author (@torchlight/xyzzy).
Expand Down
1 change: 0 additions & 1 deletion src/sites/alpha.twizzle.net/edit/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ window.addEventListener("DOMContentLoaded", () => {
setAlgDebug({ caratNISSNotationEnabled: true });
}

// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const appElement = document.querySelector("app")!;
(window as any).app = new App(appElement, getConfigFromURL());
});
2 changes: 0 additions & 2 deletions src/sites/experiments.cubing.net/cubing.js/twisty/inline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Alg } from "../../../../cubing/alg";
import { TwistyPlayer } from "../../../../cubing/twisty";

window.addEventListener("DOMContentLoaded", () => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const elem = document.querySelector("#js-init-example")!;
// tslint:disable-next-line: no-unused-expression
elem.appendChild(
Expand All @@ -18,7 +17,6 @@ window.addEventListener("DOMContentLoaded", () => {
});

window.addEventListener("DOMContentLoaded", () => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const elem = document.querySelector("#custom-pg3d")!;
// tslint:disable-next-line: no-unused-expression
elem.appendChild(
Expand Down
3 changes: 0 additions & 3 deletions src/sites/experiments.cubing.net/cubing.js/vr/proxy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class App {
const url = new URL(socketOrigin);
url.pathname = "/register-sender";
this.proxySender = new ExperimentalWebSocketProxySender(url.toString());
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
document.querySelector("#connect-bluetooth")!.addEventListener(
"click",
async () => {
Expand All @@ -38,7 +37,6 @@ class App {
},
);

// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
document.querySelector("#connect-keyboard")!.addEventListener(
"click",
async () => {
Expand All @@ -50,7 +48,6 @@ class App {
},
);

// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
document.querySelector("#reset")!.addEventListener("click", async () => {
this.proxySender.sendResetEvent();
if ("reset" in this.puzzle) {
Expand Down
1 change: 0 additions & 1 deletion src/test/chai-workarounds/Alg.chai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ declare global {
// be confusing and throw off tools). But we're doing this for now because
// it's what works.

// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace Chai {
interface Assertion {
identicalAlg(expected: Alg | string): Promise<void>;
Expand Down

0 comments on commit 7cccdcf

Please sign in to comment.