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

Lint issue: Use double spaces instead of Tabs for nesting. #265

Closed
madhusudhand opened this issue Mar 9, 2023 · 4 comments
Closed

Lint issue: Use double spaces instead of Tabs for nesting. #265

madhusudhand opened this issue Mar 9, 2023 · 4 comments

Comments

@madhusudhand
Copy link
Contributor

With tab based indentation, code is not readable specially with react code which is nested to many levels.
Use double spaces instead.

image

@mikachan
Copy link
Member

mikachan commented May 1, 2023

I'm not sure if we should move away from tabs as this formatting style is part of the WordPress Prettier config: https://github.com/WordPress/gutenberg/blob/a770dfd075933f0cee7fcd00ddb9361d9ef90ddc/packages/prettier-config/lib/index.js#L20

@vcanales
Copy link
Member

vcanales commented May 2, 2023

If this is specific to reviews, you can modify how tab size is rendered on your GitHub account settings
https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-your-tab-size-rendering-preference# — TL;DR: Scroll down to "Tab size preference" on this page https://github.com/settings/appearance

The .editorconfig file included in the project makes it so that they render at a more readable size in the editor if you have the extension installed; for VS Code, that is this extension.

@t-hamano
Copy link
Contributor

I believe that tab indentation should be used, following WordPress Coding Standards. Tab indentation appears to be recommended in all HTML, CSS, JavaScript, and PHP.

@mikachan
Copy link
Member

I'm going to close this as moving away from tabs does not align with the WordPress Coding Standards. Please re-open if anyone wants to continue the discussion.

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

4 participants