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

style: add eslint and prettier #183

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

Aakodal
Copy link
Contributor

@Aakodal Aakodal commented Aug 5, 2022

Litarvan: feel free to change rules you disapprove.

EDIT: this PR is left aside until Litarvan decides to refactor the whole project (not my words, but his).

Copy link
Contributor

@JezerM JezerM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The results of the Prettier config should be similar as similar as before, without introducing a lot of changes in a simple PR.

Aakodal and others added 2 commits August 6, 2022 12:04
Use spaces instead of tabs in order to reduce files changes

Co-authored-by: Jezer Mejía <[email protected]>
@Aakodal
Copy link
Contributor Author

Aakodal commented Aug 6, 2022

The results of the Prettier config should be similar as similar as before, without introducing a lot of changes in a simple PR.

Oh well that didn't change a lot xD
I changed tabWidth to 4 since I committed your suggestion (4 and not 2 because it was 4 before this PR), but it looks like there are still more than 20k lines changed, mostly caused by code inconsistency.

In that case, shouldn't I revert to tabs? Even if final rule is up to Litarvan, I'd recommand them since everyone can configure how they look, and they are literally meant for indentation.

Copy link
Contributor

@JezerM JezerM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, yeah, at then end it is Litarvan's decision~

useTabs: false
tabWidth: 4
semi: true
singleQuote: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package-lock.json is the most changed file with +20,000 changes; if you don't want to change much at all, I would recommend to set tabWidth: 2 for all json files.

Suggested change
singleQuote: true
singleQuote: true
overrides:
- files: '*.json'
options:
tabWidth: 2

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

Successfully merging this pull request may close these issues.

2 participants