Skip to content

Commit 7547092

Browse files
committed
Refactor package.json, tsconfig.json
1 parent a541a47 commit 7547092

File tree

2 files changed

+28
-29
lines changed

2 files changed

+28
-29
lines changed

package.json

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -63,34 +63,16 @@
6363
"build": "tsc --build --clean && tsc --build && type-coverage",
6464
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
6565
"test-api": "node --conditions development test/index.js",
66-
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
66+
"test-coverage": "c8 --100 --reporter lcov npm run test-api",
6767
"test": "npm run build && npm run format && npm run test-coverage"
6868
},
6969
"prettier": {
70-
"tabWidth": 2,
71-
"useTabs": false,
72-
"singleQuote": true,
7370
"bracketSpacing": false,
7471
"semi": false,
75-
"trailingComma": "none"
76-
},
77-
"xo": {
78-
"prettier": true,
79-
"overrides": [
80-
{
81-
"files": "test/**/*.js",
82-
"rules": {
83-
"no-await-in-loop": "off"
84-
}
85-
},
86-
{
87-
"files": "example.js",
88-
"rules": {
89-
"capitalized-comments": "off",
90-
"import/order": "off"
91-
}
92-
}
93-
]
72+
"singleQuote": true,
73+
"tabWidth": 2,
74+
"trailingComma": "none",
75+
"useTabs": false
9476
},
9577
"remarkConfig": {
9678
"plugins": [
@@ -106,6 +88,25 @@
10688
"typeCoverage": {
10789
"atLeast": 100,
10890
"detail": true,
91+
"ignoreCatch": true,
10992
"strict": true
93+
},
94+
"xo": {
95+
"overrides": [
96+
{
97+
"files": "test/**/*.js",
98+
"rules": {
99+
"no-await-in-loop": "off"
100+
}
101+
},
102+
{
103+
"files": "example.js",
104+
"rules": {
105+
"capitalized-comments": "off",
106+
"import/order": "off"
107+
}
108+
}
109+
],
110+
"prettier": true
110111
}
111112
}

tsconfig.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
{
2-
"include": ["**/*.js"],
3-
"exclude": ["coverage/", "node_modules/"],
42
"compilerOptions": {
53
"checkJs": true,
4+
"customConditions": ["development"],
65
"declaration": true,
76
"emitDeclarationOnly": true,
87
"exactOptionalPropertyTypes": true,
9-
"forceConsistentCasingInFileNames": true,
108
"lib": ["es2020"],
119
"module": "node16",
12-
"newLine": "lf",
13-
"skipLibCheck": true,
1410
"strict": true,
1511
"target": "es2020"
16-
}
12+
},
13+
"exclude": ["coverage/", "node_modules/"],
14+
"include": ["**/*.js"]
1715
}

0 commit comments

Comments
 (0)