Jump to content
Search Community

gsap formatters prettier ?

jonForum test
Moderator Tag

Recommended Posts

Sup guys, do you have something to get optimal formatter with gsap?

With a prettier plugins or another formatters?

Prettier is nice for react,jsx, but became weird with gsap chaining.

 

What did you use ? any recommendation or special setting ?

Example here, syntax became buggy, look gsap color, because it break lines for a reason i dont know !

 

G8gDILZX_o.png

 

Maybe a way to get something like this ?  optimal space !
```js

      gsap.to('.ActivityTab'0.6, {
            opacity: 1,
            scale: 1,
            rotation: 0,
            y: '0%',
            ease: 'elastic.out(1.2, 0.75)',
            stagger: {
               from: 0,
               amount: 0.5,
            },
         }).delay(0.5);

```

Link to comment
Share on other sites

Yeah, the only reason I don't use prettier at all, is just for that particular setting which can't be turned off completely and you're left with a bunch of // prettier-ignore comments floating around in your code:

 

https://github.com/prettier/prettier/issues/3468

 

When I'm forced to use prettier I don't have a good time. Normally I use a very regular eslint setting and that's it, I take care of object, arrays, functions, new-lines, etc. formatting manually. I left eslint to autofix indentation, semicolons (when needed), quotes, spaces, etc.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...