@storm-software/eslint 0.170.34 → 0.170.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/preset.cjs +17 -8
- package/dist/preset.js +17 -8
- package/package.json +4 -4
package/dist/preset.cjs
CHANGED
|
@@ -2781,22 +2781,31 @@ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.
|
|
|
2781
2781
|
};
|
|
2782
2782
|
var writeWarning = (message, config3) => getLogFn(LogLevel.WARN, config3)(message);
|
|
2783
2783
|
var writeTrace = (message, config3) => getLogFn(LogLevel.TRACE, config3)(message);
|
|
2784
|
-
var MAX_DEPTH =
|
|
2784
|
+
var MAX_DEPTH = 10;
|
|
2785
2785
|
var formatLogMessage = (message, options = {}, depth3 = 0) => {
|
|
2786
2786
|
if (depth3 > MAX_DEPTH) {
|
|
2787
2787
|
return "<max depth>";
|
|
2788
2788
|
}
|
|
2789
|
-
const prefix = options.prefix ?? "
|
|
2789
|
+
const prefix = options.prefix ?? "";
|
|
2790
2790
|
const skip = options.skip ?? [];
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
${
|
|
2794
|
-
(
|
|
2791
|
+
const sort = options.sort ?? true;
|
|
2792
|
+
return typeof message === "undefined" || message === null ? "<empty>" : typeof message === "string" ? !message ? "<empty string>" : message : Array.isArray(message) ? `
|
|
2793
|
+
${message.map(
|
|
2794
|
+
(item, index) => ` ${prefix}> #${index} = ${formatLogMessage(
|
|
2795
|
+
item,
|
|
2796
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
2797
|
+
depth3 + 1
|
|
2798
|
+
)}`
|
|
2799
|
+
).join("\n")}` : typeof message === "object" ? `
|
|
2800
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).sort(sort ? (a, b) => a.localeCompare(b) : void 0).map(
|
|
2801
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? Object.keys(message[key]).filter(
|
|
2802
|
+
(key2) => !skip.includes(key2)
|
|
2803
|
+
).length === 0 ? "{}" : formatLogMessage(
|
|
2795
2804
|
message[key],
|
|
2796
|
-
{ prefix: `${prefix}
|
|
2805
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
2797
2806
|
depth3 + 1
|
|
2798
2807
|
) : message[key]}`
|
|
2799
|
-
).join("\n")}` : message;
|
|
2808
|
+
).join("\n")}` : String(message);
|
|
2800
2809
|
};
|
|
2801
2810
|
var _isFunction = (value) => {
|
|
2802
2811
|
try {
|
package/dist/preset.js
CHANGED
|
@@ -2205,22 +2205,31 @@ ${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.
|
|
|
2205
2205
|
};
|
|
2206
2206
|
var writeWarning = (message, config3) => getLogFn(LogLevel.WARN, config3)(message);
|
|
2207
2207
|
var writeTrace = (message, config3) => getLogFn(LogLevel.TRACE, config3)(message);
|
|
2208
|
-
var MAX_DEPTH =
|
|
2208
|
+
var MAX_DEPTH = 10;
|
|
2209
2209
|
var formatLogMessage = (message, options = {}, depth2 = 0) => {
|
|
2210
2210
|
if (depth2 > MAX_DEPTH) {
|
|
2211
2211
|
return "<max depth>";
|
|
2212
2212
|
}
|
|
2213
|
-
const prefix = options.prefix ?? "
|
|
2213
|
+
const prefix = options.prefix ?? "";
|
|
2214
2214
|
const skip = options.skip ?? [];
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
${
|
|
2218
|
-
(
|
|
2215
|
+
const sort = options.sort ?? true;
|
|
2216
|
+
return typeof message === "undefined" || message === null ? "<empty>" : typeof message === "string" ? !message ? "<empty string>" : message : Array.isArray(message) ? `
|
|
2217
|
+
${message.map(
|
|
2218
|
+
(item, index) => ` ${prefix}> #${index} = ${formatLogMessage(
|
|
2219
|
+
item,
|
|
2220
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
2221
|
+
depth2 + 1
|
|
2222
|
+
)}`
|
|
2223
|
+
).join("\n")}` : typeof message === "object" ? `
|
|
2224
|
+
${Object.keys(message).filter((key) => !skip.includes(key)).sort(sort ? (a, b) => a.localeCompare(b) : void 0).map(
|
|
2225
|
+
(key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? Object.keys(message[key]).filter(
|
|
2226
|
+
(key2) => !skip.includes(key2)
|
|
2227
|
+
).length === 0 ? "{}" : formatLogMessage(
|
|
2219
2228
|
message[key],
|
|
2220
|
-
{ prefix: `${prefix}
|
|
2229
|
+
{ prefix: `${prefix}--`, skip, sort },
|
|
2221
2230
|
depth2 + 1
|
|
2222
2231
|
) : message[key]}`
|
|
2223
|
-
).join("\n")}` : message;
|
|
2232
|
+
).join("\n")}` : String(message);
|
|
2224
2233
|
};
|
|
2225
2234
|
var _isFunction = (value) => {
|
|
2226
2235
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/eslint",
|
|
3
|
-
"version": "0.170.
|
|
3
|
+
"version": "0.170.36",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A package containing the base ESLint configuration used by Storm Software across many projects.",
|
|
6
6
|
"keywords": [
|
|
@@ -141,8 +141,8 @@
|
|
|
141
141
|
"@eslint/eslintrc": "^3.3.5",
|
|
142
142
|
"@eslint/markdown": "^6.6.0",
|
|
143
143
|
"@nx/eslint-plugin": "22.7.1",
|
|
144
|
-
"@storm-software/config": "1.137.
|
|
145
|
-
"@storm-software/config-tools": "1.190.
|
|
144
|
+
"@storm-software/config": "1.137.47",
|
|
145
|
+
"@storm-software/config-tools": "1.190.15",
|
|
146
146
|
"@stylistic/eslint-plugin": "^4.4.1",
|
|
147
147
|
"@typescript-eslint/eslint-plugin": "^8.59.3",
|
|
148
148
|
"@typescript-eslint/parser": "^8.59.3",
|
|
@@ -239,5 +239,5 @@
|
|
|
239
239
|
"prettier-plugin-astro": "^0.14.0"
|
|
240
240
|
},
|
|
241
241
|
"publishConfig": { "access": "public" },
|
|
242
|
-
"gitHead": "
|
|
242
|
+
"gitHead": "756f2efc9602033fcc0355d7943682581488379b"
|
|
243
243
|
}
|