prettier-eslint-cli tries to format folder whos name ends with '.js'
See original GitHub issueprettier-eslint-cli
version: 5.0.0prettier
version: 1.18.2eslint
version: 4.19.1
What you did:
Executed prettier-eslint --write \"server/**/*.js\" \"client/**/*.js\" \"tests/**/*.js\" \"imports/**/*.js\"
from a npm script
What happened: Received the output:
prettier-eslint-cli [ERROR]: There was an error formatting "internal/path/to/folder/FinishSetup.js":
Error: EISDIR: illegal operation on a directory, read
prettier-eslint-cli [ERROR]: There was an error formatting "internal/path/to/folder/TimeSlot.js":
Error: EISDIR: illegal operation on a directory, read
success formatting 1 file with prettier-eslint
failure formatting 2 files with prettier-eslint
1520 files were unchanged
Problem description: It seems that prettier-eslint-cli doesn’t check whether it is trying to format a file or a folder and relies just on the name.
Suggested solution:
There should be a check in place so that even folders that are named something.js
are viewed as folders.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (5 by maintainers)
Top Results From Across the Web
uglify not able to distinguish between folder and file ending in .js
First of all it's better to avoid .js for folder names. It's not the best practice. Just try adding 'app/**/*.js'. But I'm not...
Read more >Naming Files, Paths, and Namespaces - Win32 apps
A file name is relative to the current directory if it does not begin with one of the following: A UNC name of...
Read more >How To Work with Files using the fs Module in Node.js
With Node.js, you can use JavaScript to programmatically manipulate files with the built-in fs module. The name is short for “file system,” ...
Read more >File Naming Conventions: simple rules save time and effort
Naming folders and files in a consistent, logical and predictable way means that ... The file name describes, at a glance, what the...
Read more >How to get the exact file names? - Help - UiPath Forum
I am using UI path for my development. Have few clarifications below . I am trying to get the File name exactly from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
any updates?
I had the same error. But then I pass full path
./node_modules/.bin/prettier-eslint --write /Users/someuser/Projects/someproject/client/**/*.js
there are no errors