andreoliwa / nitpick

Enforce the same settings on multiple projects
https://nitpick.readthedocs.io/
MIT License
393 stars 24 forks source link

Request: controlling `pre-commit` tab size (2 spaces vs 4 spaces) #620

Open jamesbraza opened 10 months ago

jamesbraza commented 10 months ago

Problem

I have prettier run on all files with .prettierrc.toml of tabWidth = 4, to match PEP 8 spacing in all files (YAML, JSON, etc.).

This conflicts with nitpick's edits to .pre-commit-config.yaml, because nitpick uses 2 spaces.

Possible solution

Exposing a new configuration parameter tab-width to enable compatibility with my prior config.

andreoliwa commented 10 months ago

Exposing a new configuration parameter tab-width to enable compatibility with my prior config.

That's probably the best solution. I thought of reading EditorConfig's settings or even Prettier's, but that might be overkill for now.