Skip to content

Commit 3c2a18f

Browse files
authored
chore: fix jest config, eslint config (#679)
* chore: move cli options to jest config * use npm * use node v16 * move ignored lint files to .eslintignore * fix engine
1 parent 3f19873 commit 3c2a18f

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

.eslintignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
example/*.ts
2-
bin
2+
bin
3+
4+
dist
5+
examples
6+
tests

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
15
1+
16

jest.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
module.exports = {
2-
preset: "ts-jest",
3-
testEnvironment: "node",
42
globals: {
53
"ts-jest": {
64
tsconfig: "tsconfig.jest.json",
75
},
86
},
7+
preset: "ts-jest",
8+
testTimeout: 10000,
9+
verbose: true,
910
};

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Generate TypeScript types from Swagger OpenAPI specs",
44
"version": "4.0.1",
55
"engines": {
6-
"node": ">= 10.0.0"
6+
"node": ">= 12.0.0"
77
},
88
"author": "[email protected]",
99
"license": "ISC",
@@ -44,12 +44,12 @@
4444
"homepage": "https://github.com/drwpow/openapi-typescript#readme",
4545
"scripts": {
4646
"build": "rm -rf dist && tsc --build tsconfig.json && tsc --build tsconfig.cjs.json",
47-
"format": "yarn prettier -w .",
48-
"lint": "eslint --ignore-path .gitignore --ext .js,.ts src",
47+
"format": "npm run prettier -w .",
48+
"lint": "eslint .",
4949
"prepare": "npm run build",
5050
"pregenerate": "npm run build",
51-
"test": "npm run build && jest --no-cache --test-timeout=10000",
52-
"test:coverage": "npm run build && jest --no-cache --test-timeout=10000 --coverage && codecov",
51+
"test": "npm run build && jest --no-cache",
52+
"test:coverage": "npm run build && jest --no-cache --coverage && codecov",
5353
"typecheck": "tsc --noEmit",
5454
"version": "npm run build"
5555
},

0 commit comments

Comments
 (0)