question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clarification on behavior of dot directories

See original GitHub issue

Tell us about your environment

  • ESLint Version: v6.3.0
  • Node Version: v12.8.1
  • yarn Version: 1.17.3

What parser (default, Babel-ESLint, etc.) are you using?

@typescript-eslint/parser

Please show your full configuration:

Configuration
{
  "env": {
    "browser": true,
    "es6": true,
    "node": true
  },
  "extends": [
    "eslint:recommended",
    "plugin:prettier/recommended",
    "plugin:react/recommended",
    "plugin:@typescript-eslint/eslint-recommended",
    "plugin:@typescript-eslint/recommended"
  ],
  "parser": "@typescript-eslint/parser",
  "plugins": ["@typescript-eslint", "simple-import-sort", "prettier"],
  "parserOptions": {
    "sourceType": "module"
  },
  "rules": {
    "indent": ["error", 2],
    "react/display-name": "off",
    "react/prop-types": "off",
    "react/react-in-jsx-scope": "off",
    "simple-import-sort/sort": "error",
    "@typescript-eslint/explicit-function-return-type": "off",
    "@typescript-eslint/member-delimiter-style": "off",
    "@typescript-eslint/no-unused-vars": ["error", {
      "argsIgnorePattern": "^_$"
    }]
  },
  "globals": {
    "React": "writable"
  },
  "settings": {
    "react": {
        "version": "detect"
    }
  }
}

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

What actually happened? Please include the actual, raw output from ESLint.

$ yarn eslint client/.storybook/config.js 

.../client/.storybook/config.js
  0:0  warning  File ignored because of a matching ignore pattern. Use "--no-ignore" to override

✖ 1 problem (0 errors, 1 warning)

What did you expect to happen?

client/.storybook/config.js should be linted

Are you willing to submit a pull request to fix this bug?

Sure?

More details

I see this comment: https://github.com/eslint/eslint/issues/4828#issuecomment-194535273

Thanks. So this looks like a bug, we should be linting anything passed on the command line. We should fix that.

But it seems like that’s not the case, from this test suite: https://github.com/eslint/eslint/blob/22046939a7f250e6cce40a2acdfd3581a2ce29f5/tests/lib/cli-engine.js#L355-L375

The documentation doesn’t seem very helpful. Searching for “dot files” doesn’t help me, and the section on .eslintignore only mentions:

Lines preceded by ! are negated patterns that re-include a pattern that was ignored by an earlier pattern.

Even though I’m not ignoring anything. It’s also weird that the message says File ignored because of a matching ignore pattern because I don’t have a .eslintignore file in my project.

The weird part is that yarn eslint client/.storybook/ works. Can we get some clarification on this issue (and the expected behavior) in the docs and/or in the CLI?

Issues that I’ve already looked at:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
snhardincommented, Oct 28, 2019

Hello everyone. Will be submitting a PR for this soon. Thank you for your patience. 🙂

1reaction
snhardincommented, Oct 2, 2019

Hello! I’d like to take a stab at this. I use ESLint a lot for work and would enjoy the opportunity to give back. Any pointers on where to focus my attention are appreciated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cp behaves weirdly when . (dot) or .. (dot dot) are the source ...
But it doesn't behave the same way. Specifying src will copy the directory into dest , src/. will copy the contents. I'll try...
Read more >
du command does not parse hidden directories - Super User
This command shows you the summarized size of hidden directories using a regular expression: du -hs .[^.]* ... Why does du behave like...
Read more >
How to Use the .github Repository - freeCodeCamp
github directory houses workflows, issue templates, pull request templates, funding information, and some other files specific to that project.
Read more >
How to ignore all hidden directories/files recursively in a git ...
This will make ignoring all hidden/dot files recursively the default for every repository on the machine. A separate .gitignore file for every repo...
Read more >
How to exclude/ignore hidden files and directories in a ...
Explanation: The -path option runs checks a pattern against the entire path string. * is a wildcard, / is a directory separator, ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found