diff --git a/README.md b/README.md index 690576db88..4d2be7beab 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ $ yarn e2e:headless ### Code style -_tl;dr_: Use oxfmt and eslint! +_tl;dr_: Use oxfmt and oxlint! Format code with oxfmt to get uniform codestyle: @@ -76,14 +76,13 @@ Format code with oxfmt to get uniform codestyle: $ yarn format ``` -Lint code with [eslint](http://eslint.org/), including [eslint react plugin](https://github.com/yannickcr/eslint-plugin-react), [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import), [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y#readme). -Beside linting with globally installed eslint, eslint can be invoked with `yarn`: +Lint code with [oxlint](https://oxc.rs/). Beside linting with globally installed oxlint, oxlint can be invoked with `yarn`: ``` $ yarn lint ``` -Rules are configured in `./.eslintrc.js` and extends [eslint-config-react-app](https://github.com/facebook/create-react-app/tree/master/packages/eslint-config-react-app). If feeling brave, try `eslint --fix`. +Rules are configured in `./oxlint.config.ts` and extends our [base config]("https://github.com/ndlano/frontend-packages/tree/master/packages/oxlint-config"). If feeling brave, try `oxlint --fix`. ## Other scripts diff --git a/custom-typings/index-javascript.d.ts b/custom-typings/index-javascript.d.ts index 3e04dda96d..636edbbaf2 100644 --- a/custom-typings/index-javascript.d.ts +++ b/custom-typings/index-javascript.d.ts @@ -1,7 +1,9 @@ -/* +/** * Copyright (c) 2019-present, NDLA. + * * This source code is licensed under the GPLv3 license found in the * LICENSE file in the root directory of this source tree. + * */ declare module "*"; diff --git a/custom-typings/ndla-embed.ts b/custom-typings/ndla-embed.ts index 026fe573fa..9104344aad 100644 --- a/custom-typings/ndla-embed.ts +++ b/custom-typings/ndla-embed.ts @@ -1,13 +1,15 @@ -/* +/** * Copyright (c) 2022-present, NDLA. + * * This source code is licensed under the GPLv3 license found in the * LICENSE file in the root directory of this source tree. + * */ import React from "react"; declare global { - // eslint-disable-next-line @typescript-eslint/no-namespace + // oxlint-disable-next-line typescript/no-namespace namespace JSX { // NOTE: We use `ndlaembed` for embedding content, this isn't a regular HTML-tag. // Let's declare it so typescript doesn't complain when we're building it in JSX. diff --git a/e2e/apiMock.ts b/e2e/apiMock.ts index 4f626352a7..95fa69f528 100644 --- a/e2e/apiMock.ts +++ b/e2e/apiMock.ts @@ -7,8 +7,7 @@ */ import { readFile, writeFile } from "fs/promises"; -import type { TestInfo } from "@playwright/test"; -import { test as Ptest } from "@playwright/test"; +import { test as Ptest, type TestInfo } from "@playwright/test"; import { brightcoveTokenMock, copyrightMock, getNoteUsersMock, responsiblesMock, userDataMock } from "./mockResponses"; const mockDir = "e2e/apiMocks/"; @@ -35,7 +34,7 @@ const mockFile = ({ titlePath, title: test_name }: TestInfo) => { */ export const test = Ptest.extend({ harCheckpoint: [ - async ({ context, page }, use) => { + async ({ context, page }, call) => { let checkpointIndex = 0; // Appending the checkpoint index to the request headers @@ -59,7 +58,7 @@ export const test = Ptest.extend({ } // Appending the new checkpoint index to the request headers - await use(async () => { + await call(async () => { checkpointIndex += 1; if (process.env.RECORD_FIXTURES !== "true") { await page.setExtraHTTPHeaders({ @@ -70,7 +69,7 @@ export const test = Ptest.extend({ }, { auto: true, scope: "test" }, ], - page: async ({ page }, use, testInfo) => { + page: async ({ page }, call, testInfo) => { // Creating the API mocking for the wanted API's await page.routeFromHAR(mockFile(testInfo), { update: process.env.RECORD_FIXTURES === "true", @@ -79,12 +78,12 @@ export const test = Ptest.extend({ updateContent: "embed", }); - await use(page); + await call(page); await page.close(); }, - context: async ({ context }, use, testInfo) => { - await use(context); + context: async ({ context }, call, testInfo) => { + await call(context); await context.close(); // Removing sensitive data from the HAR file after saving. Har files are saved on close. diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index 4a7a285f37..0000000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2024-present, NDLA. - * - * This source code is licensed under the GPLv3 license found in the - * LICENSE file in the root directory of this source tree. - * - */ - -// @ts-check - -import config from "eslint-config-ndla"; -import tseslint from "typescript-eslint"; - -export default tseslint.config(...config, { - ignores: ["**/h5pResizer.ts"], -}); diff --git a/oxlint.config.ts b/oxlint.config.ts new file mode 100644 index 0000000000..67b83a602f --- /dev/null +++ b/oxlint.config.ts @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2026-present, NDLA. + * + * This source code is licensed under the GPLv3 license found in the + * LICENSE file in the root directory of this source tree. + * + */ + +import { baseConfig } from "@ndla/oxlint-config"; +import { defineConfig } from "oxlint"; + +export default defineConfig({ + extends: [baseConfig], + options: { + typeAware: true, + }, + ignorePatterns: ["**/h5pResizer.ts"], + overrides: [ + { + files: ["**/__tests__/**/*"], + rules: { + "import-js/no-extraneous-dependencies": "off", + }, + }, + { + files: ["**/*"], + rules: { + "typescript/unbound-method": "off", + }, + }, + ], +}); diff --git a/package.json b/package.json index d4950d462d..8e9e1afc09 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "clean": "node scripts/clean.mjs", "check-all": "yarn lint && yarn tsc --noEmit && yarn test", "lint": "yarn format-check && yarn lint-es", - "lint-es": "eslint --cache --cache-location '.eslintcache/' --max-warnings=0 src", + "lint-es": "oxlint --deny-warnings", "format-check": "oxfmt --check", "format": "oxfmt", "start:tsc": "tsc -w", @@ -32,6 +32,7 @@ }, "devDependencies": { "@babel/core": "^7.29.0", + "@ndla/oxlint-config": "^0.1.0", "@ndla/preset-panda": "^0.0.74", "@ndla/types-backend": "^1.0.106", "@ndla/types-embed": "^5.0.21-alpha.0", @@ -48,7 +49,6 @@ "@types/is-hotkey": "^0.1.10", "@types/lodash-es": "^4.17.12", "@types/node": "^24.10.12", - "@types/node-fetch": "^2.6.13", "@types/prismjs": "^1.26.5", "@types/react": "^19.2.13", "@types/react-dom": "^19.2.3", @@ -56,16 +56,16 @@ "concurrently": "^9.2.1", "cross-env": "^10.1.0", "eslint": "^9.39.2", - "eslint-config-ndla": "^6.0.14-alpha.0", "filter-console": "^1.0.0", "jsdom": "^28.0.0", "nock": "^14.0.10", + "oxlint": "^1.57.0", + "oxlint-tsgolint": "^0.18.0", "postcss": "^8.5.6", "postcss-preset-env": "^11.1.3", "rolldown": "^1.0.0-rc.6", "tsx": "^4.21.0", "typescript": "^5.9.3", - "typescript-eslint": "^8.54.0", "vite": "^7.3.1", "vitest": "^4.0.18" }, diff --git a/postcss.config.mjs b/postcss.config.mjs index 9195ab3137..e57ef13c59 100644 --- a/postcss.config.mjs +++ b/postcss.config.mjs @@ -9,6 +9,8 @@ import panda from "@pandacss/dev/postcss"; import postcssPresetEnv from "postcss-preset-env"; -export default { +const config = { plugins: [panda(), postcssPresetEnv()], }; + +export default config; diff --git a/scripts/clean.mjs b/scripts/clean.mjs index 7caf7d33f8..d4cd65b55f 100644 --- a/scripts/clean.mjs +++ b/scripts/clean.mjs @@ -1,3 +1,11 @@ +/** + * Copyright (c) 2026-present, NDLA. + * + * This source code is licensed under the GPLv3 license found in the + * LICENSE file in the root directory of this source tree. + * + */ + import { rm } from "node:fs/promises"; // This will do nothing if the path does not exist. diff --git a/src/components/DisplayEmbed/helpers/h5pResizer.ts b/src/components/DisplayEmbed/helpers/h5pResizer.ts index 0d39251167..54f1de372a 100644 --- a/src/components/DisplayEmbed/helpers/h5pResizer.ts +++ b/src/components/DisplayEmbed/helpers/h5pResizer.ts @@ -16,7 +16,7 @@ */ actionHandlers.hello = (iframe, data, respond) => { // Make iframe responsive - iframe.style.width = "100%"; // eslint-disable-line no-param-reassign + iframe.style.width = "100%"; // Tell iframe that it needs to resize when our window resizes const resize = () => { @@ -41,7 +41,7 @@ // Do not resize unless page and scrolling differs if (iframe.clientHeight !== data.scrollHeight || data.scrollHeight !== data.clientHeight) { // Reset iframe height, in case content has shrinked. - iframe.style.height = `${data.clientHeight}px`; // eslint-disable-line no-param-reassign + iframe.style.height = `${data.clientHeight}px`; respond("resizePrepared"); } }; @@ -50,7 +50,7 @@ * Resize parent and iframe to desired height. */ actionHandlers.resize = (iframe, data) => { - iframe.style.height = `${data.scrollHeight}px`; // eslint-disable-line no-param-reassign + iframe.style.height = `${data.scrollHeight}px`; }; // Listen for messages from iframes diff --git a/src/components/Form/SearchSaveButton.tsx b/src/components/Form/SearchSaveButton.tsx index c031255011..a86d85a4be 100644 --- a/src/components/Form/SearchSaveButton.tsx +++ b/src/components/Form/SearchSaveButton.tsx @@ -88,7 +88,7 @@ const SearchSaveButton = ({ filters, searchContentType, userData }: Props) => { useEffect(() => { setError(""); - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, [window.location.search]); const handleSuccess = () => { diff --git a/src/components/H5PElement/H5PElement.tsx b/src/components/H5PElement/H5PElement.tsx index 08d8fa1cbb..384c74225e 100644 --- a/src/components/H5PElement/H5PElement.tsx +++ b/src/components/H5PElement/H5PElement.tsx @@ -63,7 +63,7 @@ const H5PElement = ({ h5pUrl, onSelect, onClose, locale, canReturnResources }: P window.addEventListener("message", handleH5PClose); try { fetchAndSetH5PUrl(); - } catch (e) { + } catch (_) { setFetchFailed(true); } @@ -71,7 +71,8 @@ const H5PElement = ({ h5pUrl, onSelect, onClose, locale, canReturnResources }: P window.removeEventListener("message", handleH5PChange); window.removeEventListener("message", handleH5PClose); }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps + }, []); const fetchAndSetH5PUrl = async () => { const data = h5pUrl ? await editH5PiframeUrl(h5pUrl, locale) : await fetchH5PiframeUrl(locale, canReturnResources); diff --git a/src/components/MonacoEditor/MonacoEditor.tsx b/src/components/MonacoEditor/MonacoEditor.tsx index 3b6b4778b5..b21c3249f4 100644 --- a/src/components/MonacoEditor/MonacoEditor.tsx +++ b/src/components/MonacoEditor/MonacoEditor.tsx @@ -20,6 +20,7 @@ import "monaco-editor/esm/vs/editor/contrib/fontZoom/browser/fontZoom"; import "monaco-editor/esm/vs/editor/contrib/linesOperations/browser/linesOperations"; import "monaco-editor/esm/vs/editor/contrib/multicursor/browser/multicursor"; import * as monaco from "monaco-editor/esm/vs/editor/editor.api"; +// oxlint-disable-next-line import/default import htmlWorker from "monaco-editor/esm/vs/language/html/html.worker?worker"; // Uncomment the following line to test all monaco-editor features // import * as monaco from "monaco-editor"; @@ -96,7 +97,7 @@ export const MonacoEditor = ({ value, onChange, onSave, size }: Props) => { }); }); return () => editor?.dispose(); - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, []); useEffect(() => { diff --git a/src/components/PreviewDraft/useTransformedArticle.ts b/src/components/PreviewDraft/useTransformedArticle.ts index 605f862779..093acb98d2 100644 --- a/src/components/PreviewDraft/useTransformedArticle.ts +++ b/src/components/PreviewDraft/useTransformedArticle.ts @@ -45,8 +45,6 @@ export const useTransformedArticle = ({ articleLanguage: getUpdatedLanguage(draft.language), }); - const disclaimer = transform(disclaimerContent?.data ?? "", {}); - return { title: draft.title ? parse(draft.title) : "", introduction: draft.introduction ? parse(draft.introduction) : "", @@ -54,9 +52,9 @@ export const useTransformedArticle = ({ copyright: draft.copyright, published: draft.published ? formatDate(draft.published) : "", footNotes: [], - disclaimer, + disclaimer: transform(disclaimerContent?.data ?? "", {}), }; - }, [transformedContent.data, draft, previewAlt]); + }, [transformedContent.data, draft, previewAlt, disclaimerContent]); return { article, draft }; }; diff --git a/src/components/SlateEditor/PlainTextEditor.tsx b/src/components/SlateEditor/PlainTextEditor.tsx index 572161112a..ef1226167a 100644 --- a/src/components/SlateEditor/PlainTextEditor.tsx +++ b/src/components/SlateEditor/PlainTextEditor.tsx @@ -93,7 +93,7 @@ const PlainTextEditor = ({ status: undefined, })); } - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, [status]); return ( diff --git a/src/components/SlateEditor/RichTextEditor.tsx b/src/components/SlateEditor/RichTextEditor.tsx index dc2000aa2f..b5e7f00a9a 100644 --- a/src/components/SlateEditor/RichTextEditor.tsx +++ b/src/components/SlateEditor/RichTextEditor.tsx @@ -108,7 +108,7 @@ const RichTextEditor = ({ } } prevSubmitted.current = submitted; - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, [status, submitted]); const renderElement = useCallback((renderProps: RenderElementProps) => { @@ -120,7 +120,7 @@ const RichTextEditor = ({ } } return renderInvalidElement?.({ ...renderProps, editor }) ??

{children}

; - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, []); const renderLeaf = useCallback((renderProps: RenderLeafProps) => { @@ -132,7 +132,7 @@ const RichTextEditor = ({ } } return {children}; - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, []); const onDragStart = useCallback((e: DragEvent) => nativeOnDragStart(editor, e), [editor]); diff --git a/src/components/SlateEditor/VisualElementEditor.tsx b/src/components/SlateEditor/VisualElementEditor.tsx index 8563c27600..2c14bbb7a8 100644 --- a/src/components/SlateEditor/VisualElementEditor.tsx +++ b/src/components/SlateEditor/VisualElementEditor.tsx @@ -42,7 +42,7 @@ const VisualElementEditor = ({ value, plugins, onChange, types, language }: Prop editor.reinitialize({ value }); } - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, [value]); return ( diff --git a/src/components/SlateEditor/ndlaEmbed.ts b/src/components/SlateEditor/ndlaEmbed.ts index b629ec8b11..a2a2ea1dc1 100644 --- a/src/components/SlateEditor/ndlaEmbed.ts +++ b/src/components/SlateEditor/ndlaEmbed.ts @@ -9,7 +9,7 @@ import { HTMLAttributes, Attributes } from "react"; declare module "react/jsx-runtime" { - // eslint-disable-next-line @typescript-eslint/no-namespace + // oxlint-disable-next-line typescript/no-namespace namespace JSX { interface IntrinsicElements { ndlaembed: HTMLAttributes & Attributes; diff --git a/src/components/SlateEditor/plugins/comment/inline/SlateCommentInline.tsx b/src/components/SlateEditor/plugins/comment/inline/SlateCommentInline.tsx index ac7d7573cf..52dc1fad3b 100644 --- a/src/components/SlateEditor/plugins/comment/inline/SlateCommentInline.tsx +++ b/src/components/SlateEditor/plugins/comment/inline/SlateCommentInline.tsx @@ -105,6 +105,7 @@ const SlateCommentInline = ({ attributes, editor, element, children }: Props) => > preventAutoFocusInEditor(e.nativeEvent)} diff --git a/src/components/SlateEditor/plugins/external/ExternalEmbedForm.tsx b/src/components/SlateEditor/plugins/external/ExternalEmbedForm.tsx index 50d14e8d50..9d36b4a6fc 100644 --- a/src/components/SlateEditor/plugins/external/ExternalEmbedForm.tsx +++ b/src/components/SlateEditor/plugins/external/ExternalEmbedForm.tsx @@ -226,7 +226,7 @@ const InnerForm = () => { if (rule) { try { url = await rule.transform(url); - } catch (e) { + } catch (_) { setFieldError("url", t("form.content.link.unSupported")); return; } @@ -245,7 +245,7 @@ const InnerForm = () => { }), true, ); - } catch (e) { + } catch (_) { const provider = getWhitelistedProvider(url); setValues( (values) => ({ ...values, height: provider?.height ?? "486px", resource: "iframe", validUrl: url, url }), diff --git a/src/components/SlateEditor/plugins/file/SlateFile.tsx b/src/components/SlateEditor/plugins/file/SlateFile.tsx index f8f1077a83..70701a7956 100644 --- a/src/components/SlateEditor/plugins/file/SlateFile.tsx +++ b/src/components/SlateEditor/plugins/file/SlateFile.tsx @@ -119,7 +119,7 @@ export const SlateFile = ({ value={fileName} onKeyDown={onKeyDown} onChange={(e) => setFileName(e.currentTarget.value)} - // eslint-disable-next-line jsx-a11y/no-autofocus + // oxlint-disable-next-line jsx_a11y/no-autofocus autoFocus /> { useEffect(() => { getMissingFiles(files).then(setMissingFilePaths); // We only need to check this once, as adding further files guarantees them to "exist" - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, []); const onEditFileList = useCallback( diff --git a/src/components/SlateEditor/plugins/footnote/FootnoteForm.tsx b/src/components/SlateEditor/plugins/footnote/FootnoteForm.tsx index 43ef777200..a720e0b6e4 100644 --- a/src/components/SlateEditor/plugins/footnote/FootnoteForm.tsx +++ b/src/components/SlateEditor/plugins/footnote/FootnoteForm.tsx @@ -66,7 +66,7 @@ const FootnoteForm = ({ isEdit, footnote, onRemove, onClose, onSave }: Props) => const handleSave = async (values: FootnoteFormikValues, actions: FormikHelpers) => { const { setSubmitting } = actions; setSubmitting(true); - await onSave({ ...values, authors: values.authors }); + onSave({ ...values, authors: values.authors }); setSubmitting(false); }; diff --git a/src/components/SlateEditor/plugins/image/ImageEditor/ImageFocalPointEdit.tsx b/src/components/SlateEditor/plugins/image/ImageEditor/ImageFocalPointEdit.tsx index 4c78ae3b88..c7b7c88d11 100644 --- a/src/components/SlateEditor/plugins/image/ImageEditor/ImageFocalPointEdit.tsx +++ b/src/components/SlateEditor/plugins/image/ImageEditor/ImageFocalPointEdit.tsx @@ -104,6 +104,7 @@ const ImageFocalPointEdit = ({ language, onFocalPointChange, image }: Props) =>
+ {/* oxlint-disable-next-line jsx-a11y-js/no-noninteractive-element-interactions */} {values.alt} { toggleEditMode(details.open)}> { if (!details.open) { diff --git a/src/components/SlateEditor/plugins/link/LinkForm.tsx b/src/components/SlateEditor/plugins/link/LinkForm.tsx index 72a82b36f9..504e315400 100644 --- a/src/components/SlateEditor/plugins/link/LinkForm.tsx +++ b/src/components/SlateEditor/plugins/link/LinkForm.tsx @@ -135,7 +135,7 @@ const LinkForm = ({ onSave, linkData, onRemove }: Props) => { {t("form.content.link.text")} diff --git a/src/components/SlateEditor/plugins/link/index.tsx b/src/components/SlateEditor/plugins/link/index.tsx index d2add32cc5..04ea23aeea 100644 --- a/src/components/SlateEditor/plugins/link/index.tsx +++ b/src/components/SlateEditor/plugins/link/index.tsx @@ -39,7 +39,7 @@ export interface ContentLinkElement { export const linkSerializer = createSerializer({ deserialize(el, children) { if (el.tagName.toLowerCase() !== "a") return; - const a = el as HTMLLinkElement; + const a = el as HTMLAnchorElement; return slatejsx( "element", { diff --git a/src/components/SlateEditor/plugins/mathml/MathEditor.tsx b/src/components/SlateEditor/plugins/mathml/MathEditor.tsx index 9822a61546..78694d9616 100644 --- a/src/components/SlateEditor/plugins/mathml/MathEditor.tsx +++ b/src/components/SlateEditor/plugins/mathml/MathEditor.tsx @@ -199,6 +199,7 @@ const MathEditor = ({ element, children, attributes }: Props) => { onExitComplete={onExitPopover} > e.preventDefault()} data-trigger=""> + {/* oxlint-disable-next-line jsx_a11y/prefer-tag-over-role */} setDialogOpen(true)}> diff --git a/src/components/SlateEditor/plugins/mathml/MathML.tsx b/src/components/SlateEditor/plugins/mathml/MathML.tsx index 42a6d05494..2cd740e2d7 100644 --- a/src/components/SlateEditor/plugins/mathml/MathML.tsx +++ b/src/components/SlateEditor/plugins/mathml/MathML.tsx @@ -25,6 +25,7 @@ const MathML = ({ innerHTML, onDoubleClick, children, ...rest }: Props) => { }; }, [innerHTML]); + // oxlint-disable-next-line jsx-a11y-js/no-static-element-interactions return ; }; diff --git a/src/components/SlateEditor/plugins/paste/index.ts b/src/components/SlateEditor/plugins/paste/index.ts index 0b9ef6c182..ee521b77a5 100644 --- a/src/components/SlateEditor/plugins/paste/index.ts +++ b/src/components/SlateEditor/plugins/paste/index.ts @@ -14,7 +14,7 @@ import { PASTE_PLUGIN } from "./types"; export const b64Decode = (data: string | undefined): Descendant[] => { try { return JSON.parse(decodeURIComponent(atob(data ?? ""))); - } catch (e) { + } catch (_) { return []; } }; diff --git a/src/components/SlateEditor/plugins/toolbar/SlateToolbar.tsx b/src/components/SlateEditor/plugins/toolbar/SlateToolbar.tsx index cf2325203b..8b7c048830 100644 --- a/src/components/SlateEditor/plugins/toolbar/SlateToolbar.tsx +++ b/src/components/SlateEditor/plugins/toolbar/SlateToolbar.tsx @@ -164,7 +164,7 @@ const SlateToolbar = ({ hideToolbar: hideToolbarProp }: Props) => { return ( diff --git a/src/components/formikValidationSchema.ts b/src/components/formikValidationSchema.ts index b1cb5e7e8d..89710b080b 100644 --- a/src/components/formikValidationSchema.ts +++ b/src/components/formikValidationSchema.ts @@ -24,7 +24,7 @@ import { // Taken directly from https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address // We don't really need spec compliance, but why not include it? const EMAIL_REGEX = - // eslint-disable-next-line no-useless-escape + // oxlint-disable-next-line no-useless-escape /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; const appendError = (error: string, newError: string): string => (error ? `${error} \n ${newError}` : newError); diff --git a/src/components/validators.ts b/src/components/validators.ts index 83dcc9dcac..13d44d5f4a 100644 --- a/src/components/validators.ts +++ b/src/components/validators.ts @@ -10,7 +10,8 @@ import { NOOP_ELEMENT_TYPE, PARAGRAPH_ELEMENT_TYPE, SECTION_ELEMENT_TYPE } from import { Descendant, Node, ElementType } from "slate"; const rUrl = - /^((https?|ftp):\/\/|mailto:)(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i; //eslint-disable-line + // oxlint-disable-next-line no-useless-escape + /^((https?|ftp):\/\/|mailto:)(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i; export const getLength = (value?: Descendant[] | Descendant | string | null) => { if (!value) { diff --git a/src/containers/ArticlePage/components/ConceptsField.tsx b/src/containers/ArticlePage/components/ConceptsField.tsx index 32b75788b5..d32b71451d 100644 --- a/src/containers/ArticlePage/components/ConceptsField.tsx +++ b/src/containers/ArticlePage/components/ConceptsField.tsx @@ -54,7 +54,7 @@ const ConceptsField = ({ field }: Props) => { const concepts = await postSearchConcepts({ ids: field.value, language: i18n.language }); setConcepts(concepts.results); })(); - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, []); const onUpdateElements = (conceptList: ConceptSummaryDTO[]) => { diff --git a/src/containers/ArticlePage/components/ContentField.tsx b/src/containers/ArticlePage/components/ContentField.tsx index 489662979b..011bb5eb9e 100644 --- a/src/containers/ArticlePage/components/ContentField.tsx +++ b/src/containers/ArticlePage/components/ContentField.tsx @@ -83,7 +83,7 @@ const ContentField = ({ field }: Props) => { const content = await Promise.all(promises); setRelatedContent(content); })(); - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, []); const onAddArticleToList = async (article: ArticleSummaryDTO) => { diff --git a/src/containers/ArticlePage/components/RevisionNotes.tsx b/src/containers/ArticlePage/components/RevisionNotes.tsx index 0d6ab080a4..5e27e98062 100644 --- a/src/containers/ArticlePage/components/RevisionNotes.tsx +++ b/src/containers/ArticlePage/components/RevisionNotes.tsx @@ -82,7 +82,7 @@ const RevisionNotes = () => { {meta.error} { if (!prevAudioLanguage.current) { prevAudioLanguage.current = audioLanguage; diff --git a/src/containers/AudioUploader/components/AudioPlayer.tsx b/src/containers/AudioUploader/components/AudioPlayer.tsx index 24e06eef6c..d40624b275 100644 --- a/src/containers/AudioUploader/components/AudioPlayer.tsx +++ b/src/containers/AudioUploader/components/AudioPlayer.tsx @@ -15,7 +15,7 @@ interface Props { const AudioPlayer = ({ audio }: Props) => { return ( - // eslint-disable-next-line jsx-a11y/media-has-caption + // oxlint-disable-next-line jsx_a11y/media-has-caption diff --git a/src/containers/ConceptPage/components/InlineImageSearch.tsx b/src/containers/ConceptPage/components/InlineImageSearch.tsx index a0db5af84c..5467f5793b 100644 --- a/src/containers/ConceptPage/components/InlineImageSearch.tsx +++ b/src/containers/ConceptPage/components/InlineImageSearch.tsx @@ -41,7 +41,7 @@ const InlineImageSearch = ({ name, disableAltEditing, hideAltText }: Props) => { setImage(image); } })(); - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, []); if (image) { diff --git a/src/containers/FormikForm/AddNotesField.tsx b/src/containers/FormikForm/AddNotesField.tsx index 12f8b044e4..bea946d40a 100644 --- a/src/containers/FormikForm/AddNotesField.tsx +++ b/src/containers/FormikForm/AddNotesField.tsx @@ -18,7 +18,7 @@ import { IconButton, } from "@ndla/primitives"; import { styled } from "@ndla/styled-system/jsx"; -import { FormEvent, MouseEvent } from "react"; +import { ChangeEvent, MouseEvent } from "react"; import { useTranslation } from "react-i18next"; interface Props { @@ -64,7 +64,7 @@ const AddNotesField = ({ labelWarningNote, onChange, value, showError }: Props) onNotesChange(value.filter((_, index) => index !== noteIndexToRemove)); }; - const handleNoteChange = (evt: FormEvent, index: number) => { + const handleNoteChange = (evt: ChangeEvent, index: number) => { const newNotes = [...value]; newNotes[index] = evt.currentTarget.value; onNotesChange(newNotes); @@ -79,7 +79,7 @@ const AddNotesField = ({ labelWarningNote, onChange, value, showError }: Props) { const grepCodesObject = await convertGrepCodesToObject(field.value); setGrepCodes(grepCodesObject); })(); - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, []); const fetchGrepCodeTitles = async ( diff --git a/src/containers/FormikForm/articleFormHooks.ts b/src/containers/FormikForm/articleFormHooks.ts index ef74df2bc3..876982f5e8 100644 --- a/src/containers/FormikForm/articleFormHooks.ts +++ b/src/containers/FormikForm/articleFormHooks.ts @@ -213,6 +213,7 @@ export function useArticleFormHooks({ rules, t, updateArticle, + node?.qualityEvaluation?.grade, ], ); diff --git a/src/containers/FormikForm/components/ContributorsField.tsx b/src/containers/FormikForm/components/ContributorsField.tsx index bf53fed945..d282d6b8d5 100644 --- a/src/containers/FormikForm/components/ContributorsField.tsx +++ b/src/containers/FormikForm/components/ContributorsField.tsx @@ -123,7 +123,7 @@ const Contributor = ({ type, onAddNew, onRemove }: ContributorProps) => { {meta.error} diff --git a/src/containers/FormikForm/preventWindowUnloadHook.ts b/src/containers/FormikForm/preventWindowUnloadHook.ts index 2ab0b449d3..105197c7f8 100644 --- a/src/containers/FormikForm/preventWindowUnloadHook.ts +++ b/src/containers/FormikForm/preventWindowUnloadHook.ts @@ -13,6 +13,7 @@ const usePreventWindowUnload = (preventDefault: boolean) => { if (preventDefault) { const handleBeforeUnload = (event: BeforeUnloadEvent) => { event.preventDefault(); + // oxlint-disable-next-line typescript/no-deprecated return (event.returnValue = ""); }; window.addEventListener("beforeunload", handleBeforeUnload); diff --git a/src/containers/ImageUploader/components/ImageContent.tsx b/src/containers/ImageUploader/components/ImageContent.tsx index 94e2f0a94a..52e56e1ea5 100644 --- a/src/containers/ImageUploader/components/ImageContent.tsx +++ b/src/containers/ImageUploader/components/ImageContent.tsx @@ -59,7 +59,7 @@ const ImageContent = ({ language }: Props) => { } else { imageBlob = values.imageFile; } - } catch (e) { + } catch (_) { altTextHelpers.setError(t("textGeneration.errorImage")); return; } diff --git a/src/containers/ImageUploader/components/ImageForm.tsx b/src/containers/ImageUploader/components/ImageForm.tsx index d794aea923..b7326ce753 100644 --- a/src/containers/ImageUploader/components/ImageForm.tsx +++ b/src/containers/ImageUploader/components/ImageForm.tsx @@ -99,7 +99,7 @@ interface Props void; + ) => Promise; inDialog?: boolean; closeDialog?: () => void; isSaving?: boolean; diff --git a/src/containers/LearningpathPage/steps/LearningpathStepForm.tsx b/src/containers/LearningpathPage/steps/LearningpathStepForm.tsx index d3b53a0c7f..1278cb1259 100644 --- a/src/containers/LearningpathPage/steps/LearningpathStepForm.tsx +++ b/src/containers/LearningpathPage/steps/LearningpathStepForm.tsx @@ -72,7 +72,7 @@ export const toFormValues = ( title: step?.title.title ?? "", introduction: step?.introduction?.introduction ?? "", description: learningpathBlockContentToEditorValue(step?.description?.description ?? ""), - license: step?.license?.license, + license: step?.copyright?.license?.license, }; case "external": return { @@ -84,7 +84,7 @@ export const toFormValues = ( description: step?.description?.description ? learningpathBlockContentToEditorValue(step?.description?.description ?? "") : undefined, - license: step?.license?.license, + license: step?.copyright?.license?.license, }; case "resource": return { @@ -94,7 +94,7 @@ export const toFormValues = ( description: step?.description?.description ? learningpathBlockContentToEditorValue(step.description.description) : undefined, - license: step?.license?.license, + license: step?.copyright?.license?.license, articleId: step?.articleId, }; default: diff --git a/src/containers/LearningpathPage/steps/TextStepForm.tsx b/src/containers/LearningpathPage/steps/TextStepForm.tsx index 2f07f79736..16be6d78ff 100644 --- a/src/containers/LearningpathPage/steps/TextStepForm.tsx +++ b/src/containers/LearningpathPage/steps/TextStepForm.tsx @@ -55,7 +55,7 @@ export const TextStepForm = ({ language, step }: Props) => { )} - {!!step?.license?.license.length && } + {!!step?.copyright?.license?.license.length && } {({ field, meta, helpers }) => ( diff --git a/src/containers/LearningpathPreviewPage/StepTitle.tsx b/src/containers/LearningpathPreviewPage/StepTitle.tsx index f59542fba3..a613604989 100644 --- a/src/containers/LearningpathPreviewPage/StepTitle.tsx +++ b/src/containers/LearningpathPreviewPage/StepTitle.tsx @@ -26,7 +26,7 @@ export const StepTitle = ({ step }: Props) => { {!!step.showTitle && ( {step.title.title} - + )} diff --git a/src/containers/Masthead/components/MastheadSearch.tsx b/src/containers/Masthead/components/MastheadSearch.tsx index 391337c3fa..89080d9326 100644 --- a/src/containers/Masthead/components/MastheadSearch.tsx +++ b/src/containers/Masthead/components/MastheadSearch.tsx @@ -24,7 +24,7 @@ import { import { SafeLink } from "@ndla/safelink"; import { styled } from "@ndla/styled-system/jsx"; import { useComboboxTranslations } from "@ndla/ui"; -import { useEffect, useId, useMemo, useState, FormEvent } from "react"; +import { KeyboardEvent, SubmitEvent, useEffect, useId, useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { useLocation, useNavigate } from "react-router"; import { GenericComboboxItemIndicator } from "../../../components/abstractions/Combobox"; @@ -92,7 +92,7 @@ export const MastheadSearch = () => { try { const newArticle = await fetchNewArticleId(nodeId); navigate(routes.editArticle(newArticle.id, "standard")); - } catch (error) { + } catch (_) { navigate(routes.notFound); } }; @@ -109,7 +109,7 @@ export const MastheadSearch = () => { navigate(routes.editArticle(parseInt(id), "standard")); } } - } catch (error) { + } catch (_) { navigate(routes.notFound); } }; @@ -118,7 +118,7 @@ export const MastheadSearch = () => { try { const article = await fetchBySlug(slug); navigate(routes.editArticle(article.id, "frontpage-article")); - } catch (error) { + } catch (_) { navigate(routes.notFound); } }; @@ -206,7 +206,7 @@ export const MastheadSearch = () => { } }; - const handleSubmit = (evt: FormEvent) => { + const handleSubmit = (evt: KeyboardEvent | SubmitEvent) => { evt.preventDefault(); const isNDLAUrl = isNDLAFrontendUrl(query); const isNodeId = query.length > 2 && nodeIdRegEx.test(query) && !Number.isNaN(parseFloat(query.substring(1))); diff --git a/src/containers/PodcastSeries/components/PodcastSeriesForm.tsx b/src/containers/PodcastSeries/components/PodcastSeriesForm.tsx index b34895d5c3..b58e416619 100644 --- a/src/containers/PodcastSeries/components/PodcastSeriesForm.tsx +++ b/src/containers/PodcastSeries/components/PodcastSeriesForm.tsx @@ -71,7 +71,7 @@ interface Props { language: string; inDialog?: boolean; formikProps?: FormikProps; - onUpdate: (newPodcastSeries: NewSeriesDTO) => void; + onUpdate: (newPodcastSeries: NewSeriesDTO) => Promise; revision?: number; isNewLanguage?: boolean; translatedFieldsToNN: string[]; diff --git a/src/containers/StructurePage/NodeItem.tsx b/src/containers/StructurePage/NodeItem.tsx index 54ccecf71c..883cd90a22 100644 --- a/src/containers/StructurePage/NodeItem.tsx +++ b/src/containers/StructurePage/NodeItem.tsx @@ -130,7 +130,7 @@ const NodeItem = ({ if (isActive) { setCurrentNode(item); } - // eslint-disable-next-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps }, [item]); const newPath = getPath(path, rootPath); diff --git a/src/containers/StructurePage/folderComponents/sharedMenuOptions/MoveExistingNode.tsx b/src/containers/StructurePage/folderComponents/sharedMenuOptions/MoveExistingNode.tsx index 378d91103f..3770b63253 100644 --- a/src/containers/StructurePage/folderComponents/sharedMenuOptions/MoveExistingNode.tsx +++ b/src/containers/StructurePage/folderComponents/sharedMenuOptions/MoveExistingNode.tsx @@ -92,7 +92,7 @@ const MoveExistingNode = ({ currentNode, nodeType = "TOPIC" }: Props) => { }), }); setSuccess(true); - } catch (e) { + } catch (_) { setError("taxonomy.errorMessage"); } finally { setLoading(false); diff --git a/src/containers/StructurePage/folderComponents/sharedMenuOptions/components/MenuItemCustomField.tsx b/src/containers/StructurePage/folderComponents/sharedMenuOptions/components/MenuItemCustomField.tsx index 560c8654d7..7829128c27 100644 --- a/src/containers/StructurePage/folderComponents/sharedMenuOptions/components/MenuItemCustomField.tsx +++ b/src/containers/StructurePage/folderComponents/sharedMenuOptions/components/MenuItemCustomField.tsx @@ -80,7 +80,8 @@ const MenuItemCustomField = ({ node, onCurrentNodeChanged }: Props) => { taxonomyVersion, }); } - }, [customFields]); // eslint-disable-line react-hooks/exhaustive-deps + // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps + }, [customFields]); const filteredProgrammeFields = [TAXONOMY_CUSTOM_FIELD_PROGRAMME_SUBJECT]; const filteredSubjectFields = [ diff --git a/src/containers/StructurePage/folderComponents/topicMenuOptions/SwapTopicArticle.tsx b/src/containers/StructurePage/folderComponents/topicMenuOptions/SwapTopicArticle.tsx index eb15607c29..d87fac4d13 100644 --- a/src/containers/StructurePage/folderComponents/topicMenuOptions/SwapTopicArticle.tsx +++ b/src/containers/StructurePage/folderComponents/topicMenuOptions/SwapTopicArticle.tsx @@ -87,7 +87,7 @@ const SwapTopicArticle = ({ node, rootNodeId }: Props) => { }, taxonomyVersion, ); - } catch (e) { + } catch (_) { setError("taxonomy.swapTopicArticle.failed"); } }; diff --git a/src/containers/StructurePage/multidisciplinary/MultidisciplinaryDialog.tsx b/src/containers/StructurePage/multidisciplinary/MultidisciplinaryDialog.tsx index bae25e3194..7cb8d38de7 100644 --- a/src/containers/StructurePage/multidisciplinary/MultidisciplinaryDialog.tsx +++ b/src/containers/StructurePage/multidisciplinary/MultidisciplinaryDialog.tsx @@ -135,7 +135,7 @@ const MultidisciplinaryDialogContent = ({ currentNode }: Props) => { setError(undefined); try { urlObj = new URL(url); - } catch (e) { + } catch (_) { setError(t("taxonomy.multidisciplinary.errors.invalidUrl")); return; } @@ -170,7 +170,7 @@ const MultidisciplinaryDialogContent = ({ currentNode }: Props) => { setError(t("taxonomy.multidisciplinary.errors.notMultidisciplinary")); } } - } catch (e) { + } catch (_) { setError(t("taxonomy.multidisciplinary.errors.failedToFetch")); } }; diff --git a/src/containers/StructurePage/plannedResource/AddExistingResource.tsx b/src/containers/StructurePage/plannedResource/AddExistingResource.tsx index 8643099956..ec1e8cde96 100644 --- a/src/containers/StructurePage/plannedResource/AddExistingResource.tsx +++ b/src/containers/StructurePage/plannedResource/AddExistingResource.tsx @@ -217,7 +217,7 @@ const AddExistingResource = ({ onClose, resourceTypes, existingResourceIds, node setArticleInputId(resource[0].contentUri?.split(":").at(-1)); return; - } catch (e) { + } catch (_) { resetPastedUrlStatesWithError(t("taxonomy.noResources")); } } @@ -241,7 +241,7 @@ const AddExistingResource = ({ onClose, resourceTypes, existingResourceIds, node }); setResourceId(resolvedUrl.id); setContentUri(resolvedUrl.contentUri); - } catch (e) { + } catch (_) { resetPastedUrlStatesWithError(t("taxonomy.noResources")); } } diff --git a/src/containers/StructurePage/plannedResource/PlannedResourceForm.tsx b/src/containers/StructurePage/plannedResource/PlannedResourceForm.tsx index a5ad56715f..1ccca93dd9 100644 --- a/src/containers/StructurePage/plannedResource/PlannedResourceForm.tsx +++ b/src/containers/StructurePage/plannedResource/PlannedResourceForm.tsx @@ -281,7 +281,7 @@ const PlannedResourceForm = ({ articleType, node, onClose }: Props) => { if (!(addNodeMutationLoading || postResourceLoading || createResourceTypeLoading)) { onClose?.(); } - } catch (e) { + } catch (_) { setError("taxonomy.errorMessage"); } }, diff --git a/src/containers/WelcomePage/components/TableComponent.tsx b/src/containers/WelcomePage/components/TableComponent.tsx index 3f58ec0a15..9b09882502 100644 --- a/src/containers/WelcomePage/components/TableComponent.tsx +++ b/src/containers/WelcomePage/components/TableComponent.tsx @@ -118,6 +118,7 @@ const TableComponent = ({ setSortOption(tableTitle.sortableField!)} data-hidden={!tableTitle.sortableField || sortOption === tableTitle.sortableField} @@ -128,6 +129,7 @@ const TableComponent = ({ setSortOption(`-${tableTitle.sortableField!}`!)} data-hidden={!tableTitle.sortableField || sortOption === `-${tableTitle.sortableField}`} diff --git a/src/index.ts b/src/index.ts index ac383a213c..cafda82a23 100644 --- a/src/index.ts +++ b/src/index.ts @@ -119,7 +119,7 @@ app.get("*splat", async (req, res) => { if (!token && getCookie(HAS_REFRESH_TOKEN_COOKIE, req.headers.cookie ?? "") === "true") { try { await refreshAccessToken(req, res); - } catch (e) { + } catch (_) { log.error("Failed to refresh token on SSR request"); } } @@ -138,7 +138,7 @@ app.get("*splat", async (req, res) => { } catch (e) { const error = e as Error; vite?.ssrFixStacktrace(error); - // eslint-disable-next-line no-console + // oxlint-disable-next-line no-console console.log(error.stack); res.status(500).end(error.stack); } @@ -147,7 +147,7 @@ app.get("*splat", async (req, res) => { if (!config.isVercel) { // Start http server app.listen(config.port, () => { - // eslint-disable-next-line no-console + // oxlint-disable-next-line no-console console.log(`Server started at http://localhost:${config.port}`); }); } diff --git a/src/modules/embed/embedApi.ts b/src/modules/embed/embedApi.ts index 0ec252dffd..a76360feef 100644 --- a/src/modules/embed/embedApi.ts +++ b/src/modules/embed/embedApi.ts @@ -83,7 +83,7 @@ const fetchVisualAudioMeta = async (embed: AudioEmbedData, language: string): Pr embedData: embed, data: res, }; - } catch (e) { + } catch (_) { return { resource: "audio", status: "error", @@ -113,7 +113,7 @@ const fetchVisualBrightcoveMeta = async ( embedData, data, }; - } catch (e) { + } catch (_) { return { resource: "brightcove", status: "error", @@ -165,7 +165,7 @@ export const fetchVisualH5pMeta = async (embedData: H5pEmbedData): Promise { let urlObj: URL; try { urlObj = new URL(url); - } catch (e) { + } catch (_) { res.status(BAD_REQUEST).send({ error: "Invalid 'url' query parameter" }); return; } diff --git a/src/server/authEndpoints.ts b/src/server/authEndpoints.ts index 25f1458411..0344cb72ae 100644 --- a/src/server/authEndpoints.ts +++ b/src/server/authEndpoints.ts @@ -67,7 +67,7 @@ const isSafeRedirect = (url: string) => { try { const decodedUrl = decodeURIComponent(url).trim(); return decodedUrl.startsWith("/") && !decodedUrl.startsWith("//"); - } catch (e) { + } catch (_) { return false; } }; @@ -201,7 +201,7 @@ router.get("/login/success", async (req, res) => { clearTemporaryCookies(res); return res.redirect(decodeURIComponent(returnTo)); - } catch (e) { + } catch (_) { clearTemporaryCookies(res); res.status(INTERNAL_SERVER_ERROR).send({ error: "Login failed" }); } @@ -247,7 +247,7 @@ router.get("/auth/refresh", async (req, res) => { try { const accessToken = await refreshAccessToken(req, res); res.status(OK).json(accessToken); - } catch (e) { + } catch (_) { res.status(UNAUTHORIZED).send({ error: "Failed to refresh token" }); } }); diff --git a/src/server/translate.ts b/src/server/translate.ts index 92becfeaac..3d18f8225f 100644 --- a/src/server/translate.ts +++ b/src/server/translate.ts @@ -6,7 +6,6 @@ * */ -import fetch from "node-fetch"; import { getEnvironmentVariabel } from "../config"; import { ApiTranslateType } from "../interfaces"; import errorLogger from "./logger"; diff --git a/src/types/global.ts b/src/types/global.ts index 0b6131760a..ebfad40eb1 100644 --- a/src/types/global.ts +++ b/src/types/global.ts @@ -1,10 +1,12 @@ -/* +/** * Copyright (c) 2019-present, NDLA. + * * This source code is licensed under the GPLv3 license found in the * LICENSE file in the root directory of this source tree. + * */ -/*eslint-disable*/ +// oxlint-disable-next-line no-unused-vars interface Window { MathJax: any; } diff --git a/src/util/articleUtil.ts b/src/util/articleUtil.ts index cc6bf59f39..9dff022ab8 100644 --- a/src/util/articleUtil.ts +++ b/src/util/articleUtil.ts @@ -37,7 +37,7 @@ export const isGrepCodeValid = (grepCode: string, grepFormats: GrepFormat[]) => return grepFormats.map((gf) => gf.regexp).some((filter) => !!grepCode.match(filter)); }; -export const nullOrUndefined = (metaImageId?: unknown | null | undefined) => { +export const nullOrUndefined = (metaImageId?: unknown | null) => { return metaImageId === null ? null : undefined; }; diff --git a/src/util/handleError.ts b/src/util/handleError.ts index 52ab5eb622..50beb557d2 100644 --- a/src/util/handleError.ts +++ b/src/util/handleError.ts @@ -13,7 +13,8 @@ const handleError = (error: any, ...rest: any[]) => { window.errorReporter.captureError(error); // No logging when unit testing } else if (config.runtimeType !== "test") { - console.error(error, ...rest); // eslint-disable-line no-console + // oxlint-disable-next-line no-console + console.error(error, ...rest); } }; export default handleError; diff --git a/src/util/jwtHelper.ts b/src/util/jwtHelper.ts index f651d9613b..72daeb28fc 100644 --- a/src/util/jwtHelper.ts +++ b/src/util/jwtHelper.ts @@ -20,7 +20,7 @@ export const decodeToken = (accessToken: string | undefined | null): NDLAToken | if (!accessToken) return null; try { return decode(accessToken); - } catch (e) { + } catch (_) { return null; } }; diff --git a/yarn.lock b/yarn.lock index e9ec3a52ff..7a9b5d7fcc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -730,7 +730,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.24.4, @babel/core@npm:^7.29.0": +"@babel/core@npm:^7.29.0": version: 7.29.0 resolution: "@babel/core@npm:7.29.0" dependencies: @@ -847,7 +847,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.28.5, @babel/parser@npm:^7.28.6, @babel/parser@npm:^7.29.0": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.28.5, @babel/parser@npm:^7.28.6, @babel/parser@npm:^7.29.0": version: 7.29.0 resolution: "@babel/parser@npm:7.29.0" dependencies: @@ -2057,7 +2057,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.8.0, @eslint-community/eslint-utils@npm:^4.9.1": +"@eslint-community/eslint-utils@npm:^4.8.0": version: 4.9.1 resolution: "@eslint-community/eslint-utils@npm:4.9.1" dependencies: @@ -2068,7 +2068,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.12.1, @eslint-community/regexpp@npm:^4.12.2": +"@eslint-community/regexpp@npm:^4.12.1": version: 4.12.2 resolution: "@eslint-community/regexpp@npm:4.12.2" checksum: 10c0/fddcbc66851b308478d04e302a4d771d6917a0b3740dc351513c0da9ca2eab8a1adf99f5e0aa7ab8b13fa0df005c81adeee7e63a92f3effd7d367a163b721c2d @@ -2499,6 +2499,20 @@ __metadata: languageName: node linkType: hard +"@ndla/oxlint-config@npm:^0.1.0": + version: 0.1.0 + resolution: "@ndla/oxlint-config@npm:0.1.0" + dependencies: + eslint-plugin-import: "npm:^2.32.0" + eslint-plugin-jsx-a11y: "npm:^6.10.2" + eslint-plugin-notice: "npm:^1.0.0" + peerDependencies: + eslint: ">= 9" + oxlint: ">= 1.46.0" + checksum: 10c0/2975ab9616dc94e466883a35218cc7aeb1d27ef86d940f94ae30b48c6d377127336365f8dff839ee950b5fe8cf58731de5d6c5b71920c261c782bbc54a75e86f + languageName: node + linkType: hard + "@ndla/preset-panda@npm:^0.0.74": version: 0.0.74 resolution: "@ndla/preset-panda@npm:0.0.74" @@ -2829,6 +2843,181 @@ __metadata: languageName: node linkType: hard +"@oxlint-tsgolint/darwin-arm64@npm:0.18.0": + version: 0.18.0 + resolution: "@oxlint-tsgolint/darwin-arm64@npm:0.18.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint-tsgolint/darwin-x64@npm:0.18.0": + version: 0.18.0 + resolution: "@oxlint-tsgolint/darwin-x64@npm:0.18.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxlint-tsgolint/linux-arm64@npm:0.18.0": + version: 0.18.0 + resolution: "@oxlint-tsgolint/linux-arm64@npm:0.18.0" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint-tsgolint/linux-x64@npm:0.18.0": + version: 0.18.0 + resolution: "@oxlint-tsgolint/linux-x64@npm:0.18.0" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@oxlint-tsgolint/win32-arm64@npm:0.18.0": + version: 0.18.0 + resolution: "@oxlint-tsgolint/win32-arm64@npm:0.18.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint-tsgolint/win32-x64@npm:0.18.0": + version: 0.18.0 + resolution: "@oxlint-tsgolint/win32-x64@npm:0.18.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@oxlint/binding-android-arm-eabi@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-android-arm-eabi@npm:1.57.0" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@oxlint/binding-android-arm64@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-android-arm64@npm:1.57.0" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/binding-darwin-arm64@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-darwin-arm64@npm:1.57.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/binding-darwin-x64@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-darwin-x64@npm:1.57.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxlint/binding-freebsd-x64@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-freebsd-x64@npm:1.57.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@oxlint/binding-linux-arm-gnueabihf@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-linux-arm-gnueabihf@npm:1.57.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxlint/binding-linux-arm-musleabihf@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-linux-arm-musleabihf@npm:1.57.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxlint/binding-linux-arm64-gnu@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-linux-arm64-gnu@npm:1.57.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/binding-linux-arm64-musl@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-linux-arm64-musl@npm:1.57.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@oxlint/binding-linux-ppc64-gnu@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-linux-ppc64-gnu@npm:1.57.0" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/binding-linux-riscv64-gnu@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-linux-riscv64-gnu@npm:1.57.0" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/binding-linux-riscv64-musl@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-linux-riscv64-musl@npm:1.57.0" + conditions: os=linux & cpu=riscv64 & libc=musl + languageName: node + linkType: hard + +"@oxlint/binding-linux-s390x-gnu@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-linux-s390x-gnu@npm:1.57.0" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@oxlint/binding-linux-x64-gnu@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-linux-x64-gnu@npm:1.57.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/binding-linux-x64-musl@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-linux-x64-musl@npm:1.57.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@oxlint/binding-openharmony-arm64@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-openharmony-arm64@npm:1.57.0" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/binding-win32-arm64-msvc@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-win32-arm64-msvc@npm:1.57.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/binding-win32-ia32-msvc@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-win32-ia32-msvc@npm:1.57.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@oxlint/binding-win32-x64-msvc@npm:1.57.0": + version: 1.57.0 + resolution: "@oxlint/binding-win32-x64-msvc@npm:1.57.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@pandacss/config@npm:1.7.0, @pandacss/config@npm:^1.7.0": version: 1.7.0 resolution: "@pandacss/config@npm:1.7.0" @@ -4253,16 +4442,6 @@ __metadata: languageName: node linkType: hard -"@types/node-fetch@npm:^2.6.13": - version: 2.6.13 - resolution: "@types/node-fetch@npm:2.6.13" - dependencies: - "@types/node": "npm:*" - form-data: "npm:^4.0.4" - checksum: 10c0/6313c89f62c50bd0513a6839cdff0a06727ac5495ccbb2eeda51bb2bbbc4f3c0a76c0393a491b7610af703d3d2deb6cf60e37e59c81ceeca803ffde745dbf309 - languageName: node - linkType: hard - "@types/node@npm:*, @types/node@npm:^24.10.12": version: 24.10.12 resolution: "@types/node@npm:24.10.12" @@ -4345,141 +4524,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.54.0": - version: 8.54.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.54.0" - dependencies: - "@eslint-community/regexpp": "npm:^4.12.2" - "@typescript-eslint/scope-manager": "npm:8.54.0" - "@typescript-eslint/type-utils": "npm:8.54.0" - "@typescript-eslint/utils": "npm:8.54.0" - "@typescript-eslint/visitor-keys": "npm:8.54.0" - ignore: "npm:^7.0.5" - natural-compare: "npm:^1.4.0" - ts-api-utils: "npm:^2.4.0" - peerDependencies: - "@typescript-eslint/parser": ^8.54.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/e533c8285880b883e02a833f378597c2776e6b0c20a5935440e2a02c1c42f40069a8badcf6d581bb4ec35a6856a806c4b66674c1c15c33cd64cc6b9c0cdd1dad - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:8.54.0": - version: 8.54.0 - resolution: "@typescript-eslint/parser@npm:8.54.0" - dependencies: - "@typescript-eslint/scope-manager": "npm:8.54.0" - "@typescript-eslint/types": "npm:8.54.0" - "@typescript-eslint/typescript-estree": "npm:8.54.0" - "@typescript-eslint/visitor-keys": "npm:8.54.0" - debug: "npm:^4.4.3" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/60a1cfe94bc23086f03701640f4d83d7e37b8f4d729011e0f029e5accf2b3d099c50938c0a798a399e86046279432ff663f33102ba4338c4c82f7acead2bcbac - languageName: node - linkType: hard - -"@typescript-eslint/project-service@npm:8.54.0": - version: 8.54.0 - resolution: "@typescript-eslint/project-service@npm:8.54.0" - dependencies: - "@typescript-eslint/tsconfig-utils": "npm:^8.54.0" - "@typescript-eslint/types": "npm:^8.54.0" - debug: "npm:^4.4.3" - peerDependencies: - typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/3392ae259199021a80616a44d9484d1c363f61bc5c631dff2d08c6a906c98716a20caa7b832b8970120a1eb1eb2de3ee890cd527d6edb04f532f4e48a690a792 - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:8.54.0": - version: 8.54.0 - resolution: "@typescript-eslint/scope-manager@npm:8.54.0" - dependencies: - "@typescript-eslint/types": "npm:8.54.0" - "@typescript-eslint/visitor-keys": "npm:8.54.0" - checksum: 10c0/794740a5c0c1afc38d71e6bc59cc62870286e40d99f15e9760e76fb3d4197e961ee151c286c428535c404f5137721242a14da21350b749d0feb1f589f167814f - languageName: node - linkType: hard - -"@typescript-eslint/tsconfig-utils@npm:8.54.0, @typescript-eslint/tsconfig-utils@npm:^8.54.0": - version: 8.54.0 - resolution: "@typescript-eslint/tsconfig-utils@npm:8.54.0" - peerDependencies: - typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/e8598b0f051650c085d749002138d12249a3efd03e7de02e9e7913939dddd649d159b91f29ca3d28f5ee798b3f528a7195688e23c5e0b315d534e7af20a0c99a - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:8.54.0": - version: 8.54.0 - resolution: "@typescript-eslint/type-utils@npm:8.54.0" - dependencies: - "@typescript-eslint/types": "npm:8.54.0" - "@typescript-eslint/typescript-estree": "npm:8.54.0" - "@typescript-eslint/utils": "npm:8.54.0" - debug: "npm:^4.4.3" - ts-api-utils: "npm:^2.4.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/ad807800d8b2662f823505249a84a6f5b1246b192a7ff08c49f298e220e4d9bb3d76f1f0852510421e030161604a4b939bff87f11b9074f118a3bd1d26139c6f - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:8.54.0, @typescript-eslint/types@npm:^8.54.0": - version: 8.54.0 - resolution: "@typescript-eslint/types@npm:8.54.0" - checksum: 10c0/2219594fe5e8931ff91fd1b7a2606d33cd4f093d43f9ca71bcaa37f106ef79ad51f830dea51392f7e3d8bca77f7077ef98733f87bc008fad2f0bbd9ea5fb8a40 - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:8.54.0": - version: 8.54.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.54.0" - dependencies: - "@typescript-eslint/project-service": "npm:8.54.0" - "@typescript-eslint/tsconfig-utils": "npm:8.54.0" - "@typescript-eslint/types": "npm:8.54.0" - "@typescript-eslint/visitor-keys": "npm:8.54.0" - debug: "npm:^4.4.3" - minimatch: "npm:^9.0.5" - semver: "npm:^7.7.3" - tinyglobby: "npm:^0.2.15" - ts-api-utils: "npm:^2.4.0" - peerDependencies: - typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/1a1a7c0a318e71f3547ab5573198d36165ea152c50447ef92e6326303f9a5c397606201ba80c7b86a725dcdd2913e924be94466a0c33b1b0c3ee852059e646b6 - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:8.54.0": - version: 8.54.0 - resolution: "@typescript-eslint/utils@npm:8.54.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.9.1" - "@typescript-eslint/scope-manager": "npm:8.54.0" - "@typescript-eslint/types": "npm:8.54.0" - "@typescript-eslint/typescript-estree": "npm:8.54.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/949a97dca8024d39666e04ecdf2d4e12722f5064c387901e72bdcc7adafb96cf650a070dc79f9dd46fa1aae6ac2b5eac5ae3fe5a6979385208c28809a1bd143f - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:8.54.0": - version: 8.54.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.54.0" - dependencies: - "@typescript-eslint/types": "npm:8.54.0" - eslint-visitor-keys: "npm:^4.2.1" - checksum: 10c0/f83a9aa92f7f4d1fdb12cbca28c6f5704c36371264606b456388b2c869fc61e73c86d3736556e1bb6e253f3a607128b5b1bf6c68395800ca06f18705576faadd - languageName: node - linkType: hard - "@vitejs/plugin-react@npm:^5.1.3": version: 5.1.3 resolution: "@vitejs/plugin-react@npm:5.1.3" @@ -5706,20 +5750,6 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlast@npm:^1.2.5": - version: 1.2.5 - resolution: "array.prototype.findlast@npm:1.2.5" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/ddc952b829145ab45411b9d6adcb51a8c17c76bf89c9dd64b52d5dffa65d033da8c076ed2e17091779e83bc892b9848188d7b4b33453c5565e65a92863cb2775 - languageName: node - linkType: hard - "array.prototype.findlastindex@npm:^1.2.6": version: 1.2.6 resolution: "array.prototype.findlastindex@npm:1.2.6" @@ -5759,19 +5789,6 @@ __metadata: languageName: node linkType: hard -"array.prototype.tosorted@npm:^1.1.4": - version: 1.1.4 - resolution: "array.prototype.tosorted@npm:1.1.4" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.3" - es-errors: "npm:^1.3.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/eb3c4c4fc0381b0bf6dba2ea4d48d367c2827a0d4236a5718d97caaccc6b78f11f4cadf090736e86301d295a6aa4967ed45568f92ced51be8cbbacd9ca410943 - languageName: node - linkType: hard - "arraybuffer.prototype.slice@npm:^1.0.4": version: 1.0.4 resolution: "arraybuffer.prototype.slice@npm:1.0.4" @@ -5808,13 +5825,6 @@ __metadata: languageName: node linkType: hard -"asynckit@npm:^0.4.0": - version: 0.4.0 - resolution: "asynckit@npm:0.4.0" - checksum: 10c0/d73e2ddf20c4eb9337e1b3df1a0f6159481050a5de457c55b14ea2e5cb6d90bb69e004c9af54737a5ee0917fcf2c9e25de67777bbe58261847846066ba75bc9d - languageName: node - linkType: hard - "autoprefixer@npm:^10.4.23": version: 10.4.23 resolution: "autoprefixer@npm:10.4.23" @@ -5949,15 +5959,6 @@ __metadata: languageName: node linkType: hard -"brace-expansion@npm:^2.0.2": - version: 2.0.2 - resolution: "brace-expansion@npm:2.0.2" - dependencies: - balanced-match: "npm:^1.0.0" - checksum: 10c0/6d117a4c793488af86b83172deb6af143e94c17bc53b0b3cec259733923b4ca84679d506ac261f4ba3c7ed37c46018e2ff442f9ce453af8643ecd64f4a54e6cf - languageName: node - linkType: hard - "brace-expansion@npm:^5.0.2": version: 5.0.4 resolution: "brace-expansion@npm:5.0.4" @@ -6270,15 +6271,6 @@ __metadata: languageName: node linkType: hard -"combined-stream@npm:^1.0.8": - version: 1.0.8 - resolution: "combined-stream@npm:1.0.8" - dependencies: - delayed-stream: "npm:~1.0.0" - checksum: 10c0/0dbb829577e1b1e839fa82b40c07ffaf7de8a09b935cadd355a73652ae70a88b4320db322f6634a4ad93424292fa80973ac6480986247f1734a1137debf271d5 - languageName: node - linkType: hard - "compressible@npm:~2.0.18": version: 2.0.18 resolution: "compressible@npm:2.0.18" @@ -6667,7 +6659,7 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.2.1": +"define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" dependencies: @@ -6678,13 +6670,6 @@ __metadata: languageName: node linkType: hard -"delayed-stream@npm:~1.0.0": - version: 1.0.0 - resolution: "delayed-stream@npm:1.0.0" - checksum: 10c0/d758899da03392e6712f042bec80aa293bbe9e9ff1b2634baae6a360113e708b91326594c8a486d475c69d6259afb7efacdc3537bfcda1c6c648e390ce601b19 - languageName: node - linkType: hard - "depd@npm:2.0.0, depd@npm:^2.0.0, depd@npm:~2.0.0": version: 2.0.0 resolution: "depd@npm:2.0.0" @@ -6835,6 +6820,7 @@ __metadata: "@ndla/icons": "npm:^8.0.86-alpha.0" "@ndla/image-search": "npm:^11.0.149-alpha.0" "@ndla/licenses": "npm:^10.0.11-alpha.0" + "@ndla/oxlint-config": "npm:^0.1.0" "@ndla/preset-panda": "npm:^0.0.74" "@ndla/primitives": "npm:^1.0.124-alpha.0" "@ndla/safelink": "npm:^7.0.127-alpha.0" @@ -6858,7 +6844,6 @@ __metadata: "@types/is-hotkey": "npm:^0.1.10" "@types/lodash-es": "npm:^4.17.12" "@types/node": "npm:^24.10.12" - "@types/node-fetch": "npm:^2.6.13" "@types/prismjs": "npm:^1.26.5" "@types/react": "npm:^19.2.13" "@types/react-dom": "npm:^19.2.3" @@ -6870,7 +6855,6 @@ __metadata: diff-match-patch: "npm:^1.0.5" escape-html: "npm:^1.0.3" eslint: "npm:^9.39.2" - eslint-config-ndla: "npm:^6.0.14-alpha.0" express: "npm:^5.2.1" express-oauth2-jwt-bearer: "npm:^1.7.4" filter-console: "npm:^1.0.0" @@ -6893,6 +6877,8 @@ __metadata: openapi-fetch: "npm:^0.15.0" openid-client: "npm:^6.8.2" oxfmt: "npm:^0.36.0" + oxlint: "npm:^1.57.0" + oxlint-tsgolint: "npm:^0.18.0" p-limit: "npm:^7.2.0" postcss: "npm:^8.5.6" postcss-preset-env: "npm:^11.1.3" @@ -6916,7 +6902,6 @@ __metadata: source-map-support: "npm:^0.5.21" tsx: "npm:^4.21.0" typescript: "npm:^5.9.3" - typescript-eslint: "npm:^8.54.0" vite: "npm:^7.3.1" vitest: "npm:^4.0.18" winston: "npm:^3.19.0" @@ -7012,7 +6997,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.5, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.6, es-abstract@npm:^1.23.9, es-abstract@npm:^1.24.0": +"es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.9, es-abstract@npm:^1.24.0": version: 1.24.0 resolution: "es-abstract@npm:1.24.0" dependencies: @@ -7088,30 +7073,6 @@ __metadata: languageName: node linkType: hard -"es-iterator-helpers@npm:^1.2.1": - version: 1.2.1 - resolution: "es-iterator-helpers@npm:1.2.1" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.6" - es-errors: "npm:^1.3.0" - es-set-tostringtag: "npm:^2.0.3" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.6" - globalthis: "npm:^1.0.4" - gopd: "npm:^1.2.0" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - internal-slot: "npm:^1.1.0" - iterator.prototype: "npm:^1.1.4" - safe-array-concat: "npm:^1.1.3" - checksum: 10c0/97e3125ca472d82d8aceea11b790397648b52c26d8768ea1c1ee6309ef45a8755bb63225a43f3150c7591cffc17caf5752459f1e70d583b4184370a8f04ebd2f - languageName: node - linkType: hard - "es-module-lexer@npm:^1.7.0": version: 1.7.0 resolution: "es-module-lexer@npm:1.7.0" @@ -7128,7 +7089,7 @@ __metadata: languageName: node linkType: hard -"es-set-tostringtag@npm:^2.0.3, es-set-tostringtag@npm:^2.1.0": +"es-set-tostringtag@npm:^2.1.0": version: 2.1.0 resolution: "es-set-tostringtag@npm:2.1.0" dependencies: @@ -7359,24 +7320,6 @@ __metadata: languageName: node linkType: hard -"eslint-config-ndla@npm:^6.0.14-alpha.0": - version: 6.0.14-alpha.0 - resolution: "eslint-config-ndla@npm:6.0.14-alpha.0" - dependencies: - eslint-plugin-header: "npm:^3.1.1" - eslint-plugin-import: "npm:^2.32.0" - eslint-plugin-jsx-a11y: "npm:^6.10.2" - eslint-plugin-react: "npm:^7.37.5" - eslint-plugin-react-hooks: "npm:^7.0.1" - eslint-plugin-simple-import-sort: "npm:^12.1.1" - globals: "npm:^17.3.0" - peerDependencies: - eslint: ">= 9.0.0" - typescript-eslint: ">= 8.15.0" - checksum: 10c0/c6acc47b47b1b3475e7bb47f150ca76a22a133c4bc375479c6680c7e411d7246700faabd2301febbcf62b1986c4c3dd57d3a8015ca7be8021bdd7cbf5bd18688 - languageName: node - linkType: hard - "eslint-import-resolver-node@npm:^0.3.9": version: 0.3.9 resolution: "eslint-import-resolver-node@npm:0.3.9" @@ -7400,15 +7343,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-header@npm:^3.1.1": - version: 3.1.1 - resolution: "eslint-plugin-header@npm:3.1.1" - peerDependencies: - eslint: ">=7.7.0" - checksum: 10c0/2eb70acd8efe2b72a7bff3e3958a637871c6d0ed4166effea8b68e79b9ba291b6a33182e7f0e31ca7de717fc5b2cf2e42dcc0a07db1a37ae6941bbb6a8eda731 - languageName: node - linkType: hard - "eslint-plugin-import@npm:^2.32.0": version: 2.32.0 resolution: "eslint-plugin-import@npm:2.32.0" @@ -7463,55 +7397,16 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:^7.0.1": - version: 7.0.1 - resolution: "eslint-plugin-react-hooks@npm:7.0.1" - dependencies: - "@babel/core": "npm:^7.24.4" - "@babel/parser": "npm:^7.24.4" - hermes-parser: "npm:^0.25.1" - zod: "npm:^3.25.0 || ^4.0.0" - zod-validation-error: "npm:^3.5.0 || ^4.0.0" - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - checksum: 10c0/1e711d1a9d1fa9cfc51fa1572500656577201199c70c795c6a27adfc1df39e5c598f69aab6aa91117753d23cc1f11388579a2bed14921cf9a4efe60ae8618496 - languageName: node - linkType: hard - -"eslint-plugin-react@npm:^7.37.5": - version: 7.37.5 - resolution: "eslint-plugin-react@npm:7.37.5" +"eslint-plugin-notice@npm:^1.0.0": + version: 1.0.0 + resolution: "eslint-plugin-notice@npm:1.0.0" dependencies: - array-includes: "npm:^3.1.8" - array.prototype.findlast: "npm:^1.2.5" - array.prototype.flatmap: "npm:^1.3.3" - array.prototype.tosorted: "npm:^1.1.4" - doctrine: "npm:^2.1.0" - es-iterator-helpers: "npm:^1.2.1" - estraverse: "npm:^5.3.0" - hasown: "npm:^2.0.2" - jsx-ast-utils: "npm:^2.4.1 || ^3.0.0" - minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.9" - object.fromentries: "npm:^2.0.8" - object.values: "npm:^1.2.1" - prop-types: "npm:^15.8.1" - resolve: "npm:^2.0.0-next.5" - semver: "npm:^6.3.1" - string.prototype.matchall: "npm:^4.0.12" - string.prototype.repeat: "npm:^1.0.0" - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - checksum: 10c0/c850bfd556291d4d9234f5ca38db1436924a1013627c8ab1853f77cac73ec19b020e861e6c7b783436a48b6ffcdfba4547598235a37ad4611b6739f65fd8ad57 - languageName: node - linkType: hard - -"eslint-plugin-simple-import-sort@npm:^12.1.1": - version: 12.1.1 - resolution: "eslint-plugin-simple-import-sort@npm:12.1.1" + find-root: "npm:^1.1.0" + lodash: "npm:^4.17.21" + metric-lcs: "npm:^0.1.2" peerDependencies: - eslint: ">=5.0.0" - checksum: 10c0/0ad1907ad9ddbadd1db655db0a9d0b77076e274b793a77b982c8525d808d868e6ecfce24f3a411e8a1fa551077387f9ebb38c00956073970ebd7ee6a029ce2b3 + eslint: ">=3.0.0" + checksum: 10c0/40b162fea014efad8e24c38f58c84729cf0ce0ee7a21fdb79ccfde9c2f5d219e4e74e7729679b6321400b34cc80c51beb00a46ba03a7c13265ceab573262f9ea languageName: node linkType: hard @@ -7617,7 +7512,7 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": +"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": version: 5.3.0 resolution: "estraverse@npm:5.3.0" checksum: 10c0/1ff9447b96263dec95d6d67431c5e0771eb9776427421260a3e2f0fdd5d6bd4f8e37a7338f5ad2880c9f143450c9b1e4fc2069060724570a49cf9cf0312bd107 @@ -7861,6 +7756,13 @@ __metadata: languageName: node linkType: hard +"find-root@npm:^1.1.0": + version: 1.1.0 + resolution: "find-root@npm:1.1.0" + checksum: 10c0/1abc7f3bf2f8d78ff26d9e00ce9d0f7b32e5ff6d1da2857bcdf4746134c422282b091c672cde0572cac3840713487e0a7a636af9aa1b74cb11894b447a521efa + languageName: node + linkType: hard + "find-up@npm:^5.0.0": version: 5.0.0 resolution: "find-up@npm:5.0.0" @@ -7904,19 +7806,6 @@ __metadata: languageName: node linkType: hard -"form-data@npm:^4.0.4": - version: 4.0.5 - resolution: "form-data@npm:4.0.5" - dependencies: - asynckit: "npm:^0.4.0" - combined-stream: "npm:^1.0.8" - es-set-tostringtag: "npm:^2.1.0" - hasown: "npm:^2.0.2" - mime-types: "npm:^2.1.12" - checksum: 10c0/dd6b767ee0bbd6d84039db12a0fa5a2028160ffbfaba1800695713b46ae974a5f6e08b3356c3195137f8530dcd9dfcb5d5ae1eeff53d0db1e5aad863b619ce3b - languageName: node - linkType: hard - "formik@npm:^2.4.9": version: 2.4.9 resolution: "formik@npm:2.4.9" @@ -8098,7 +7987,7 @@ __metadata: languageName: node linkType: hard -"get-proto@npm:^1.0.0, get-proto@npm:^1.0.1": +"get-proto@npm:^1.0.1": version: 1.0.1 resolution: "get-proto@npm:1.0.1" dependencies: @@ -8164,13 +8053,6 @@ __metadata: languageName: node linkType: hard -"globals@npm:^17.3.0": - version: 17.4.0 - resolution: "globals@npm:17.4.0" - checksum: 10c0/2be9e8c2b9035836f13d420b22f0247a328db82967d3bebfc01126d888ed609305f06c05895914e969653af5c6ba35fd7a0920f3e6c869afa60666c810630feb - languageName: node - linkType: hard - "globalthis@npm:^1.0.4": version: 1.0.4 resolution: "globalthis@npm:1.0.4" @@ -8363,22 +8245,6 @@ __metadata: languageName: node linkType: hard -"hermes-estree@npm:0.25.1": - version: 0.25.1 - resolution: "hermes-estree@npm:0.25.1" - checksum: 10c0/48be3b2fa37a0cbc77a112a89096fa212f25d06de92781b163d67853d210a8a5c3784fac23d7d48335058f7ed283115c87b4332c2a2abaaccc76d0ead1a282ac - languageName: node - linkType: hard - -"hermes-parser@npm:^0.25.1": - version: 0.25.1 - resolution: "hermes-parser@npm:0.25.1" - dependencies: - hermes-estree: "npm:0.25.1" - checksum: 10c0/3abaa4c6f1bcc25273f267297a89a4904963ea29af19b8e4f6eabe04f1c2c7e9abd7bfc4730ddb1d58f2ea04b6fee74053d8bddb5656ec6ebf6c79cc8d14202c - languageName: node - linkType: hard - "hide-powered-by@npm:1.1.0": version: 1.1.0 resolution: "hide-powered-by@npm:1.1.0" @@ -8562,13 +8428,6 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^7.0.5": - version: 7.0.5 - resolution: "ignore@npm:7.0.5" - checksum: 10c0/ae00db89fe873064a093b8999fe4cc284b13ef2a178636211842cceb650b9c3e390d3339191acb145d81ed5379d2074840cf0c33a20bdbd6f32821f79eb4ad5d - languageName: node - linkType: hard - "import-fresh@npm:^3.2.1": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" @@ -8934,20 +8793,6 @@ __metadata: languageName: node linkType: hard -"iterator.prototype@npm:^1.1.4": - version: 1.1.5 - resolution: "iterator.prototype@npm:1.1.5" - dependencies: - define-data-property: "npm:^1.1.4" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.6" - get-proto: "npm:^1.0.0" - has-symbols: "npm:^1.1.0" - set-function-name: "npm:^2.0.2" - checksum: 10c0/f7a262808e1b41049ab55f1e9c29af7ec1025a000d243b83edf34ce2416eedd56079b117fa59376bb4a724110690f13aa8427f2ee29a09eec63a7e72367626d0 - languageName: node - linkType: hard - "javascript-stringify@npm:2.1.0": version: 2.1.0 resolution: "javascript-stringify@npm:2.1.0" @@ -8969,7 +8814,7 @@ __metadata: languageName: node linkType: hard -"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": +"js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed @@ -9106,7 +8951,7 @@ __metadata: languageName: node linkType: hard -"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.5": +"jsx-ast-utils@npm:^3.3.5": version: 3.3.5 resolution: "jsx-ast-utils@npm:3.3.5" dependencies: @@ -9408,17 +9253,6 @@ __metadata: languageName: node linkType: hard -"loose-envify@npm:^1.4.0": - version: 1.4.0 - resolution: "loose-envify@npm:1.4.0" - dependencies: - js-tokens: "npm:^3.0.0 || ^4.0.0" - bin: - loose-envify: cli.js - checksum: 10c0/655d110220983c1a4b9c0c679a2e8016d4b67f6e9c7b5435ff5979ecdb20d0813f4dec0a08674fcbdd4846a3f07edbb50a36811fd37930b94aaa0d9daceb017e - languageName: node - linkType: hard - "lru-cache@npm:^11.0.0, lru-cache@npm:^11.1.0, lru-cache@npm:^11.2.1, lru-cache@npm:^11.2.4, lru-cache@npm:^11.2.5": version: 11.2.5 resolution: "lru-cache@npm:11.2.5" @@ -9516,6 +9350,13 @@ __metadata: languageName: node linkType: hard +"metric-lcs@npm:^0.1.2": + version: 0.1.2 + resolution: "metric-lcs@npm:0.1.2" + checksum: 10c0/cf5e8987cb92b3f70ca9f277268f5b525ae02195906de3b5c612d6c58341b8686241dce07cde7867d1442481f3b06f150d1d2c9f5f2a5a8c91c021ae94675edb + languageName: node + linkType: hard + "microdiff@npm:1.5.0": version: 1.5.0 resolution: "microdiff@npm:1.5.0" @@ -9533,13 +9374,6 @@ __metadata: languageName: node linkType: hard -"mime-db@npm:1.52.0": - version: 1.52.0 - resolution: "mime-db@npm:1.52.0" - checksum: 10c0/0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa - languageName: node - linkType: hard - "mime-db@npm:>= 1.43.0 < 2, mime-db@npm:^1.54.0": version: 1.54.0 resolution: "mime-db@npm:1.54.0" @@ -9547,15 +9381,6 @@ __metadata: languageName: node linkType: hard -"mime-types@npm:^2.1.12": - version: 2.1.35 - resolution: "mime-types@npm:2.1.35" - dependencies: - mime-db: "npm:1.52.0" - checksum: 10c0/82fb07ec56d8ff1fc999a84f2f217aa46cb6ed1033fefaabd5785b9a974ed225c90dc72fff460259e66b95b73648596dbcc50d51ed69cdf464af2d237d3149b2 - languageName: node - linkType: hard - "mime-types@npm:^3.0.0, mime-types@npm:^3.0.1": version: 3.0.1 resolution: "mime-types@npm:3.0.1" @@ -9590,15 +9415,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.5": - version: 9.0.9 - resolution: "minimatch@npm:9.0.9" - dependencies: - brace-expansion: "npm:^2.0.2" - checksum: 10c0/0b6a58530dbb00361745aa6c8cffaba4c90f551afe7c734830bd95fd88ebf469dd7355a027824ea1d09e37181cfeb0a797fb17df60c15ac174303ac110eb7e86 - languageName: node - linkType: hard - "minimist@npm:^1.2.0, minimist@npm:^1.2.6": version: 1.2.8 resolution: "minimist@npm:1.2.8" @@ -9858,13 +9674,6 @@ __metadata: languageName: node linkType: hard -"object-assign@npm:^4.1.1": - version: 4.1.1 - resolution: "object-assign@npm:4.1.1" - checksum: 10c0/1f4df9945120325d041ccf7b86f31e8bcc14e73d29171e37a7903050e96b81323784ec59f93f102ec635bcf6fa8034ba3ea0a8c7e69fa202b87ae3b6cec5a414 - languageName: node - linkType: hard - "object-inspect@npm:^1.13.3, object-inspect@npm:^1.13.4": version: 1.13.4 resolution: "object-inspect@npm:1.13.4" @@ -9900,18 +9709,6 @@ __metadata: languageName: node linkType: hard -"object.entries@npm:^1.1.9": - version: 1.1.9 - resolution: "object.entries@npm:1.1.9" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.4" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.1.1" - checksum: 10c0/d4b8c1e586650407da03370845f029aa14076caca4e4d4afadbc69cfb5b78035fd3ee7be417141abdb0258fa142e59b11923b4c44d8b1255b28f5ffcc50da7db - languageName: node - linkType: hard - "object.fromentries@npm:^2.0.8": version: 2.0.8 resolution: "object.fromentries@npm:2.0.8" @@ -10134,6 +9931,108 @@ __metadata: languageName: node linkType: hard +"oxlint-tsgolint@npm:^0.18.0": + version: 0.18.0 + resolution: "oxlint-tsgolint@npm:0.18.0" + dependencies: + "@oxlint-tsgolint/darwin-arm64": "npm:0.18.0" + "@oxlint-tsgolint/darwin-x64": "npm:0.18.0" + "@oxlint-tsgolint/linux-arm64": "npm:0.18.0" + "@oxlint-tsgolint/linux-x64": "npm:0.18.0" + "@oxlint-tsgolint/win32-arm64": "npm:0.18.0" + "@oxlint-tsgolint/win32-x64": "npm:0.18.0" + dependenciesMeta: + "@oxlint-tsgolint/darwin-arm64": + optional: true + "@oxlint-tsgolint/darwin-x64": + optional: true + "@oxlint-tsgolint/linux-arm64": + optional: true + "@oxlint-tsgolint/linux-x64": + optional: true + "@oxlint-tsgolint/win32-arm64": + optional: true + "@oxlint-tsgolint/win32-x64": + optional: true + bin: + tsgolint: bin/tsgolint.js + checksum: 10c0/0e5ed726ef06471d965cab7370d6f142c2ba16072097a517953dcb1c7fc8151ac0b01719ca5cd4b4a2a6a1b9eae2046203e5253813aea66391e8d9ec7c9b4618 + languageName: node + linkType: hard + +"oxlint@npm:^1.57.0": + version: 1.57.0 + resolution: "oxlint@npm:1.57.0" + dependencies: + "@oxlint/binding-android-arm-eabi": "npm:1.57.0" + "@oxlint/binding-android-arm64": "npm:1.57.0" + "@oxlint/binding-darwin-arm64": "npm:1.57.0" + "@oxlint/binding-darwin-x64": "npm:1.57.0" + "@oxlint/binding-freebsd-x64": "npm:1.57.0" + "@oxlint/binding-linux-arm-gnueabihf": "npm:1.57.0" + "@oxlint/binding-linux-arm-musleabihf": "npm:1.57.0" + "@oxlint/binding-linux-arm64-gnu": "npm:1.57.0" + "@oxlint/binding-linux-arm64-musl": "npm:1.57.0" + "@oxlint/binding-linux-ppc64-gnu": "npm:1.57.0" + "@oxlint/binding-linux-riscv64-gnu": "npm:1.57.0" + "@oxlint/binding-linux-riscv64-musl": "npm:1.57.0" + "@oxlint/binding-linux-s390x-gnu": "npm:1.57.0" + "@oxlint/binding-linux-x64-gnu": "npm:1.57.0" + "@oxlint/binding-linux-x64-musl": "npm:1.57.0" + "@oxlint/binding-openharmony-arm64": "npm:1.57.0" + "@oxlint/binding-win32-arm64-msvc": "npm:1.57.0" + "@oxlint/binding-win32-ia32-msvc": "npm:1.57.0" + "@oxlint/binding-win32-x64-msvc": "npm:1.57.0" + peerDependencies: + oxlint-tsgolint: ">=0.15.0" + dependenciesMeta: + "@oxlint/binding-android-arm-eabi": + optional: true + "@oxlint/binding-android-arm64": + optional: true + "@oxlint/binding-darwin-arm64": + optional: true + "@oxlint/binding-darwin-x64": + optional: true + "@oxlint/binding-freebsd-x64": + optional: true + "@oxlint/binding-linux-arm-gnueabihf": + optional: true + "@oxlint/binding-linux-arm-musleabihf": + optional: true + "@oxlint/binding-linux-arm64-gnu": + optional: true + "@oxlint/binding-linux-arm64-musl": + optional: true + "@oxlint/binding-linux-ppc64-gnu": + optional: true + "@oxlint/binding-linux-riscv64-gnu": + optional: true + "@oxlint/binding-linux-riscv64-musl": + optional: true + "@oxlint/binding-linux-s390x-gnu": + optional: true + "@oxlint/binding-linux-x64-gnu": + optional: true + "@oxlint/binding-linux-x64-musl": + optional: true + "@oxlint/binding-openharmony-arm64": + optional: true + "@oxlint/binding-win32-arm64-msvc": + optional: true + "@oxlint/binding-win32-ia32-msvc": + optional: true + "@oxlint/binding-win32-x64-msvc": + optional: true + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + bin: + oxlint: bin/oxlint + checksum: 10c0/e2ccd23280615068335c603c7fe9d2590812d7b2f16ee55a3fca1260d600795847e94926026a0d4ef46026c97c3868aee070ecca125eeaac68a8abbbe309d4a1 + languageName: node + linkType: hard + "p-limit@npm:^3.0.2": version: 3.1.0 resolution: "p-limit@npm:3.1.0" @@ -10897,17 +10796,6 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:^15.8.1": - version: 15.8.1 - resolution: "prop-types@npm:15.8.1" - dependencies: - loose-envify: "npm:^1.4.0" - object-assign: "npm:^4.1.1" - react-is: "npm:^16.13.1" - checksum: 10c0/59ece7ca2fb9838031d73a48d4becb9a7cc1ed10e610517c7d8f19a1e02fa47f7c27d557d8a5702bec3cfeccddc853579832b43f449e54635803f277b1c78077 - languageName: node - linkType: hard - "propagate@npm:^2.0.0": version: 2.0.1 resolution: "propagate@npm:2.0.1" @@ -11039,7 +10927,7 @@ __metadata: languageName: node linkType: hard -"react-is@npm:^16.13.1, react-is@npm:^16.7.0": +"react-is@npm:^16.7.0": version: 16.13.1 resolution: "react-is@npm:16.13.1" checksum: 10c0/33977da7a5f1a287936a0c85639fec6ca74f4f15ef1e59a6bc20338fc73dc69555381e211f7a3529b8150a1f71e4225525b41b60b52965bda53ce7d47377ada1 @@ -11151,7 +11039,7 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.3, regexp.prototype.flags@npm:^1.5.4": +"regexp.prototype.flags@npm:^1.5.4": version: 1.5.4 resolution: "regexp.prototype.flags@npm:1.5.4" dependencies: @@ -11206,19 +11094,6 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^2.0.0-next.5": - version: 2.0.0-next.5 - resolution: "resolve@npm:2.0.0-next.5" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/a6c33555e3482ea2ec4c6e3d3bf0d78128abf69dca99ae468e64f1e30acaa318fd267fb66c8836b04d558d3e2d6ed875fe388067e7d8e0de647d3c21af21c43a - languageName: node - linkType: hard - "resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" @@ -11232,19 +11107,6 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^2.0.0-next.5#optional!builtin": - version: 2.0.0-next.5 - resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#optional!builtin::version=2.0.0-next.5&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/78ad6edb8309a2bfb720c2c1898f7907a37f858866ce11a5974643af1203a6a6e05b2fa9c53d8064a673a447b83d42569260c306d43628bff5bb101969708355 - languageName: node - linkType: hard - "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -11521,7 +11383,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.5, semver@npm:^7.7.3": +"semver@npm:^7.3.5": version: 7.7.3 resolution: "semver@npm:7.7.3" bin: @@ -11919,37 +11781,6 @@ __metadata: languageName: node linkType: hard -"string.prototype.matchall@npm:^4.0.12": - version: 4.0.12 - resolution: "string.prototype.matchall@npm:4.0.12" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.6" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.6" - gopd: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - internal-slot: "npm:^1.1.0" - regexp.prototype.flags: "npm:^1.5.3" - set-function-name: "npm:^2.0.2" - side-channel: "npm:^1.1.0" - checksum: 10c0/1a53328ada73f4a77f1fdf1c79414700cf718d0a8ef6672af5603e709d26a24f2181208144aed7e858b1bcc1a0d08567a570abfb45567db4ae47637ed2c2f85c - languageName: node - linkType: hard - -"string.prototype.repeat@npm:^1.0.0": - version: 1.0.0 - resolution: "string.prototype.repeat@npm:1.0.0" - dependencies: - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.17.5" - checksum: 10c0/94c7978566cffa1327d470fd924366438af9b04b497c43a9805e476e2e908aa37a1fd34cc0911156c17556dab62159d12c7b92b3cc304c3e1281fe4c8e668f40 - languageName: node - linkType: hard - "string.prototype.trim@npm:^1.2.10": version: 1.2.10 resolution: "string.prototype.trim@npm:1.2.10" @@ -12253,15 +12084,6 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^2.4.0": - version: 2.4.0 - resolution: "ts-api-utils@npm:2.4.0" - peerDependencies: - typescript: ">=4.8.4" - checksum: 10c0/ed185861aef4e7124366a3f6561113557a57504267d4d452a51e0ba516a9b6e713b56b4aeaab9fa13de9db9ab755c65c8c13a777dba9133c214632cb7b65c083 - languageName: node - linkType: hard - "ts-evaluator@npm:1.2.0": version: 1.2.0 resolution: "ts-evaluator@npm:1.2.0" @@ -12418,21 +12240,6 @@ __metadata: languageName: node linkType: hard -"typescript-eslint@npm:^8.54.0": - version: 8.54.0 - resolution: "typescript-eslint@npm:8.54.0" - dependencies: - "@typescript-eslint/eslint-plugin": "npm:8.54.0" - "@typescript-eslint/parser": "npm:8.54.0" - "@typescript-eslint/typescript-estree": "npm:8.54.0" - "@typescript-eslint/utils": "npm:8.54.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <6.0.0" - checksum: 10c0/0ba92aa22c0aa10c88b0f4732950ed64245947f1c4ac17328dff94b43eaeddd3068595788725781fba07a87cc964304a075b3e37f9a86312173498fcc6ab4338 - languageName: node - linkType: hard - "typescript@npm:5.9.3, typescript@npm:^5.9.3": version: 5.9.3 resolution: "typescript@npm:5.9.3" @@ -13002,19 +12809,3 @@ __metadata: checksum: 10c0/36d4793e9cf7060f9da543baf67c55e354f4862c8d3d34de1a1b1d7c382d44171315cc54abf84d8900b8113d742b830108a1434f4898fb244f9b7e8426d4b8f5 languageName: node linkType: hard - -"zod-validation-error@npm:^3.5.0 || ^4.0.0": - version: 4.0.2 - resolution: "zod-validation-error@npm:4.0.2" - peerDependencies: - zod: ^3.25.0 || ^4.0.0 - checksum: 10c0/0ccfec48c46de1be440b719cd02044d4abb89ed0e14c13e637cd55bf29102f67ccdba373f25def0fc7130e5f15025be4d557a7edcc95d5a3811599aade689e1b - languageName: node - linkType: hard - -"zod@npm:^3.25.0 || ^4.0.0": - version: 4.1.12 - resolution: "zod@npm:4.1.12" - checksum: 10c0/b64c1feb19e99d77075261eaf613e0b2be4dfcd3551eff65ad8b4f2a079b61e379854d066f7d447491fcf193f45babd8095551a9d47973d30b46b6d8e2c46774 - languageName: node - linkType: hard