How can I get rid of prettier completely?
See original GitHub issueCurrent Behavior
Working with prettier is PITA. I don’t like how it formats my code.
Desired Behavior
I would like to get rid of it completely. What can I do about it?
Suggested Solution
- Expose tsdx config to allow to remove and uninstall prettier (or any other component). https://github.com/jaredpalmer/tsdx/issues/634
- Separate prettier from eslint
tsdx lint
totsdx format
. - Add option to remove prettier to install menu for tsdx.
Who does this impact? Who is this for?
It will only affect powerusers who like to control their configurations.
Describe alternatives you’ve considered
.prettierignore
Additional context
https://github.com/jaredpalmer/tsdx/issues/917 https://github.com/jaredpalmer/tsdx/issues/634
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5
Top Results From Across the Web
How to remove prettier plugin from ESLint in VS Code?
What I tried so far: deleting repo and cloning it from github with correct ESLint file. configuring ESLint file from template with eslint...
Read more >How to disable prettier in VSCode for a specific project?
On Windows/Linux - File > Preferences > Settings · On macOS - Code > Preferences > Settings.
Read more >Ignoring Code - Prettier
Use .prettierignore to ignore (i.e. not reformat) certain files and folders completely. Use “prettier-ignore” comments to ignore parts of files.
Read more >Disabling languages for Prettier (in VScode) | Zell Liew
It used to be straightforward to disable languages for Prettier in VSCode. You just added a prettier.disableLanguages setting and you were done.
Read more >Remove prettier from eslint-config-react-native-community
Prettier eslint rules should be removed. Prettier is to forget about formatting, not to paint your code with red underlines everywhere.
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 FreeTop 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
Top GitHub Comments
Yup exactly.
I don’t totally know how
eslint-plugin-prettier
works under-the-hood, so can’t answer that implementation detail question with confidence. But suffice to say, that’s not TSDX implementation, buteslint-plugin-prettier
implementation.Yea, it’s turning
off
the ruleset that’s associated witheslint-plugin-prettier
. That works with TSDX because your config is (currently) merged with TSDX’s. Normally your ESLint config would have to turn on the rules somewhere but because of how it’s currently set-up it’s done invisibly in a potentially unintuitive way. See also #634 , which you’ve already linkedThat works too I suppose 👍
Closing this out as the symptoms have been resolved and the root cause already has a few issues open for it to decouple parts of TSDX
It’s been few years since I was setting that up, I may need to refresh my knowledge.
I thought that it’s just extending prettier rules, so that you don’t get errors in IDE for prettier related issues. I was under the impression that prettier fixes everything regardless of any errors displayed in IDE.
Anyway I was just going through this https://prettier.io/docs/en/integrating-with-linters.html, so tsdx uses something like
eslint-plugin-prettier
and runs prettier within eslint only after eslint finds an error? And then, if eslint finds an error, it doesn’t send prettier the whole document, but just that part of code, so prettier effectively doesn’t do anything?That’s awesome. But I assume this rule
'prettier/prettier': 'off'
only works for this particular setup, right? In setups where both eslint and prettier run separately, it won’t care what eslint lists in eslint config…Thanks!
PS: I managed to disable prettier with
.prettierignore
by adding all*
.