Skip to content

Commit

Permalink
fix: move formatting into generators
Browse files Browse the repository at this point in the history
  • Loading branch information
osouthwell-scottlogic authored Nov 2, 2022
1 parent d31d7a4 commit d269db4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [master]

jobs:
run-code-format:
format:
name: Code Format
runs-on: ubuntu-latest

Expand All @@ -25,4 +25,4 @@ jobs:
run: npm ci

- name: Code Format
run: npm run format:check
run: npm run format:check:all
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [master]

jobs:
run-eslint:
lint:
name: Lint
runs-on: ubuntu-latest

Expand All @@ -25,4 +25,4 @@ jobs:
run: npm ci

- name: Code Linting Check
run: npm run lint:check
run: npm run lint:check:all
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
. "$(dirname -- "$0")/_/husky.sh"

echo 'Pre-commit checks'
npm run format:check
npm run lint:check
npm run format:check:all
npm run lint:check:all
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
"scripts": {
"generate-api": "openapi-forge forge ./example/petstore.json . -o ./example",
"test": "node test",
"lint:check": "eslint .",
"lint:write": "eslint --fix .",
"format:check": "node format check",
"format:write": "node format write"
"lint:check:all": "eslint .",
"lint:write:all": "eslint --fix .",
"format:check:all": "node format check",
"format:write:all": "node format write",
"format:write": "echo Automatic formatting is not available for this generator:"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit d269db4

Please sign in to comment.