Skip to content

Commit 1e1e358

Browse files
fix: move output formatting to generators
1 parent 0b1992f commit 1e1e358

6 files changed

Lines changed: 23 additions & 16 deletions

File tree

.github/workflows/format.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [main]
88

99
jobs:
10-
run-eslint:
10+
format:
1111
name: Format
1212
runs-on: ubuntu-latest
1313

@@ -25,4 +25,4 @@ jobs:
2525
run: npm ci
2626

2727
- name: Code Format Check
28-
run: npm run format:check
28+
run: npm run format:check:all

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [main]
88

99
jobs:
10-
run-eslint:
10+
lint:
1111
name: Lint
1212
runs-on: ubuntu-latest
1313

@@ -25,4 +25,4 @@ jobs:
2525
run: npm ci
2626

2727
- name: Code Linting Check
28-
run: npm run lint:check
28+
run: npm run lint:check:all

.husky/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
. "$(dirname -- "$0")/_/husky.sh"
33

44
echo 'Pre-commit checks'
5-
npm run format:check
6-
npm run lint:check
5+
npm run format:check:all
6+
npm run lint:check:all

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ npm test {featurePath} {generatorPath}
4949
Two scripts are available to help you find linting errors:
5050

5151
```
52-
npm run eslint:check
52+
npm run eslint:check:all
5353
```
5454

5555
This runs eslint in check mode which will raise errors found but not try and fix them. This is also ran on a PR and a push to main. It will fail if any errors were found.
5656

5757
```
58-
npm run eslint:write
58+
npm run eslint:write:all
5959
```
6060

6161
This runs eslint in write mode which will raise errors found and try to fix them.

package-lock.json

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
"prepare": "husky install",
77
"test": "\"./node_modules/.bin/cucumber-js\" -p default",
88
"test:defaultPath": "\"./node_modules/.bin/cucumber-js\" -p default \"node_modules/openapi-forge/features/*.feature\" \"openapi-forge/src/generate\"",
9-
"format:check": "prettier --check .",
10-
"format:write": "prettier --write .",
11-
"lint:check": "eslint .",
12-
"lint:write": "eslint --fix ."
9+
"format:check:all": "prettier --check .",
10+
"format:write:all": "prettier --write .",
11+
"format:write": "prettier --write",
12+
"lint:check:all": "eslint .",
13+
"lint:write:all": "eslint --fix ."
1314
},
1415
"license": "MIT",
1516
"devDependencies": {
@@ -29,11 +30,13 @@
2930
"eslint": "^8.24.0",
3031
"husky": "^8.0.1",
3132
"openapi-forge": "github:ColinEberhardt/openapi-forge#1cd7b107fca832e286c40f9e8ec1e483e368b624",
32-
"prettier": "^2.7.1",
3333
"semantic-release": "^19.0.5",
3434
"ts-node": "^8.0.3",
3535
"typescript": "^4.7.4"
3636
},
37+
"dependencies": {
38+
"prettier": "^2.7.1"
39+
},
3740
"engines": {
3841
"node": ">=16.0.0"
3942
}

0 commit comments

Comments
 (0)