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.

Change Request: Dissable errors for directories with files that are all unsupported.

See original GitHub issue

ESLint version

v8.5.0

What problem do you want to solve?

Currently there are some directories which are empty, or contain files that are not supported by ESLint (e.g. different language than JS/TS); when ESLint encounters one of these directories, it throws an error and exits with a non-zero exit code. I would expect that the --no-error-on-unmatched-pattern CLI option would disable this or adding that pattern to .eslintignore, it doesn’t. (Slightly Important) Context: This is a mono-repo with many different projects in the repo-root/packages/ directory. I would like all JS/TS files in these to be linted (after being formatted by Prettier, which is working as expected) despite them containing other types of files (like .rs, .go, .py, etc) which aren’t supported by ESLint (as far as I know) and they have their own linters.

What do you think is the correct solution?

I get that this might be an issue for some, but I’d like a way to turn this specific error off; either through a CLI switch, or a configuration option in .eslintrc.*. Or just make ESLint a bit more “lenient” like Prettier (e.g. doesn’t complain about unsupported files).

Participation

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

Additional comments

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mdjermanoviccommented, Jun 14, 2022

Hi @Reboot-Codes, thanks for the issue!

Currently there are some directories which are empty, or contain files that are not supported by ESLint (e.g. different language than JS/TS); when ESLint encounters one of these directories, it throws an error and exits with a non-zero exit code. I would expect that the --no-error-on-unmatched-pattern CLI option would disable this or adding that pattern to .eslintignore, it doesn’t.

How did you run ESLint, and what error did you get? --no-error-on-unmatched-pattern should prevent errors for unmatched patterns and patterns that match only ignored files.

0reactions
Reboot-Codescommented, Jun 14, 2022

Weird, well, looks like I’ll have to go fix prettier then, thank you for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upload of file .. was successful, but error occurred ... - WinSCP
If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on 'Ignore permission errors' option.
Read more >
What Is the 403 Forbidden Error and How to Fix It (8 Methods ...
Check the .htaccess file. Reset file and directory permissions. Disable WordPress plugins. Upload an index page. Edit file ownership. Verify the A record....
Read more >
Adjust case sensitivity - WSL - Microsoft Learn
Learn how case sensitive file names are handled between Windows and Linux file ... Change the case sensitivity of files and directories.
Read more >
Windows - Set Folder Permissions
Open Windows File Explorer. Right-click on Program Files. Select Properties then the Security tab.
Read more >
The File System Access API: simplifying access to local files
The File System Access API allows web apps to read or save changes directly to files ... To enumerate all files in a...
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