Skip to content

Add compatibility with eslint 9 #59

Description

@simon-abbott

Eslint 9 requires that all rules have an options schema. Since this package doesn't have one, configuring the rule gives the error:

Configuration for rule "header/header" is invalid:
Value ["block",["--snip--"],2] should NOT have more than 0 items.

Activity

  1. BharathSubu commented on Jan 29, 2025

    @BharathSubu

    Is there any way for us to disable the schema validation from our side

  2. simon-abbott commented on Jan 29, 2025

    @simon-abbott
    Author

    I have applied this patch via patch-package:

    diff --git a/node_modules/eslint-plugin-header/lib/rules/header.js b/node_modules/eslint-plugin-header/lib/rules/header.js
    index 3504b6f..dfd04dd 100644
    --- a/node_modules/eslint-plugin-header/lib/rules/header.js
    +++ b/node_modules/eslint-plugin-header/lib/rules/header.js
    @@ -121,7 +121,9 @@ function matchesLineEndings(src, num) {
     module.exports = {
         meta: {
             type: "layout",
    -        fixable: "whitespace"
    +        fixable: "whitespace",
    +        // PATCH: Workaround for https://github.com/Stuk/eslint-plugin-header/issues/59
    +        schema: false,
         },
         create: function(context) {
             var options = context.options;
  3. tonyganchev commented on Aug 10, 2025

    @tonyganchev

    Unfortunately the original issue got closed by maintainers: #57

    I had to fork the package to add ESLint 9 support - https://www.npmjs.com/package/@tony.ganchev/eslint-plugin-header

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions