Skip to content

Commit 644f534

Browse files
committed
Add strict to tsconfig.json
1 parent 8991e31 commit 644f534

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ export function headingStyle(node, relative) {
2929
return 'atx-closed'
3030
}
3131

32-
if (final.line + 1 === pos.line) {
32+
if (final && final.line + 1 === pos.line) {
3333
return 'setext'
3434
}
3535

36-
if (final.column + depth < pos.column) {
36+
if (final && final.column + depth < pos.column) {
3737
return 'atx-closed'
3838
}
3939

@@ -44,7 +44,7 @@ export function headingStyle(node, relative) {
4444
* Get the probable style of an atx-heading, depending on preferred style.
4545
*
4646
* @param {number} depth
47-
* @param {Style} relative
47+
* @param {Style|undefined} relative
4848
* @returns {Style|null}
4949
*/
5050
function consolidate(depth, relative) {

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"declaration": true,
1111
"emitDeclarationOnly": true,
1212
"allowSyntheticDefaultImports": true,
13-
"skipLibCheck": true
13+
"skipLibCheck": true,
14+
"strict": true
1415
}
1516
}

0 commit comments

Comments
 (0)