Not compatible with root level `.prettierrc.js`
See original GitHub issue$ cat app/models/user.rb
# A User is neat
class User < ApplicationRecord
end
$ ./node_modules/.bin/prettier --write app/models/user.rb
app/models/user.rb
[error] app/models/user.rb: SyntaxError: Unexpected token # (1:1)
[error] > 1 | # A User is neat
[error] | ^
[error] 2 | class User < ApplicationRecord
[error] 3 | end
[error] 4 |
$ ./node_modules/.bin/prettier --version
1.16.4
$ ruby --version
ruby 2.5.1p57
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Configuration File - Prettier
A .prettierrc.js , .prettierrc.cjs , prettier.config.js ... for .editorconfig files in the parent directories # root = true [*] # Non-configurable Prettier ...
Read more >How to configure Prettier and VSCode - Gleb Bahmutov
You can configure JavaScript code auto-formatting with Prettier to work per-project. This allows you to get a consistent formatting without ...
Read more >Why does Prettier not format code in VS Code? - Stack Overflow
Make sure your Editor: Default Formatter field is not null but rather ... already had .eslintrc.js and .prettierrc files But nothing worked.
Read more >How to Format All Files in a Directory with Prettier
Level Up Coding ... If you'd rather not install Prettier globally, ... put a .prettierrc file in the root folder of your project, ......
Read more >Setting up Prettier and ESlint for JS and React Apps - Medium
2- Will help everyone to learn and level up, as every linting rule is ... 3- Handling legacy code that doesn't follow linting...
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 Free
Top 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
This should be fixed on master. If this becomes a problem again feel free to reopen.
npm package.
This is in the scripts in a package.json, invoked via yarn:
prettier
package: 1.16.4@prettier/plugin-ruby
package: 0.12.2macOS Mojave 10.14.4