Skip to content

Commit 720c43d

Browse files
authored
refactor: update TypeScript to v6 (#224)
* refactor: update TypeScript to v6 * wip * wip
1 parent 5c36f70 commit 720c43d

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
},
7575
"devDependencies": {
7676
"@arethetypeswrong/cli": "^0.18.2",
77+
"@types/natural-compare": "^1.4.3",
7778
"@types/node": "^20.19.0",
7879
"c8": "^11.0.0",
7980
"dedent": "^1.5.3",
@@ -86,7 +87,7 @@
8687
"mdast-util-from-markdown": "^2.0.2",
8788
"mocha": "^11.3.0",
8889
"prettier": "3.8.1",
89-
"typescript": "^5.9.3",
90+
"typescript": "^6.0.2",
9091
"yorkie": "^2.0.0"
9192
},
9293
"engines": {

src/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ const plugin = {
3636
},
3737
};
3838

39-
// eslint-disable-next-line no-lone-blocks -- The block syntax { ... } ensures that TypeScript does not get confused about the type of `plugin`.
40-
{
41-
plugin.configs.recommended.plugins.json = plugin;
42-
}
39+
Object.assign(plugin.configs.recommended.plugins, { json: plugin });
4340

4441
export default plugin;
4542
export { JSONSourceCode };

tests/types/tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"noEmit": true,
55
"rootDir": "../..",
66
"strict": true,
7+
"strictNullChecks": true,
8+
"useUnknownInCatchVariables": true,
79
"exactOptionalPropertyTypes": true,
810
"verbatimModuleSyntax": true,
911
"erasableSyntaxOnly": true

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"target": "ESNext",
99
"moduleResolution": "NodeNext",
1010
"module": "NodeNext",
11+
"rootDir": "./src",
12+
"strictNullChecks": false,
13+
"useUnknownInCatchVariables": false,
1114
"types": []
1215
}
1316
}

0 commit comments

Comments
 (0)