Make any typing linting opt-out instead of opt-in (#6542)

# Description of Changes
Reconfigure linting of `any` type to an opt-out instead of an opt-in
strategy now that we're close enough to everything supporting it. Also
slightly expands the scope of things included in the linting.
This commit is contained in:
James Brunton
2026-06-05 14:11:26 +00:00
committed by GitHub
parent 9ab404b2e6
commit e79f4a044f
9 changed files with 45 additions and 43 deletions
-5
View File
@@ -1,5 +0,0 @@
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import "@testing-library/jest-dom";
+2 -2
View File
@@ -99,12 +99,12 @@ Object.defineProperty(globalThis, "crypto", {
subtle: {
digest: vi
.fn()
.mockImplementation(async (_algorithm: string, _data: any) => {
.mockImplementation(async (_algorithm: string, _data: BufferSource) => {
// Always return the mock hash buffer regardless of input
return mockHashBuffer.slice();
}),
},
getRandomValues: vi.fn().mockImplementation((array: any) => {
getRandomValues: vi.fn().mockImplementation((array: Uint8Array) => {
// Mock getRandomValues if needed
for (let i = 0; i < array.length; i++) {
array[i] = Math.floor(Math.random() * 256);
+13 -8
View File
@@ -1,4 +1,9 @@
import { createTheme, MantineColorsTuple } from "@mantine/core";
import {
createTheme,
MantineColorsTuple,
MantineTheme,
MantineThemeComponent,
} from "@mantine/core";
// Define color tuples using CSS variables
const primary: MantineColorsTuple = [
@@ -113,7 +118,7 @@ export const mantineTheme = createTheme({
},
variants: {
// Custom button variant for PDF tools
pdfTool: (_theme: any) => ({
pdfTool: (_theme: MantineTheme) => ({
root: {
backgroundColor: "var(--bg-surface)",
border: "1px solid var(--border-default)",
@@ -125,7 +130,7 @@ export const mantineTheme = createTheme({
},
}),
},
} as any,
} as MantineThemeComponent,
Paper: {
styles: {
@@ -146,7 +151,7 @@ export const mantineTheme = createTheme({
},
},
Textarea: {
styles: (_theme: any) => ({
styles: (_theme: MantineTheme) => ({
input: {
backgroundColor: "var(--bg-surface)",
borderColor: "var(--border-default)",
@@ -164,7 +169,7 @@ export const mantineTheme = createTheme({
},
TextInput: {
styles: (_theme: any) => ({
styles: (_theme: MantineTheme) => ({
input: {
backgroundColor: "var(--bg-surface)",
borderColor: "var(--border-default)",
@@ -182,7 +187,7 @@ export const mantineTheme = createTheme({
},
PasswordInput: {
styles: (_theme: any) => ({
styles: (_theme: MantineTheme) => ({
input: {
backgroundColor: "var(--bg-surface)",
borderColor: "var(--border-default)",
@@ -223,7 +228,7 @@ export const mantineTheme = createTheme({
color: "var(--text-primary)",
"--combobox-option-hover": "var(--hover-bg)",
"--combobox-option-selected": "var(--color-primary-100)",
} as any,
},
},
},
@@ -251,7 +256,7 @@ export const mantineTheme = createTheme({
color: "var(--text-primary)",
"--combobox-option-hover": "var(--hover-bg)",
"--combobox-option-selected": "var(--color-primary-100)",
} as any,
},
},
},
Tooltip: {