Skip to content

Bug: [new config system] --ignore-path option disappears when eslint.config.js is used (is this undocumented behavior?) #16433

@jedwards1211

Description

@jedwards1211

Environment

Node version: v16.15.1
npm version: v8.11.0
Local ESLint version: v8.25.0 (Currently used)
Global ESLint version: Not found
Operating System: darwin 21.6.0

What parser are you using?

Default (Espree)

What did you do?

> mkdir eslint-bug
> cd eslint-bug
> npm init
> npm i eslint
> touch .gitignore
> eslint --ignore-path .gitignore # succeeds
> touch eslint.config.js
> eslint --ignore-path .gitignore
Invalid option '--ignore-path' - perhaps you meant '--ignore-pattern'?

What did you expect to happen?

--ignore-path works in any case. Is --ignore-path intentionally not supported when using eslint.config.js? If so then the docs for --ignore-path need to make this clear.

What actually happened?

When eslint.config.js exists, running eslint --ignore-path .gitignore errors out: Invalid option '--ignore-path' - perhaps you meant '--ignore-pattern'

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

The option disappears from eslint -h as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussiondocumentationRelates to ESLint's documentation

    Type

    No type

    Projects

    Status

    Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions