diff --git a/.oxlintrc.jsonc b/.oxlintrc.jsonc index 597ef3e7..510473f1 100644 --- a/.oxlintrc.jsonc +++ b/.oxlintrc.jsonc @@ -11,7 +11,7 @@ "eslint-plugin-no-relative-import-paths", "eslint-plugin-unused-imports", "eslint-plugin-no-only-tests", - "./tools/eslint-plugin-header.cjs" + "@tony.ganchev/eslint-plugin-header" ], "categories": { "correctness": "off" @@ -361,7 +361,7 @@ "no-only-tests/no-only-tests": "error", // ── License header ── - "header/header": ["error", "block", [ + "@tony.ganchev/header/header": ["error", "block", [ "", " * Copyright (C) Contributors to the Suwayomi project", " *", diff --git a/package.json b/package.json index c43d570d..463e70f0 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "@lingui/format-po": "5.9.2", "@lingui/swc-plugin": "5.11.0", "@lingui/vite-plugin": "5.9.2", - "@tony.ganchev/eslint-plugin-header": "3.2.6", + "@tony.ganchev/eslint-plugin-header": "3.3.4", "@types/node": "24.10.1", "@types/react": "19.2.14", "@types/react-beautiful-dnd": "13.1.8", diff --git a/tools/eslint-plugin-header.cjs b/tools/eslint-plugin-header.cjs deleted file mode 100644 index 4e1110fe..00000000 --- a/tools/eslint-plugin-header.cjs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) Contributors to the Suwayomi project - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ - -// Thin wrapper around @tony.ganchev/eslint-plugin-header that removes -// `meta.defaultOptions`. The defaults are already applied in the rule's -// `normalizeOptions()`, but oxlint validates `defaultOptions` against the -// schema independently (unlike ESLint which merges first), causing a load -// failure. - -"use strict"; - -const plugin = require("@tony.ganchev/eslint-plugin-header"); - -const { defaultOptions, ...meta } = plugin.rules.header.meta; - -module.exports = { - meta: { name: "eslint-plugin-header" }, - rules: { - header: { - ...plugin.rules.header, - meta, - }, - }, -}; diff --git a/yarn.lock b/yarn.lock index 041da8c1..35f4b4cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3548,10 +3548,10 @@ resolved "https://registry.yarnpkg.com/@tokenizer/token/-/token-0.3.0.tgz#fe98a93fe789247e998c75e74e9c7c63217aa276" integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A== -"@tony.ganchev/eslint-plugin-header@3.2.6": - version "3.2.6" - resolved "https://registry.yarnpkg.com/@tony.ganchev/eslint-plugin-header/-/eslint-plugin-header-3.2.6.tgz#a1b8b7ad1332488dcf858fd8b21d39053398e32e" - integrity sha512-eplJG8O2L2sb6UWEy2G+34KckrSNX/LNaKQcE6ADUmFJ1ywqBqpSoJRYILSehntjgxMdqMhC7y6OZAt93q++xg== +"@tony.ganchev/eslint-plugin-header@3.3.4": + version "3.3.4" + resolved "https://registry.yarnpkg.com/@tony.ganchev/eslint-plugin-header/-/eslint-plugin-header-3.3.4.tgz#1c050803c28cb1416e69753bc73f6752487748e1" + integrity sha512-w6RqKLUO4Bvi8pdFJnNUl1o5bux3/i9ZaC+TIY593d+ad15InN8qe9rpqnzyL7Guk9i/vIc4ztlyw9todgKGPw== "@types/estree@0.0.39": version "0.0.39"