#!/bin/bash # run tooling only on branches that start with master to avoid linting noise in stable if [[ $(git branch --show-current) == master* ]]; then if ! cmp -s -- addons/web/tooling/_package.json package.json; then echo "Your package.json is out of date, reload the tooling using the reload script" exit 1 fi if ! cmp -s -- addons/web/tooling/_eslintignore .eslintignore || ! cmp -s -- addons/web/tooling/_prettierignore .prettierignore || ! cmp -s -- addons/web/tooling/_eslintrc.json .eslintrc.json || ! cmp -s -- addons/web/tooling/_prettierrc.json .prettierrc.json then echo "Some of your eslint/prettier config files are out of date, refresh them using the refresh script" exit 1 fi npm run format-staged fi