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

Update eslint spacing rules #366

Merged

Conversation

toasted-nutbread
Copy link

This change enables two eslint settings:

  • no-multi-spaces - Disallows multiple spaces other than indentation. This is intended to reduce stylistic inconsistencies which usually result from a user typo. However, there are several situations in the codebase where space alignment is useful. As such, those locations explicitly turn off the rule, and may subsequently turn it back on.
  • space-infix-ops - Makes spacing more clear around operators. This primarily affects how default parameters were assigned, which used Python-like assignments without spaces, such as const {x=1} = value;. Enabling this option also helps fix issues with spacing which usually result from user error. This was originally discussed in Eslint stylistic rules FooSoft/yomichan#363 and we opted to not enable it at that time.

Since the project is in a considerably different state at this point, I think these rules should be enabled moving forward, as it increases the level of stylistic code strictness. This should have benefits for the codebase, as it looks to have multiple (somewhat) active developers.

@toasted-nutbread toasted-nutbread requested a review from a team as a code owner December 16, 2023 22:09
Copy link

github-actions bot commented Dec 16, 2023

⚠️ Visual differences introduced by this PR; please validate if they are desirable.

View Playwright Report (note: open the "playwright-report" artifact)

djahandarie
djahandarie previously approved these changes Dec 17, 2023
@djahandarie djahandarie added this pull request to the merge queue Dec 17, 2023
Merged via the queue into yomidevs:master with commit b249627 Dec 17, 2023
5 checks passed
@djahandarie djahandarie added the kind/meta The issue or PR is meta label Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/meta The issue or PR is meta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants