Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Dev/php lint experiment

Akhil requested to merge dev/php-lint-experiment into main

Instructions

  • Update configuration files using reference MR
    • Double-check package.json and composer.json files(Lots of devDependencies can be removed`)
    • Remove extra config files(Only ones needed are: .editorconfig, .eslintrc.js, .gitignore, .gitlab-ci.yml, package.json, .php-cs-fixer.dist.php, stylelint.config.js, .stylelintignore, babel.config.js, webpack.config.js)
  • Use node 16 locally
    • Install nvm
    • nvm install lts/gallium
    • nvm alias default lts/gallium
    • nvm use lts/gallium
  • Confirm with npm i and composer install that packages install correctly
  • Confirm that lint and stylelint jobs run
    • npm run lint
    • npm run stylelint
    • vendor/bin/php-cs-fixer fix --dry-run --config=.php-cs-fixer.dist.php .
  • Lint all files so lint jobs pass:
    • vendor/bin/php-cs-fixer --config=.php-cs-fixer.dist.php fix .
    • npm run lint:fix
    • npm run stylelint:fix
  • Setup git pre-commit hook from here
    • Paste the contents from the link to .git/hooks/pre-commit
    • chmod +x .git/hooks/pre-commit
  • Ensure that all lint and build jobs pass
  • Deploy app to dev server and test that it works as expected
Edited by Akhil

Merge request reports

Loading