@jimmy.codes/eslint-config 6.25.0 → 6.27.0

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.
@@ -67,4 +67,19 @@ async function astroConfig(options) {
67
67
  }
68
68
 
69
69
  //#endregion
70
- export { astroConfig as default };
70
+ //#region src/utils/upwarn.ts
71
+ /**
72
+ * Converts all ESLint rules set to `"warn"` into `"error"`.
73
+ *
74
+ * @param rules - A partial set of ESLint rules.
75
+ *
76
+ * @returns A new rules object with all `"warn"` values changed to `"error"`.
77
+ */
78
+ const upwarn = (rules = {}) => {
79
+ return Object.fromEntries(Object.entries(rules).map(([rule, option]) => {
80
+ return [rule, option === "warn" ? "error" : option];
81
+ }));
82
+ };
83
+
84
+ //#endregion
85
+ export { astroConfig as default, upwarn as t };