eslint / config-inspector

A visual tool for inspecting and understanding your ESLint flat configs.
https://www.npmjs.com/package/@eslint/config-inspector
Apache License 2.0
518 stars 15 forks source link

[BUG] Config Inspector shows that '*.js' matches 'src/main.js' #49

Closed CloudNStoyan closed 1 month ago

CloudNStoyan commented 1 month ago

Config Inspector shows that *.js matches src/main.js

Config Inspector showing that '*.js' matches 'src/main.js'

Repo to reproduce the issue: https://github.com/CloudNStoyan/eslint-config-inspect-filepath-issue

Running npm run lint shows that the "Root .js files only" Config Item is not active for src/main.js because it trips the no-constant-condition rule: error Unexpected constant condition no-constant-condition

Note: This only appears after the src/main.js file was matched by another Config Item (in this case the 'All .js files' one)

Tested on Windows 11, MacOS Sonoma 14.4.1 with Node v20.11.0