Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": {
Expand Down
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ const plugin = {
configs: {
recommended: {
name: "@eslint/json/recommended",
plugins: {},
// eslint-disable-next-line jsdoc/ts-no-empty-object-type -- The `@type {{}}` syntax ensures that TypeScript does not get confused about the type of `plugin`.
plugins: /** @type {{}} */ ({
get json() {
return plugin;
},
}),
rules: recommendedRules,
},
},
};

// 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;
}

export default plugin;
export { JSONSourceCode };
export * from "./languages/json-language.js";
Expand Down
2 changes: 2 additions & 0 deletions tests/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"noEmit": true,
"rootDir": "../..",
"strict": true,
"strictNullChecks": true,
"useUnknownInCatchVariables": true,
"exactOptionalPropertyTypes": true,
"verbatimModuleSyntax": true,
"erasableSyntaxOnly": true
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"target": "ESNext",
"moduleResolution": "NodeNext",
"module": "NodeNext",
"rootDir": "./src",
"strictNullChecks": false,
"useUnknownInCatchVariables": false,
"types": []
}
}
Loading