File tree Expand file tree Collapse file tree 4 files changed +27
-26
lines changed Expand file tree Collapse file tree 4 files changed +27
-26
lines changed Original file line number Diff line number Diff line change
1
+ import type { Root , Heading , Paragraph } from 'mdast'
1
2
import { expectType , expectError } from 'tsd'
2
- import { Node } from 'unist'
3
- import { Root , Heading , Paragraph } from 'mdast'
3
+ import type { Node } from 'unist'
4
4
import { filter } from './index.js'
5
5
6
6
const root : Root = { type : 'root' , children : [ ] }
Original file line number Diff line number Diff line change 1
- /* eslint-disable @typescript-eslint/ban-types */
2
-
3
1
import type { Node , Parent } from 'unist'
4
2
5
3
type MatchesOne < Value , Check > =
@@ -35,5 +33,3 @@ export type Matches<Value, Check> =
35
33
Check extends any [ ]
36
34
? MatchesOne < Value , Check [ keyof Check ] >
37
35
: MatchesOne < Value , Check >
38
-
39
- /* eslint-enable @typescript-eslint/ban-types */
Original file line number Diff line number Diff line change 56
56
"build" : " tsc --build --clean && tsc --build && tsd && type-coverage" ,
57
57
"format" : " remark . -qfo && prettier . -w --loglevel warn && xo --fix" ,
58
58
"test-api" : " node --conditions development test.js" ,
59
- "test-coverage" : " c8 --check-coverage -- 100 --reporter lcov npm run test-api" ,
59
+ "test-coverage" : " c8 --100 --reporter lcov npm run test-api" ,
60
60
"test" : " npm run build && npm run format && npm run test-coverage"
61
61
},
62
62
"prettier" : {
63
- "tabWidth" : 2 ,
64
- "useTabs" : false ,
65
- "singleQuote" : true ,
66
63
"bracketSpacing" : false ,
67
64
"semi" : false ,
68
- "trailingComma" : " none"
69
- },
70
- "xo" : {
71
- "prettier" : true ,
72
- "ignore" : [
73
- " index.test-d.ts"
74
- ]
65
+ "singleQuote" : true ,
66
+ "tabWidth" : 2 ,
67
+ "trailingComma" : " none" ,
68
+ "useTabs" : false
75
69
},
76
70
"remarkConfig" : {
77
71
"plugins" : [
78
- " preset-wooorm"
72
+ " remark- preset-wooorm"
79
73
]
80
74
},
81
75
"typeCoverage" : {
82
76
"atLeast" : 100 ,
83
77
"detail" : true ,
84
- "strict" : true ,
85
78
"ignoreCatch" : true ,
86
79
"#" : " needed `any`s" ,
87
80
"ignoreFiles" : [
88
81
" lib/complex-types.d.ts"
89
- ]
82
+ ],
83
+ "strict" : true
84
+ },
85
+ "xo" : {
86
+ "overrides" : [
87
+ {
88
+ "files" : [
89
+ " **/*.ts"
90
+ ],
91
+ "rules" : {
92
+ "@typescript-eslint/ban-types" : " off"
93
+ }
94
+ }
95
+ ],
96
+ "prettier" : true
90
97
}
91
98
}
Original file line number Diff line number Diff line change 1
1
{
2
- "include" : [" **/*.js" , " lib/complex-types.d.ts" ],
3
- "exclude" : [" coverage/" , " node_modules/" ],
4
2
"compilerOptions" : {
5
3
"checkJs" : true ,
4
+ "customConditions" : [" development" ],
6
5
"declaration" : true ,
7
6
"emitDeclarationOnly" : true ,
8
7
"exactOptionalPropertyTypes" : true ,
9
- "forceConsistentCasingInFileNames" : true ,
10
8
"lib" : [" es2020" ],
11
9
"module" : " node16" ,
12
- "newLine" : " lf" ,
13
- "skipLibCheck" : true ,
14
10
"strict" : true ,
15
11
"target" : " es2020"
16
- }
12
+ },
13
+ "exclude" : [" coverage/" , " node_modules/" ],
14
+ "include" : [" **/*.js" , " lib/complex-types.d.ts" ]
17
15
}
You can’t perform that action at this time.
0 commit comments