General cleanup with eslint updates#82
Conversation
Codecov Report
@@ Coverage Diff @@
## master #82 +/- ##
==========================================
- Coverage 89.04% 89.04% -0.01%
==========================================
Files 20 20
Lines 1826 1825 -1
Branches 374 373 -1
==========================================
- Hits 1626 1625 -1
Misses 200 200
Continue to review full report at Codecov.
|
raphinesse
left a comment
There was a problem hiding this comment.
My opinion regarding these changes:
- ✔️ Re-enable
padded-blocksrule
One minor nitpick: I don't like the generous empty lines you added to therequireblocks. - ✔️ Re-enable
no-throw-literalrule - ✔️
quote-propsfixes - ✔️ (semi)standard eslint updates
- ❌ Disable
no-unused-varsrule - ❔ Re-enable
operator-linebreakrule
I think it's good to enforce one style here, although I tend to favor thebeforestyle, especially with boolean operators.
I'd also like to remove camelcase: off. But this one will make a lot of noise, so I think we should approach it in a separate PR. Plus we will have to see how many exceptions we have to make for our public interface here.
All in all, this looks very good to me 👍
|
@janpio I think consistency with other repos should not be a matter here, if we see this as a test drive towards a better, stricter code style. |
I'm ok with it if it is part of a bigger initiative that will be used in a project wide context.
8d662bc to
5cbe1f5
Compare
|
I just pushed the more important changes in a different order, in a cleaner sequence, and rebased on I pushed the original proposal into my |
raphinesse
left a comment
There was a problem hiding this comment.
Approved with my suggested change. Thanks for updating this PR.
as needed for the upcoming (semi)standard eslint package updates Co-authored-by: Raphael von der Grün <raphinesse@gmail.com> Co-authored-by: Christopher J. Brody <chris@brody.consulting>
- eslint-config-semistandard@14
- eslint-config-standard@13
with src & spec fixed by the following command:
npm run eslint -- --fix
and remove padded-blocks exception from .eslintrc.yml
with src & spec fixed by the following command:
npm run eslint -- --fix
52f0c0e to
112b5cd
Compare
|
I applied the change suggested by @raphinesse, with the code alignment fixed, preserved these updates in my I think these changes should be good to go, would appreciate a final review. I am not sure whether these changes should be merged by a merge commit or rebase commit (I would not favor a squash merge). The merge commit would clearly show that these changes go together with this PR number, while the rebase commit might be a little less noisy. (GitHub would still show the PR number for each of the commits, though.) |
raphinesse
left a comment
There was a problem hiding this comment.
LGTM, thanks for the update!
I'd merge this as an actual merge. But do as you see fit.
UPDATED after review and discussion:
merge changes from PR remove no-throw-literal lint exception not needed #81 to remove standard eslint exceptions from.eslint.ymlthat are not neededno-prototype-builtins(as needed by new (semi)standard eslint package updates)prefer-const"e-propseslint rules are now enabled)padded-blocksthat is no longer kept as an exceptionI tried to keep these changes split into separate commits in a semi-sensical manner. I think it would be a little too much to put all these changes into a single commit. I am now proposing the most important changes in this PR for discussion, with some apparently controversial changes now split into separate PRs.
My objective is to keep the number of (semi)standard eslint exceptions to a bare minimum.