@krusemedien/codestyle
v1.0.9
Published
Codestyle initialization tool
Downloads
11
Readme
KruseMedien code style
Install
First create a package.json if not exists:
{
"private": true
}
Now run the following command:
npm install @krusemedien/codestyle --dev
Initialisation
To initialize the project simple run the following command:
./node_modules/.bin/codestyle init
After initialising the project run:
composer install
Code style check
To check the codestyle run the desired npm script:
npm run lint
To run codesniffer and to display the codesniffer rule names add the -s argument:
npm run lint:php . -- -s
Help
If you want to set custom codesniffer or eslint rules, you may find more helpful examples:
Code style fix
To fix the codestyle run the desired npm script:
npm run fix