Skip to content

Commit 17fa207

Browse files
committed
Update tsconfig.json
1 parent 6cf5dfe commit 17fa207

File tree

4 files changed

+24
-23
lines changed

4 files changed

+24
-23
lines changed

Diff for: complex-types.d.ts

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
import type {Literal} from 'mdast'
22

3+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
4+
export interface Math extends Literal {
5+
type: 'math'
6+
meta?: string | null
7+
}
8+
9+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
10+
export interface InlineMath extends Literal {
11+
type: 'inlineMath'
12+
}
313
declare module 'mdast-util-from-markdown' {
414
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
515
interface CompileData {
@@ -41,17 +51,6 @@ declare module 'mdast-util-to-markdown' {
4151
}
4252
}
4353

44-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
45-
export interface Math extends Literal {
46-
type: 'math'
47-
meta?: string | null
48-
}
49-
50-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
51-
export interface InlineMath extends Literal {
52-
type: 'inlineMath'
53-
}
54-
5554
declare module 'mdast' {
5655
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
5756
interface StaticPhrasingContentMap {

Diff for: index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle
55
* @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension
66
* @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle
7-
* @typedef {import('./complex-types').Math} Math
8-
* @typedef {import('./complex-types').InlineMath} InlineMath
7+
* @typedef {import('./complex-types.js').Math} Math
8+
* @typedef {import('./complex-types.js').InlineMath} InlineMath
99
*
1010
* @typedef ToOptions
1111
* @property {boolean} [singleDollarTextMath=true]

Diff for: package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@
5555
"xo": "^0.53.0"
5656
},
5757
"scripts": {
58-
"build": "rimraf \"{index,test}.d.ts\" && tsc && type-coverage",
58+
"prepack": "npm run build && npm run format",
59+
"build": "tsc --build --clean && tsc --build && type-coverage",
5960
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
6061
"test-api": "node --conditions development test.js",
61-
"test-coverage": "c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node --conditions development test.js",
62+
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
6263
"test": "npm run build && npm run format && npm run test-coverage"
6364
},
6465
"prettier": {

Diff for: tsconfig.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2-
"include": ["*.js"],
2+
"include": ["**/*.js", "complex-types.d.ts"],
3+
"exclude": ["coverage/", "node_modules/"],
34
"compilerOptions": {
4-
"target": "ES2020",
5-
"lib": ["ES2020"],
6-
"module": "ES2020",
7-
"moduleResolution": "node",
8-
"allowJs": true,
95
"checkJs": true,
106
"declaration": true,
117
"emitDeclarationOnly": true,
12-
"allowSyntheticDefaultImports": true,
8+
"exactOptionalPropertyTypes": true,
9+
"forceConsistentCasingInFileNames": true,
10+
"lib": ["es2020"],
11+
"module": "node16",
12+
"newLine": "lf",
1313
"skipLibCheck": true,
14-
"strict": true
14+
"strict": true,
15+
"target": "es2020"
1516
}
1617
}

0 commit comments

Comments
 (0)