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

standard(ize) source code formatting #29

brodybits opened this issue Mar 4, 2020 · 2 comments · Fixed by #447

standard(ize) source code formatting #29

brodybits opened this issue Mar 4, 2020 · 2 comments · Fixed by #447


Copy link

from review of pr #28 I discovered that code is sometimes indented with only tabs and sometimes with a combination of tabs and spaces. Also at least one occasion of code with no semicolon.

Most drastic would be to use standard, semistandard, or prettier-standard to reformat the code in what I think is a nicer style. (prettier-standard actually uses the prettierx fork of Prettier that is maintained by myself, which could be seen as an advantage or perhaps even a disadvantage)

Less drastic would be to apply some simplistic rules such as only indent with tabs and always use semicolons to achieve better consistency with minimal code churn. I think it should be possible to do this with custom eslint rule configuration.

Copy link

kethinov commented Mar 4, 2020

I personally use standard on my other projects. I almost threw it into that PR but it would've been an epic diff.

Copy link

I'd like to submit a PR for an .eslintrc.js file, and an .editorconfig file, but it'd probably be a good idea to figure some things out first...

Since there doesn't really seem to be a standard, it might be a good idea to not convert everything all at once... I'm playing around with a PR for a bare-minimum .eslintrc.js file for obvious problems; and then you can add code style preferences later.

For indents, my vote would be to keep tabs. Not to rehash the tabs v. spaces holy war or anything, but I like customizing my indent size, and I like it when you can't accidentally highlight half an indent (as an example: lib/entities.js is indented 7 spaces).


@brodybits brodybits modified the milestones: 0.4.0, 0.5.0 Oct 27, 2020
@karfau karfau modified the milestones: 0.5.0, 0.7.0 Mar 10, 2021
@karfau karfau modified the milestones: 0.7.0, next release Jul 27, 2021
@karfau karfau modified the milestones: 0.7.1, next next release Aug 19, 2021
@karfau karfau modified the milestones: 0.7.3, 0.8.x Aug 28, 2021
@karfau karfau linked a pull request Oct 21, 2021 that will close this issue
1 task
karfau added a commit that referenced this issue Oct 19, 2022
and merge eslint configs as far as possible.

CodeQL discovered some new warnings after the formatting regading unused
I confirmed that all of them could be either fixed or be dismissed and
applied the changes as part of this PR.

Fixes #29 
Fixes #130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Status: Done
4 participants