@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.
- package/dist/{astro-_OthZH0C.mjs → astro-BnZ2LIR3.mjs} +16 -1
- package/dist/index.d.mts +887 -531
- package/dist/index.mjs +46 -29
- package/dist/{jest-BxCbmb4w.mjs → jest-Dm9_cuf3.mjs} +3 -0
- package/dist/{nextjs-Bp3ln3PT.mjs → nextjs-_AmGd366.mjs} +1 -1
- package/dist/{react-aPiplRN9.mjs → react-6Ule3BqW.mjs} +1 -1
- package/dist/{storybook-CgfIOzEK.mjs → storybook-BfbeHUhi.mjs} +1 -1
- package/package.json +17 -17
- package/dist/upwarn-BWFMaOyK.mjs +0 -16
- /package/dist/{playwright-CB73AGjW.mjs → playwright-ChDf6HhZ.mjs} +0 -0
- /package/dist/{tanstack-query-Dp8U2t8w.mjs → tanstack-query-BVXIAVcv.mjs} +0 -0
- /package/dist/{testing-library-CQkPs8CJ.mjs → testing-library-BFsBlKXl.mjs} +0 -0
- /package/dist/{typescript-iybUcKhp.mjs → typescript-CNtyo5Lg.mjs} +0 -0
- /package/dist/{vitest-DyQ5YML1.mjs → vitest-BiF4sMhO.mjs} +0 -0
|
@@ -67,4 +67,19 @@ async function astroConfig(options) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
//#endregion
|
|
70
|
-
|
|
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 };
|