diff --git a/package.json b/package.json index 93dcbde..a861761 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ }, "devDependencies": { "@arethetypeswrong/cli": "^0.18.2", + "@types/natural-compare": "^1.4.3", "@types/node": "^20.19.0", "c8": "^11.0.0", "dedent": "^1.5.3", @@ -86,7 +87,7 @@ "mdast-util-from-markdown": "^2.0.2", "mocha": "^11.3.0", "prettier": "3.8.1", - "typescript": "^5.9.3", + "typescript": "^6.0.2", "yorkie": "^2.0.0" }, "engines": { diff --git a/src/index.js b/src/index.js index 5599533..c9b7310 100644 --- a/src/index.js +++ b/src/index.js @@ -36,10 +36,7 @@ const plugin = { }, }; -// eslint-disable-next-line no-lone-blocks -- The block syntax { ... } ensures that TypeScript does not get confused about the type of `plugin`. -{ - plugin.configs.recommended.plugins.json = plugin; -} +Object.assign(plugin.configs.recommended.plugins, { json: plugin }); export default plugin; export { JSONSourceCode }; diff --git a/tests/types/tsconfig.json b/tests/types/tsconfig.json index 373f9d7..14eb608 100644 --- a/tests/types/tsconfig.json +++ b/tests/types/tsconfig.json @@ -4,6 +4,8 @@ "noEmit": true, "rootDir": "../..", "strict": true, + "strictNullChecks": true, + "useUnknownInCatchVariables": true, "exactOptionalPropertyTypes": true, "verbatimModuleSyntax": true, "erasableSyntaxOnly": true diff --git a/tsconfig.json b/tsconfig.json index d52d3f9..24ed175 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,9 @@ "target": "ESNext", "moduleResolution": "NodeNext", "module": "NodeNext", + "rootDir": "./src", + "strictNullChecks": false, + "useUnknownInCatchVariables": false, "types": [] } }