Create linting scripts and integrate in CI
PHP and Vue/JS needs static checking
PHP tasks
- [x] Syntactical checks (
php -l) - [x] Coding style (
php-cs-fixer) - [x] #990
Vue tasks
- [x] Coding style template part (
prettier) - [x] Coding style script part (
prettier) - [x] Coding style style part (
prettier) - [x] Style guide CSS part (
stylelint) - [x] Linting of JS code (
eslint)
any experience with mega-linter? It supports PHP and probably/maybe Vue
I have no experience with it. I suggested psalm as some examples in the NC doc is given as php linter.
For vue I found something related to eslint in combination with webpack. Not completely done yet but it could be managed.
If we wanted to use multiple checks, that should be possible as well as I think we long as these are not working against each other.
I found this suggestion. It uses prettier, styelint and eslint together. They combine it with automatic git hooks to lint upon commit. (These links serve as a reminder for myself as well :smile:)
I can‘t read the article since it‘s behind a paywall, but why not try it, if he had good experiences with this 🤷♂️
There are a few more tools mentioned here: https://thevaluable.dev/code-quality-check-tools-php/