diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 396b301225..fdea7f935f 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -70,6 +70,8 @@ module.exports = { 'import/no-default-export': 'error', 'import/no-unresolved': 'off', // plugin doesn't know anything 'jsx-a11y/label-has-associated-control': [2, { controlComponents: ['button'] }], + // only worry about console.log + 'no-console': ['error', { allow: ['warn', 'error', 'info', 'table'] }], 'no-param-reassign': 'error', 'no-restricted-imports': [ 'error', diff --git a/app/api/hooks.ts b/app/api/hooks.ts index 23a374c54a..66773b0120 100644 --- a/app/api/hooks.ts +++ b/app/api/hooks.ts @@ -346,7 +346,7 @@ export const wrapQueryClient = (api: A, queryClient: QueryC // directly without further processing throw data } - console.log(options.explanation) + console.info(options.explanation) return { type: 'error' as const, data } }), ...options, diff --git a/app/api/window.ts b/app/api/window.ts index 0a983f1896..72e910e41d 100644 --- a/app/api/window.ts +++ b/app/api/window.ts @@ -34,7 +34,7 @@ function handleResult(result: ApiResult): T { } function logHeading(s: string) { - console.log(`%c${s}`, 'font-size: 16px; font-weight: bold;') + console.info(`%c${s}`, 'font-size: 16px; font-weight: bold;') } if (typeof window !== 'undefined') { diff --git a/app/forms/image-upload.tsx b/app/forms/image-upload.tsx index 0b85ba3361..9a77b95dd6 100644 --- a/app/forms/image-upload.tsx +++ b/app/forms/image-upload.tsx @@ -515,7 +515,7 @@ export function Component() { .catch((e) => { // eat a 404 since that's what we want. anything else should still blow up if (e.statusCode === 404) { - console.log( + console.info( '/v1/images 404 is expected. It means the image name is not taken.' ) return null diff --git a/app/msw-mock-api.ts b/app/msw-mock-api.ts index fe8ac25847..2aa6fc5b61 100644 --- a/app/msw-mock-api.ts +++ b/app/msw-mock-api.ts @@ -15,7 +15,7 @@ function getChaos() { const chaos = getChaos() if (process.env.NODE_ENV !== 'production' && chaos) { - console.log(` + console.info(` ▄████████ ▄█ █▄ ▄████████ ▄██████▄ ▄████████ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ █▀ ███ ███ ███ ███ ███ ███ ███ █▀ @@ -34,7 +34,7 @@ if (process.env.NODE_ENV !== 'production' && chaos) { ███ ███ ███ ███ ███ ███ ▄███ ███ ███ ▀█ ███ █▀ ▀██████▀ ████████▀ ██████████ `) - console.log(`Running MSW in CHAOS MODE with ${chaos}% likelihood of random failure`) + console.info(`Running MSW in CHAOS MODE with ${chaos}% likelihood of random failure`) } /** Return true for failure with a given likelihood */ diff --git a/package-lock.json b/package-lock.json index 5159e7bc15..bd20cf4668 100644 --- a/package-lock.json +++ b/package-lock.json @@ -87,7 +87,7 @@ "ip-num": "^1.5.1", "jsdom": "^25.0.1", "msw": "^2.7.0", - "oxlint": "^0.14.1", + "oxlint": "^0.15.5", "patch-package": "^8.0.0", "postcss": "^8.4.49", "postcss-import": "^16.1.0", @@ -1656,9 +1656,9 @@ } }, "node_modules/@oxlint/darwin-arm64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@oxlint/darwin-arm64/-/darwin-arm64-0.14.1.tgz", - "integrity": "sha512-P76G8QCHOkLm+8HYk2/5uR4sPnx6uxE5Y8ik8dgCV0XjrNR+/Sg8v2aQ1BmWeEnPGkBXTt1VSECO9BdT1HVeDw==", + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/@oxlint/darwin-arm64/-/darwin-arm64-0.15.5.tgz", + "integrity": "sha512-LqUh/+iRwj2mIDMqiYOjf2nx/BjpMVY+2PQvpOgSd2mNXrudD02KUTNCVSTAhUuGe86SYQblFgBz2cYfbTUa9A==", "cpu": [ "arm64" ], @@ -1670,9 +1670,9 @@ ] }, "node_modules/@oxlint/darwin-x64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@oxlint/darwin-x64/-/darwin-x64-0.14.1.tgz", - "integrity": "sha512-bFsNkDtiDEhBKsX2DGLGCVhaRSDP2VgnNHOejjVnLK2LURvOglHMrp4NXxxtHArPAfiP6oezja6q8GmsQbcZ4w==", + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/@oxlint/darwin-x64/-/darwin-x64-0.15.5.tgz", + "integrity": "sha512-3AdgAKrZsZ1Tk4XW5GosNKfRk5tdAzYgZl/9lJSCJr2I5mN6hrTn/WTIJv4tJrLlQbFsD++5R5HCQblp9vfFNg==", "cpu": [ "x64" ], @@ -1684,9 +1684,9 @@ ] }, "node_modules/@oxlint/linux-arm64-gnu": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-gnu/-/linux-arm64-gnu-0.14.1.tgz", - "integrity": "sha512-OWJY1qxJgsaLyQvh97MdpI2Mr8FD90ssGw8o0rG63lWIc3PJESmq9NKU0ZwwUbPbbEpKmwdG3aiZRjh4G1k0cQ==", + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-gnu/-/linux-arm64-gnu-0.15.5.tgz", + "integrity": "sha512-iKqoRSn+aIYqku99xBFzhZFaRXTIpFhFIh37MFjzhPvvVN5qQjxBzvePfuI1eTVuttviELKP5eR5sSUP2aDKxw==", "cpu": [ "arm64" ], @@ -1698,9 +1698,9 @@ ] }, "node_modules/@oxlint/linux-arm64-musl": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-musl/-/linux-arm64-musl-0.14.1.tgz", - "integrity": "sha512-GPbggyGQV4+5JzpA7l+1liPHkzCDB9ZyPLcHpRtNJJfTQ60JnBww4l3eR7LCukiAor6Sxmlbl+t1OZGjL3zUUA==", + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-musl/-/linux-arm64-musl-0.15.5.tgz", + "integrity": "sha512-pYNCI9iqPcma8hIuJb/v40mOjuWtJjYaOxbDvSecjtKb9EFqZu9A9WDhgg766S+8o1Iit72LLtSq7q0cyh7+ww==", "cpu": [ "arm64" ], @@ -1712,9 +1712,9 @@ ] }, "node_modules/@oxlint/linux-x64-gnu": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-gnu/-/linux-x64-gnu-0.14.1.tgz", - "integrity": "sha512-4ug2y9fEa2MB4wAFfITkm1oJ2m14YjWQaKxKN9bRazPng2k3wivVAvwc6tKj866HftZxXo3FlOIrE1YP6BxcSw==", + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-gnu/-/linux-x64-gnu-0.15.5.tgz", + "integrity": "sha512-jDrA5vSdEhKov1aMFvWLzFpuGneVhryLXTqcbqdUzZOe1Ss1S2XhRabHwLlhDRemCA4Id7fdgZ5qCNrzhUsTdQ==", "cpu": [ "x64" ], @@ -1726,9 +1726,9 @@ ] }, "node_modules/@oxlint/linux-x64-musl": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-musl/-/linux-x64-musl-0.14.1.tgz", - "integrity": "sha512-bsG5ZxFWKml6BQMHbusvNsEU3O0a5BurlrtdXyxlOBZyrWyG6v3pcXM+NX4YT8gaeoK71iCH5I+ymwI9KOwO/w==", + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-musl/-/linux-x64-musl-0.15.5.tgz", + "integrity": "sha512-eS4ANgxQCNnGG1aeQ28cUTr/3iitFF9TBK1BfTn3+WW3Nvkfcxo+u2L5tKEq+cxytHuu9hqEpTn1AvNyAH3MQw==", "cpu": [ "x64" ], @@ -1740,9 +1740,9 @@ ] }, "node_modules/@oxlint/win32-arm64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@oxlint/win32-arm64/-/win32-arm64-0.14.1.tgz", - "integrity": "sha512-Soc3kRTqz++kleXz+Y4IlfiGY+cwXlOiLCVwcRMAnY+TSaP4h2tPXN/cbOypsE7PPq2/kk7JPGUaEKZ/i4G23A==", + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/@oxlint/win32-arm64/-/win32-arm64-0.15.5.tgz", + "integrity": "sha512-oJPS+dTlwgVoSb6ieH/4MP+LPxZUMPsUr5k0YLpisMEEfccGXLaGzWKfzgi5dzlOsN6EUr2NgcFaqpa8tRiq8w==", "cpu": [ "arm64" ], @@ -1754,9 +1754,9 @@ ] }, "node_modules/@oxlint/win32-x64": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@oxlint/win32-x64/-/win32-x64-0.14.1.tgz", - "integrity": "sha512-qyjlv5XPxKJ1g9F4ZpNP0m/I2tgHj4lebmyAveaLos3RZWut983WaK3abq4Mr74mIiwfyLA67/m2khG5aXYN2Q==", + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/@oxlint/win32-x64/-/win32-x64-0.15.5.tgz", + "integrity": "sha512-rvk3CN0U37w7OlLvkD1TqqcLvoQdWVtTAF5KckuASOeYo/0cuzNFIvo/7cHYmvewQXuYULxvUHGTzxWYSmVPjQ==", "cpu": [ "x64" ], @@ -11168,9 +11168,9 @@ } }, "node_modules/oxlint": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-0.14.1.tgz", - "integrity": "sha512-FwcjPfQu806ibSv73Y9tUM8ezUyd811dp3JwEEOC/dIAgd93egRsRNnFauuAq/WuTjIDv73tbr9hB8MziH31Eg==", + "version": "0.15.5", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-0.15.5.tgz", + "integrity": "sha512-hpckVhX+oiDyxYk7rwHqxZAmtOAQxQbkvxGM9NTQ3dTQC8X/5zcoBA9cZdrjVENA2TXrjg7l2qmkkzX7seteoQ==", "dev": true, "license": "MIT", "bin": { @@ -11184,14 +11184,14 @@ "url": "https://github.com/sponsors/Boshen" }, "optionalDependencies": { - "@oxlint/darwin-arm64": "0.14.1", - "@oxlint/darwin-x64": "0.14.1", - "@oxlint/linux-arm64-gnu": "0.14.1", - "@oxlint/linux-arm64-musl": "0.14.1", - "@oxlint/linux-x64-gnu": "0.14.1", - "@oxlint/linux-x64-musl": "0.14.1", - "@oxlint/win32-arm64": "0.14.1", - "@oxlint/win32-x64": "0.14.1" + "@oxlint/darwin-arm64": "0.15.5", + "@oxlint/darwin-x64": "0.15.5", + "@oxlint/linux-arm64-gnu": "0.15.5", + "@oxlint/linux-arm64-musl": "0.15.5", + "@oxlint/linux-x64-gnu": "0.15.5", + "@oxlint/linux-x64-musl": "0.15.5", + "@oxlint/win32-arm64": "0.15.5", + "@oxlint/win32-x64": "0.15.5" } }, "node_modules/p-limit": { diff --git a/package.json b/package.json index 4dc0dbeab8..56f18247f7 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "e2e": "playwright test", "e2ec": "playwright test --project=chrome", "lint": "eslint --ext .js,.ts,.tsx app test mock-api", - "lint-fast": "npm run lint -- --cache", + "oxlint": "oxlint", "fmt": "prettier --cache --write . && npm run lint -- --fix", "openapi-gen-ts": "openapi-gen-ts", "prettier": "prettier", @@ -109,7 +109,7 @@ "ip-num": "^1.5.1", "jsdom": "^25.0.1", "msw": "^2.7.0", - "oxlint": "^0.14.1", + "oxlint": "^0.15.5", "patch-package": "^8.0.0", "postcss": "^8.4.49", "postcss-import": "^16.1.0",