eslint: Bug: [new config system] globs are ignoring dot files

Environment

Node version: v16.14.0 npm version: v8.3.1 Local ESLint version: v8.23.0 (Currently used) Global ESLint version: Not found Operating System: win32 10.0.19044

What parser are you using?

Default (Espree)

What did you do?

// eslint.config.js

module.exports = [];
// .foo.js
npx eslint *.js -f tap

What did you expect to happen?

Per the RFC, this should include .foo.js?

  1. Defaults - by default, ESLint will ignore node_modules and .git directories only. This is different from the current behavior where ESLint ignores node_modules and all files/directories beginning with a dot (.).

In that case, I would expect this output:

TAP version 13
1..2
ok 1 - D:\tmp\tmp\.foo.js
ok 2 - D:\tmp\tmp\eslint.config.js

What actually happened?

The .foo.js file was not linted:

TAP version 13
1..1
ok 1 - D:\tmp\tmp\eslint.config.js

Participation

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

Additional comments

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Now that we have rewritten the search functionality, we are actually finding dot files by default. As it is now, it will end up being more difficult to mimic the eslintrc functionality than it will be to ensure the originally intended functionality works. Given that, I think the best path forward now is to include dot files in the glob patterns by default.