-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Improve editorConfigToPrettier
#17512
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
base: main
Are you sure you want to change the base?
Conversation
commit: |
✅ Deploy Preview for prettier ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
).toStrictEqual({ | ||
tabWidth: 0, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value 0
is invalid, discussed in josephfrazier/editorconfig-to-prettier#1 and decided to keep it, but tabWidth=0
crashes, I think better to ignore instead.
if (result.useTabs === false && isPositiveInteger(indent_size)) { | ||
result.tabWidth = indent_size; | ||
} else if (isPositiveInteger(tab_width)) { | ||
result.tabWidth = tab_width; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties tab_width
should only used when indent_size === "tab"
and fallback to indent_size
, should we follow?
Description
Checklist
docs/
directory).changelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.