Skip to content

Unconfigured file reported as matched #59

@mdjermanovic

Description

@mdjermanovic

Originally reported in eslint/eslint#18475.

With this config:

// eslint.config.js
export default [
  {
    files: ['**/*'],
    rules: {
      semi: 'error',
    },
  },
];

for a file named fail.txt, config-inspector reports that it is matched by 1 config item (the one in eslint.config.js).

Which is true, this config item does match this file, but files not matched by at least one config object with a pattern that doesn't end with /* or /** are effectively ignored as "unconfigured". So for this file, it would make more sense to report it as "not included or has been ignored".

Repro: https://stackblitz.com/edit/stackblitz-starters-99hktx

Flat config's matching & ignoring logic is here:

https://github.com/eslint/rewrite/blob/830424fd10f0dfe88ee4b1a14b74095db7654476/packages/config-array/src/config-array.js#L838-L1009

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions