Skip to content

Commit

Permalink
Rhyme formatting commands with linting commands re #10575
Browse files Browse the repository at this point in the history
Add formatting step to template CI workflow
  • Loading branch information
jacobtylerwalls committed May 2, 2024
1 parent edf4e67 commit 44b3b84
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Check formatting
run: |
yarn format --check --no-write
yarn prettier:check
black . --check --exclude=node_modules
- name: Check for missing migrations
Expand Down
5 changes: 5 additions & 0 deletions arches/install/arches-templates/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ jobs:
echo "package.json not found, skipping yarn commands."
fi
- name: Check formatting
run: |
yarn prettier:check
black . --check --exclude=node_modules
- name: Check for missing migrations
run: |
python manage.py makemigrations --check
Expand Down
3 changes: 2 additions & 1 deletion arches/install/arches-templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"eslint:check": "./{{ project_name }}/media/node_modules/.bin/eslint ./{{ project_name }}/src --resolve-plugins-relative-to ./{{ project_name }}/media --ext .vue,.ts --parser ./{{ project_name }}/media/node_modules/vue-eslint-parser/index.js",
"eslint:watch": "./{{ project_name }}/media/node_modules/.bin/nodemon --watch ./{{ project_name }}/src --ext ts,vue --exec yarn --silent eslint:check",
"eslint:fix": "./{{ project_name }}/media/node_modules/.bin/eslint ./{{ project_name }}/src --resolve-plugins-relative-to ./{{ project_name }}/media --ext .vue,.ts --parser ./{{ project_name }}/media/node_modules/vue-eslint-parser/index.js --fix",
"format": "./{{ project_name }}/media/node_modules/.bin/prettier ./{{ project_name }}/src --write",
"gettext:extract": "./{{ project_name }}/media/node_modules/.bin/vue-gettext-extract",
"gettext:compile": "./{{ project_name }}/media/node_modules/.bin/vue-gettext-compile",
"prettier:check": "./{{ project_name }}/media/node_modules/.bin/prettier ./{{ project_name }}/src --check",
"prettier:fix": "./{{ project_name }}/media/node_modules/.bin/prettier ./{{ project_name }}/src --write",
"ts:check": "./{{ project_name }}/media/node_modules/.bin/vue-tsc --noEmit",
"ts:watch": "./{{ project_name }}/media/node_modules/.bin/vue-tsc --watch --noEmit",
"start": "./{{ project_name }}/media/node_modules/.bin/cross-env NODE_PATH=./{{ project_name }}/media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./{{ project_name }}/media/node_modules/.bin/webpack serve --config ./{{ project_name }}/webpack/webpack.config.dev.js"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
"eslint:check": "NODE_PATH=./arches/app/media/node_modules ./arches/app/media/node_modules/.bin/eslint ./arches/app/src --resolve-plugins-relative-to ./arches/app/media --ext .vue,.ts --parser ./arches/app/media/node_modules/vue-eslint-parser/index.js",
"eslint:fix": "NODE_PATH=./arches/app/media/node_modules ./arches/app/media/node_modules/.bin/eslint ./arches/app/src --resolve-plugins-relative-to ./arches/app/media --ext .vue,.ts --parser ./arches/app/media/node_modules/vue-eslint-parser/index.js --fix",
"eslint:watch": "NODE_PATH=./arches/app/media/node_modules ./arches/app/media/node_modules/.bin/nodemon --watch ./arches/app/src --ext ts,vue --exec yarn --silent eslint:check",
"format": "yarn prettier arches/app/src --write",
"gettext:extract": "./arches/app/media/node_modules/.bin/vue-gettext-extract",
"gettext:compile": "./arches/app/media/node_modules/.bin/vue-gettext-compile",
"prettier:check": "./arches/app/media/node_modules/.bin/prettier arches/app/src --check",
"prettier:fix": "./arches/app/media/node_modules/.bin/prettier arches/app/src --write",
"ts:check": "./arches/app/media/node_modules/.bin/vue-tsc --noEmit",
"ts:watch": "./arches/app/media/node_modules/.bin/vue-tsc --watch --noEmit",
"start": "./arches/app/media/node_modules/.bin/cross-env NODE_PATH=./arches/app/media/node_modules NODE_OPTIONS=--max-old-space-size=2048 ./arches/app/media/node_modules/.bin/webpack serve --config ./arches/webpack/webpack.config.dev.js"
Expand Down

0 comments on commit 44b3b84

Please sign in to comment.