Ask a Question

Code prettier

SOLVED
Tank302
Occasional Contributor

Code prettier

Please tell, is there an automatic code formatter in TestComplete? In order not to bother with indentations and for the whole team to write good code?

I've used Prettier before (https://prettier.io/), can I connect it as an external plugin?

Thanks.

5 REPLIES 5
Marsha_R
Champion Level 3

Tank302
Occasional Contributor

No, that's not what I was asking. What you offer is fine-tuning the look of what is written.

 

And I ask about the mechanism which would independently remove or add brackets, spaces, semicolons, etc., etc.

 

You see, our code will be checked - and everyone should write according to the generally accepted rules of writing JS code. And Prettier copes with this task perfectly. But unfortunately we have to copy blocks of text, check online on another resource, and paste into the code editor already formatted code. This is not convenient. I would like to be able to connect such a skin test mechanism directly to the Test Complete code editor.

Marsha_R
Champion Level 3

You can always ask Support directly at this link

https://support.smartbear.com/testcomplete/message

Tank302
Occasional Contributor

Ok. Thanks

AGubarev
SmartBear Alumni (Retired)

Hi

unfortunately, there is no such  plugin now.

 

But good thing in Prettier that you can use it with commit hook:

https://prettier.io/docs/en/precommit.html

 

So, maybe it will be even more helpful to introduce guidelines for the whole team.

Alexander Gubarev
TestComplete QA Engineer
cancel
Showing results for 
Search instead for 
Did you mean: