Closed omasback closed 6 years ago
Please could you share how you are setting up and running precise-commits
in this case? (Including any prettier config etc)
My package.json:
My .prettierrc:
How I test:
git add .
npm run precise-commits
--> No formatting changes required in: [file]
requirePragma
to false in .prettierrc
--> Updated formatting in: [file]
(And yes I am sure I have the correct pragma in the file. When I turn on formatOnSave
in my editor, the editor's prettier plugin formats the file.)
Thanks a lot for providing all the details @omasback!
I can reproduce the issue within precise-commits
, but more importantly also with just prettier directly. It would appear rangeStart
and rangeEnd
cannot easily be combined with requirePragma
at the moment.
I have reported it in the prettier repo directly here: https://github.com/prettier/prettier/issues/3985
Cool, that was my experience as well trying to use prettier CLI with range and pragma combined. Thanks for making that issue!
The underlying prettier issue should have now been fixed
Not sure if this is a bug in your code or prettier. I tried to run prettier cli with a range and it didn't work. So it seems that either this is a bug in prettier or i didnt enter the CLI range options right.