felipeochoa / rjsx-mode

A JSX major mode for Emacs
https://github.com/felipeochoa/rjsx-mode
MIT License
639 stars 32 forks source link

Automatically modifies files on open or mode set (?) #135

Closed agzam closed 2 years ago

agzam commented 2 years ago

For some reason, rjsx-mode automatically modifies files, adding line breaks and converting single quotes to double quotes. That's nice and all, but it's extremely annoying e.g., when browsing node_modules dir.

I can't figure out what makes it so enthusiastic. I cleared the hooks but still can't fix this behavior.

agzam commented 2 years ago

Never mind. It looks like I have prettier-js hook on both: rjsx-mode and js2-mode, and even though I cleared the hook for rjsx, it derives from js2-mode, so the hook got executed.