Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 7 additions & 2 deletions configs/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,13 @@ async function getTypescriptJSDocRecommendedConfig() {
// No need
// "jsdoc/text-escaping": "error",

// TODO enable after https://github.com/gajus/eslint-plugin-jsdoc/issues/1615
// "jsdoc/type-formatting": "error",
"jsdoc/type-formatting": [
"error",
{
objectTypeBracketSpacing: " ",
objectFieldSeparator: "comma-and-linebreak",
},
],

// Doesn't support function overloading/tuples/`readonly`/module keyword/etc
// Also `typescript` reports this itself
Expand Down
8 changes: 4 additions & 4 deletions configs/utils/get-json-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Cache {
/**
* Get the cached value of the given key.
* @param {string} key The key to get.
* @returns {import('type-fest').JsonObject} The cached value or null.
* @returns {import("type-fest").JsonObject} The cached value or null.
*/
get(key) {
const entry = this.map.get(key);
Expand All @@ -33,7 +33,7 @@ class Cache {
/**
* Set the value of the given key.
* @param {string} key The key to set.
* @param {import('type-fest').JsonObject} value The value to set.
* @param {import("type-fest").JsonObject} value The value to set.
* @returns {void}
*/
set(key, value) {
Expand All @@ -57,7 +57,7 @@ const cache = new Cache();
* Don't cache the data.
* @param {string} dir The path to a directory to read.
* @param {string} filename The filename.
* @returns {import('type-fest').JsonObject|null} The read `package.json` data, or null.
* @returns {import("type-fest").JsonObject | null} The read `package.json` data, or null.
*/
function readJsonFile(dir, filename) {
const filePath = path.join(dir, filename);
Expand Down Expand Up @@ -86,7 +86,7 @@ function readJsonFile(dir, filename) {
* The data is cached if found, then it's used after.
* @param {string} filename The filename.
* @param {string=} startPath A file path to lookup.
* @returns {import('type-fest').JsonObject | null} A found `package.json` data or `null`.
* @returns {import("type-fest").JsonObject | null} A found `package.json` data or `null`.
* This object have additional property `filePath`.
*/
function getJsonFile(filename, startPath = "a.js") {
Expand Down
Loading