diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index e79b242..0c5863e 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -7,7 +7,7 @@ on: branches: [master] jobs: - run-code-format: + format: name: Code Format runs-on: ubuntu-latest @@ -25,4 +25,4 @@ jobs: run: npm ci - name: Code Format - run: npm run format:check \ No newline at end of file + run: npm run format:check:all \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4ad4d3b..8d57ebe 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,7 +7,7 @@ on: branches: [master] jobs: - run-eslint: + lint: name: Lint runs-on: ubuntu-latest @@ -25,4 +25,4 @@ jobs: run: npm ci - name: Code Linting Check - run: npm run lint:check \ No newline at end of file + run: npm run lint:check:all diff --git a/.husky/pre-commit b/.husky/pre-commit index e375fe8..5e089b8 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -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 diff --git a/package.json b/package.json index 488bd96..349216a 100644 --- a/package.json +++ b/package.json @@ -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",