Skip to content

Feature request: noInlineConfig flag #15173

@webbertakken

Description

@webbertakken

Trying to keep some projects clean by not allowing inline disables in favour of proper configuration of fitting rules for the project. I'm liking it in my ESLint config and would like to apply it to Oxlint as well before migrating.

In ESLint the following configuration can be used to not allow inline comments:

  {
    linterOptions: {
      noInlineConfig: true, // ignores all /* eslint-disable */ etc.
      reportUnusedDisableDirectives: 'error',
    },
  }

For Oxlint the best we have (that I could find) is

  // Base rules
  "rules": {
    "unicorn/no-abusive-eslint-disable": "error"
  },

We also have

# report unused rules as warnings
oxlint --report-unused-disable-directives

# report unused as errors
oxlint --report-unused-disable-directives-severity=error

But there is currently no way to disallow inline config completely for a project.

It would be really nice if we could have noInlineConfig setting or rule for Oxlint.

Considered alternatives

We could probably do this with a custom rule

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions