Skip to content

Commit 6007eac

Browse files
dx: Oxlint warns for unused ignores (#2229)
1 parent fac7f28 commit 6007eac

52 files changed

Lines changed: 78 additions & 103 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/infra-benchmarks/src/discriminated-union.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const bench = new Bench({
1010
name: 'discriminated union',
1111
time: 100,
1212
async setup() {
13-
// oxlint-disable-next-line typescript/no-explicit-any making sure GC has no impact on the results
13+
// oxlint-disable-next-line typescript/no-explicit-any -- making sure GC has no impact on the results
1414
(globalThis as any).gc();
1515
},
1616
});

apps/treeshake-test/compareResults.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function groupResultsByTest(results: typeof BenchmarkResults.infer) {
1919
if (!grouped[result.testFilename]) {
2020
grouped[result.testFilename] = {};
2121
}
22-
// oxlint-disable-next-line typescript/no-non-null-assertion it's there...
22+
// oxlint-disable-next-line typescript/no-non-null-assertion -- it's there...
2323
grouped[result.testFilename]![result.bundler] = result.size;
2424
}
2525
return grouped;

apps/typegpu-docs/src/examples/algorithms/mnist-inference/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ const network = createNetwork(await downloadLayers(root));
208208
const canvas = document.querySelector('canvas') as HTMLCanvasElement;
209209
const context = canvas.getContext('2d') as CanvasRenderingContext2D;
210210

211-
// oxlint-disable-next-line typescript/no-unnecessary-type-assertion not really unnecessary
211+
// oxlint-disable-next-line typescript/no-unnecessary-type-assertion -- not really unnecessary
212212
const bars = Array.from(document.querySelectorAll('.bar')) as HTMLDivElement[];
213213
const subgroupsEl = document.getElementById(
214214
'subgroups-status',

apps/typegpu-docs/src/examples/algorithms/probability/executor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class Executor {
104104
this.#pipelineCache.set(distribution, pipeline);
105105
}
106106

107-
// oxlint-disable-next-line typescript/no-non-null-assertion just checked it above
107+
// oxlint-disable-next-line typescript/no-non-null-assertion -- just checked it above
108108
return this.#pipelineCache.get(distribution)!;
109109
}
110110

apps/typegpu-docs/src/examples/exampleContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// oxlint-disable typescript/no-unnecessary-type-assertion import.meta.glob is inferred incorrectly by oxlint
1+
// oxlint-disable typescript/no-unnecessary-type-assertion -- import.meta.glob is inferred incorrectly by oxlint
22
import pathe from 'pathe';
33
import * as R from 'remeda';
44
import type {

apps/typegpu-docs/src/examples/image-processing/background-segmentation/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ if (!device || !adapter) {
6060
}
6161

6262
// monkey patching ONNX: https://github.com/microsoft/onnxruntime/issues/26107
63-
// oxlint-disable-next-line typescript/unbound-method we know what we're doing
63+
// oxlint-disable-next-line typescript/unbound-method -- we know what we're doing
6464
const oldRequestAdapter = navigator.gpu.requestAdapter;
65-
// oxlint-disable-next-line typescript/unbound-method we know what we're doing
65+
// oxlint-disable-next-line typescript/unbound-method -- we know what we're doing
6666
const oldRequestDevice = adapter.requestDevice;
6767
navigator.gpu.requestAdapter = async () => adapter;
6868
adapter.requestDevice = async () => device;

apps/typegpu-docs/src/examples/rendering/function-visualizer/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const computeLayout = tgpu.bindGroupLayout({
6868

6969
const functionExprSlot = tgpu.slot<TgpuRawCodeSnippet<d.F32>>();
7070

71-
// oxlint-disable-next-line no-unused-vars it is used in wgsl
71+
// oxlint-disable-next-line no-unused-vars -- it is used in wgsl
7272
const interpolatedFunction = (x: number) => {
7373
'use gpu';
7474
return functionExprSlot.$;

apps/typegpu-docs/src/examples/tests/tgsl-parsing-test/logical-expressions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// oxlint-disable typescript/no-unnecessary-boolean-literal-compare this is a test
1+
// oxlint-disable typescript/no-unnecessary-boolean-literal-compare -- this is a test
22
import tgpu, { d, std } from 'typegpu';
33

44
const Schema = d.struct({

apps/typegpu-docs/src/pages/benchmark/components/checkbox-tree.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function TestCheckbox(props: { suiteName: string; testName: string }) {
8484
const state = selected.includes(identifier) ? 'checked' : 'unchecked';
8585

8686
function changeState() {
87-
// oxlint-disable-next-line no-unused-expressions it's a call
87+
// oxlint-disable-next-line no-unused-expressions -- it's a call
8888
selected.includes(identifier)
8989
? setSelected(selected.filter((item) => item !== identifier))
9090
: setSelected([...selected, identifier]);

apps/typegpu-docs/src/pages/benchmark/suites.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export type SuiteSetupOptions = {
2525
d: TypeGPUDataModule;
2626
};
2727

28-
// oxlint-disable-next-line typescript/no-explicit-any <sshhhhhh...>
28+
// oxlint-disable-next-line typescript/no-explicit-any -- sshhhhhh...
2929
export type Suite<T extends { bench: Bench } = any> = {
3030
setup: (options: SuiteSetupOptions) => T;
3131
tests: Record<string, (getCtx: () => T) => () => Promise<unknown>>;

0 commit comments

Comments
 (0)