creatuity / magento-quality-tools

Default version of quality tools configuration used in Magento 2 projects in Creatuity
1 stars 0 forks source link

Introduce front-end tasks #7

Open nmalecki opened 2 years ago

nmalecki commented 2 years ago

We should introduce some tasks to handle front-end code quality - for example - eslint. In this issue, we can collect the ideas for what tasks we can implement into the tool. Existing tasks in the GrumPHP https://github.com/phpro/grumphp/blob/master/doc/tasks.md - it means that we can easily implement them. If you have another idea - it's also good, this tool is easily extensibility so we can create and add our own task :)

kwolny-creatuity commented 2 years ago

We have some problems with code formatting on frontend. Usually because we use only code formatting provided by our IDE's (some of us use VS Code, some PHPStorm). We should implement a tool which will check our code before commiting and which will be independent of our IDE's. I made some research and I think that good solution would be prettier used with git hooks (pre-commit git hook) this is an article that I found: https://deepinder.me/format-code-style-with-prettier-in-react-on-git-commit I didn't tested it yet.