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

Curly braces for switch cases #650

Closed
Richienb opened this issue Jan 24, 2022 · 1 comment
Closed

Curly braces for switch cases #650

Richienb opened this issue Jan 24, 2022 · 1 comment

Comments

@Richienb
Copy link
Contributor

switch (value) {
		case 'unicorn': {
			break;
		}
}

vs

switch (value) {
		case 'unicorn':
			break;
}

Possible solution

@sindresorhus
Copy link
Member

Can you open a rule proposal on https://github.com/sindresorhus/eslint-plugin-unicorn? I think it would be good to have a dedicated rule for it as it can then be auto-fixed. I think the default should be with braces.

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

2 participants