Add code QA tools to the repo
Closed this issue ยท 18 comments
- husky
- lintstage
- commitlint
- cz-customizable
- standard-version
I think about creating a github action that automatically generates the docs, when pushing to the master branch.
Nice work on the docs autogen, ty
Nice work on the docs autogen, ty
Of course.
I see that the docs delivery were failed (see Github Actions).
Did you change the setting I showed to take the docs from the branch gh-pages
(instead of master
)?
correct, forgot - it's now fixed
I should also say that there is an important basic feature we currently don't actively use, svelte-check
, that can be run (already!) by npm run check
(The errors and the hints should be familiar, they are the ones Visual Studio Code shows all the time).
There are many hints, but two errors remained that it would be nice to fix, so we can add this check to the test workflow in Github Action:
c:\Src\svelte-splitpanes\src\lib\Splitpanes.svelte:348:12
Error: Argument of type 'string' is not assignable to parameter of type '"pane-add" | "pane-remove" | "pane-click" | "ready" | "resize" | "resized" | "splitter-click" | "pane-maximize"'. (ts)
function dispatchSizeEvent(name: string) {
dispatch(name, prepareSizeEvent());
}
c:\Src\svelte-splitpanes\src\lib\Splitpanes.svelte:406:21
Error: Argument of type '() => number' is not assignable to parameter of type 'number'. (ts)
paneBefore.setSz(Math.max(100 - paneAfter.max() - sums.prevPanesSize - sumNextPanesSize(splitterIndex + 1), 0));
paneAfter.setSz(paneAfter.max);
}
The first error is related to the event dispatching, and the second is because you should call paneAfter.max()
.
Update:
Fixed in fba822d
Also I see some linting errors that needed to be fixed (npm run lint
)
Update
Fixed in b8c6b2a
After fixing these issues, we can use husky to add hooks to git, as you can see in the husky guide, to activate lint-stage as described here.
However, I wouldn't recommend on running the playwright tests in hooks, they are heavy and intentionally they are in optional deps.
Update:
Fixed in 19d5718
closing - thank you Tal ;-)
paneAfter.max => this is most likely the issue with the jitter sizing.
closing - thank you Tal ;-)
Why to close? There is still a huge work to be done here, as I mentioned. I suggest to reopen.
Additional note: Need to implement auto versioning. standard-version
is deprecated, and has recommended to use the project release-please instead:
standard-version is deprecated. If you're a GitHub user, I recommend release-please as an alternative. I encourage folks to fork this repository and, if a fork gets popular, I will link to it in this README.
OK I'm reopening, close again if you want.
A question about the conventional commits and scoping: Should we cancel scoping for now at all, and add them in the future(with only a predefined list) when there will be separated scopes? (if ever)
Update
The scope question were removed in f872e92
I am working on it right now
yes, you may skip scoping for now. it takes a nomenclature and I believe it's not usefull for such a small comp.
I believe there is a way to configure that.. let me check
Current status:
All the good stuff except the automated versioning is done.
I have tried to use git hooks(via husky) to make git commit
command be equivalent to npm run commit
, but that's doesn't works well because issues of console interactivity on git hooks.
There is a workaround, but it looks ugly with the interactivity(bad console height and flush), at least for windows.
So I used hooks only for commitlint, and the rest of the checks are part of "npm run commit"
nice, thank you.
well I am learning a few things in github actions myself ;-/
shall the ticket be closed?
nice, thank you. well I am learning a few things in github actions myself ;-/
shall the ticket be closed?
Yes!
We need to create a ticket of "exploring the usage of release-please" bot. (he's up now, need to see what will he do)