Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] The ignores containing rules starting with ! causes the payload.json request to return an incomplete file list. #113

Closed
whitexie opened this issue Dec 19, 2024 · 0 comments

Comments

@whitexie
Copy link

Problem Description

In my eslint.config.js file, when there is an ignores object that includes a rule starting with !, for example, { ignores: ['!xxx'] }, the file list returned by payload.json only includes the files specified in ignores.

Steps to Reproduce

  1. The content of eslint.config.js is as follows:
export default [
  {
    rules: {
      semi: 'error',
    },
    files: ['**/*.{vue, js}'],
  },
  {
    ignores: ['!src/components/*.vue'],
  },
]
  1. Run npx eslint/config-inspector.
  2. View the payload.json request in the browser.

Expected Result

payload.json should return all relevant files, not just those specified in ignores.

Actual Result

payload.json only returns files that match !src/components/*.vue in ignores.
Image

Environment Information

  • eslint/config-inspector version: [0.6.0]

Reproducible Link

You can reproduce the issue using the following StackBlitz link: StackBlitz Example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant