Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convenient way to disable per file #68

Open
steinarb opened this issue Oct 15, 2021 · 1 comment
Open

Convenient way to disable per file #68

steinarb opened this issue Oct 15, 2021 · 1 comment

Comments

@steinarb
Copy link

steinarb commented Oct 15, 2021

There are some files I would like to exclude from prettier formatting, because they are more readable if I can have one line per declaration:

  1. The redux actions definitions files (e.g. like this one)
  2. The reduxjs toolkit reducers (e.g. like this one)

Currently I solve this by switching to fundamental-mode before saving.

But this is a nuisance, and especially when I forget to switch mode before saving, and don't see it until the change has been committed and pushed (like what happened today).

So it would be nice to have the exclusion automated.

@steinarb
Copy link
Author

I always mark the files that should be left alone with this (so eslint won't fail the build):

/* eslint-disable prettier/prettier */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant