Skip to content

linter: --init option ignores other CLI options (like --react-plugin) and doesn't populate rules #19622

@astrochemx

Description

@astrochemx

What version of Oxlint are you using?

1.49.0

What command did you run?

oxlint --init --import-plugin --jest-plugin --jsdoc-plugin --jsx-a11y-plugin --nextjs-plugin --node-plugin --promise-plugin --react-perf-plugin --react-plugin --vitest-plugin --vue-plugin --tsconfig=./tsconfig.json

What does your .oxlintrc.json (or oxlint.config.ts) config file look like?

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "plugins": null,
  "categories": {},
  "rules": {},
  "settings": {
    "jsx-a11y": {
      "polymorphicPropName": null,
      "components": {},
      "attributes": {}
    },
    "next": {
      "rootDir": []
    },
    "react": {
      "formComponents": [],
      "linkComponents": [],
      "version": null,
      "componentWrapperFunctions": []
    },
    "jsdoc": {
      "ignorePrivate": false,
      "ignoreInternal": false,
      "ignoreReplacesDocs": true,
      "overrideReplacesDocs": true,
      "augmentsExtendsReplacesDocs": false,
      "implementsReplacesDocs": false,
      "exemptDestructuredRootsFromChecks": false,
      "tagNamePreference": {}
    },
    "vitest": {
      "typecheck": false
    }
  },
  "env": {
    "builtin": true
  },
  "globals": {},
  "ignorePatterns": []
}

What happened?

Starting from the oxlint version 1.42.0, specifically commit 119f566 (refactor(oxlint): move `--init` logic into a own file (#18505)), --init option no longer respects the other CLI options for enabling plugins (like --react-plugin).

Also, the --init option no longer populates the rules object in the configuration with the rules (including from the plugins), which are enabled by default.

Is such behavior expected and intentional? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions