omnivore-app / obsidian-omnivore

Obsidian plugin to fetch articles and highlights from Omnivore
MIT License
812 stars 48 forks source link

[FR] Use Eslint in CI and let Eslint fix issues automatically and push those changes directly via CI in repo. #95

Closed Raboro closed 10 months ago

Raboro commented 1 year ago

There is already a Eslint configuration file: .eslintrc. It would be nice to use the linter to have a good code style. To not always run it yourself it could be integrated into the CI workflow. But then you must fix the issues by yourself and the build fails. It would be better to let Eslint fix the issues automatically in CI and push those changes directly back into the repo. Full automation.

If this sounds nice a couple of changes must be done. Two scripts in package.json must be added. One to fix the issues and one check code style after the fix to validate that there are no issues left. Also integration into CI (both .yml files). And a change to the repo settings. To let the Action Bot directly push into the repo, this must be enabled in the settings: Actions > General > Workflow permissions to Read and Write permissions: image