js-style-kit 0.2.5 → 0.2.6

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.
Files changed (62) hide show
  1. package/dist/{chunk-5CDPACBF.js → chunk-5HWRM6F6.js} +3 -3
  2. package/dist/{chunk-TIF7G5QI.js → chunk-5XUVB2ZB.js} +4 -2
  3. package/dist/{chunk-TIF7G5QI.js.map → chunk-5XUVB2ZB.js.map} +1 -1
  4. package/dist/{chunk-DXJEC5GK.js → chunk-7WAIXW4V.js} +2 -2
  5. package/dist/{chunk-DXH4IKTS.js → chunk-HWZVK7LV.js} +2 -2
  6. package/dist/{chunk-D2NUXSOP.js → chunk-LUPJ4SWW.js} +3 -3
  7. package/dist/{chunk-D2NUXSOP.js.map → chunk-LUPJ4SWW.js.map} +1 -1
  8. package/dist/{chunk-HUTRDRS3.js → chunk-MB4477NP.js} +5 -1
  9. package/dist/chunk-MB4477NP.js.map +1 -0
  10. package/dist/{chunk-KYBK4TYC.js → chunk-NAQPNARH.js} +2 -2
  11. package/dist/{chunk-2EO7WKUA.js → chunk-PHDHPPH2.js} +2 -1
  12. package/dist/{chunk-2EO7WKUA.js.map → chunk-PHDHPPH2.js.map} +1 -1
  13. package/dist/{chunk-L4LQOBUL.js → chunk-PIU5PRNJ.js} +2 -2
  14. package/dist/{chunk-S3BOQC2P.js → chunk-QZHQTJ56.js} +13 -13
  15. package/dist/{chunk-ZOCL6XIB.js → chunk-XICOWKSV.js} +1 -7
  16. package/dist/chunk-XICOWKSV.js.map +1 -0
  17. package/dist/{chunk-NM7R77WJ.js → chunk-YG7GTCRE.js} +2 -2
  18. package/dist/{chunk-3PBWLBKQ.js → chunk-YGS6KBZK.js} +6 -5
  19. package/dist/chunk-YGS6KBZK.js.map +1 -0
  20. package/dist/{chunk-2ASX5K3P.js → chunk-YR7FD722.js} +2 -2
  21. package/dist/{scripts/postinstall.js → chunk-ZED5DLW7.js} +31 -25
  22. package/dist/chunk-ZED5DLW7.js.map +1 -0
  23. package/dist/{chunk-Z6KYKZMZ.js → chunk-ZKVGTPGV.js} +2 -2
  24. package/dist/{chunk-NUREJELC.js → chunk-ZTAPCYRD.js} +2 -2
  25. package/dist/eslint/base/config.js +3 -3
  26. package/dist/eslint/base/rules.js +1 -1
  27. package/dist/eslint/constants.d.ts +1 -0
  28. package/dist/eslint/constants.js +1 -1
  29. package/dist/eslint/ignores.js +2 -2
  30. package/dist/eslint/index.js +16 -16
  31. package/dist/eslint/jsdoc/config.js +2 -2
  32. package/dist/eslint/perfectionist/config.js +2 -2
  33. package/dist/eslint/prefer-arrow-function/config.js +2 -2
  34. package/dist/eslint/react/config.js +2 -2
  35. package/dist/eslint/react-compiler/config.js +2 -2
  36. package/dist/eslint/storybook/config.js +2 -2
  37. package/dist/eslint/testing/config.js +3 -3
  38. package/dist/eslint/turbo/config.js +2 -2
  39. package/dist/eslint/typescript/config.js +2 -2
  40. package/dist/eslint/unicorn/config.js +2 -2
  41. package/dist/index.js +18 -17
  42. package/dist/prettier/index.js +2 -1
  43. package/dist/prettier/patch-tailwind-plugin.d.ts +9 -0
  44. package/dist/prettier/patch-tailwind-plugin.js +7 -0
  45. package/dist/prettier/patch-tailwind-plugin.js.map +1 -0
  46. package/package.json +1 -1
  47. package/dist/chunk-3PBWLBKQ.js.map +0 -1
  48. package/dist/chunk-HUTRDRS3.js.map +0 -1
  49. package/dist/chunk-ZOCL6XIB.js.map +0 -1
  50. package/dist/scripts/postinstall.cjs +0 -91
  51. package/dist/scripts/postinstall.cjs.map +0 -1
  52. package/dist/scripts/postinstall.js.map +0 -1
  53. /package/dist/{chunk-5CDPACBF.js.map → chunk-5HWRM6F6.js.map} +0 -0
  54. /package/dist/{chunk-DXJEC5GK.js.map → chunk-7WAIXW4V.js.map} +0 -0
  55. /package/dist/{chunk-DXH4IKTS.js.map → chunk-HWZVK7LV.js.map} +0 -0
  56. /package/dist/{chunk-KYBK4TYC.js.map → chunk-NAQPNARH.js.map} +0 -0
  57. /package/dist/{chunk-L4LQOBUL.js.map → chunk-PIU5PRNJ.js.map} +0 -0
  58. /package/dist/{chunk-S3BOQC2P.js.map → chunk-QZHQTJ56.js.map} +0 -0
  59. /package/dist/{chunk-NM7R77WJ.js.map → chunk-YG7GTCRE.js.map} +0 -0
  60. /package/dist/{chunk-2ASX5K3P.js.map → chunk-YR7FD722.js.map} +0 -0
  61. /package/dist/{chunk-Z6KYKZMZ.js.map → chunk-ZKVGTPGV.js.map} +0 -0
  62. /package/dist/{chunk-NUREJELC.js.map → chunk-ZTAPCYRD.js.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  baseEslintRules
3
- } from "./chunk-ZOCL6XIB.js";
3
+ } from "./chunk-XICOWKSV.js";
4
4
  import {
5
5
  configNames
6
- } from "./chunk-2EO7WKUA.js";
6
+ } from "./chunk-PHDHPPH2.js";
7
7
 
8
8
  // src/eslint/base/config.ts
9
9
  var baseEslintConfig = (functionStyle) => ({
@@ -18,4 +18,4 @@ var baseEslintConfig = (functionStyle) => ({
18
18
  export {
19
19
  baseEslintConfig
20
20
  };
21
- //# sourceMappingURL=chunk-5CDPACBF.js.map
21
+ //# sourceMappingURL=chunk-5HWRM6F6.js.map
@@ -3,11 +3,13 @@ import {
3
3
  } from "./chunk-XCPOAYGQ.js";
4
4
  import {
5
5
  configNames
6
- } from "./chunk-2EO7WKUA.js";
6
+ } from "./chunk-PHDHPPH2.js";
7
7
 
8
8
  // src/eslint/jsdoc/config.ts
9
9
  import jsdoc from "eslint-plugin-jsdoc";
10
10
  var jsdocConfig = (requireJsdoc = false, typescript = true) => ({
11
+ files: ["**/*.{js,jsx,ts,tsx,cjs,mjs}"],
12
+ ignores: ["**/*.{test,spec}.{js,jsx,ts,tsx,cjs,mjs}"],
11
13
  name: configNames.jsdoc,
12
14
  plugins: {
13
15
  jsdoc
@@ -18,4 +20,4 @@ var jsdocConfig = (requireJsdoc = false, typescript = true) => ({
18
20
  export {
19
21
  jsdocConfig
20
22
  };
21
- //# sourceMappingURL=chunk-TIF7G5QI.js.map
23
+ //# sourceMappingURL=chunk-5XUVB2ZB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/eslint/jsdoc/config.ts"],"sourcesContent":["import jsdoc from \"eslint-plugin-jsdoc\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { jsdocRules } from \"./rules.js\";\n\n/**\n * Generates ESLint configuration for JSDoc comments.\n *\n * @param requireJsdoc - Whether to enforce JSDoc comments on functions and classes. Defaults to false.\n * @param typescript - Whether TypeScript is being used in the project. When true, some rules are adjusted to be more TypeScript-friendly. Defaults to true.\n * @returns An ESLint configuration object for JSDoc comments.\n */\nexport const jsdocConfig = (\n requireJsdoc = false,\n typescript = true,\n): EslintConfigObject => ({\n name: configNames.jsdoc,\n plugins: {\n jsdoc,\n },\n rules: jsdocRules(requireJsdoc, typescript),\n});\n"],"mappings":";;;;;;;;AAAA,OAAO,WAAW;AAcX,IAAM,cAAc,CACzB,eAAe,OACf,aAAa,UACW;AAAA,EACxB,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP;AAAA,EACF;AAAA,EACA,OAAO,WAAW,cAAc,UAAU;AAC5C;","names":[]}
1
+ {"version":3,"sources":["../src/eslint/jsdoc/config.ts"],"sourcesContent":["import jsdoc from \"eslint-plugin-jsdoc\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { jsdocRules } from \"./rules.js\";\n\n/**\n * Generates ESLint configuration for JSDoc comments.\n *\n * @param requireJsdoc - Whether to enforce JSDoc comments on functions and classes. Defaults to false.\n * @param typescript - Whether TypeScript is being used in the project. When true, some rules are adjusted to be more TypeScript-friendly. Defaults to true.\n * @returns An ESLint configuration object for JSDoc comments.\n */\nexport const jsdocConfig = (\n requireJsdoc = false,\n typescript = true,\n): EslintConfigObject => ({\n files: [\"**/*.{js,jsx,ts,tsx,cjs,mjs}\"],\n ignores: [\"**/*.{test,spec}.{js,jsx,ts,tsx,cjs,mjs}\"],\n name: configNames.jsdoc,\n plugins: {\n jsdoc,\n },\n rules: jsdocRules(requireJsdoc, typescript),\n});\n"],"mappings":";;;;;;;;AAAA,OAAO,WAAW;AAcX,IAAM,cAAc,CACzB,eAAe,OACf,aAAa,UACW;AAAA,EACxB,OAAO,CAAC,8BAA8B;AAAA,EACtC,SAAS,CAAC,0CAA0C;AAAA,EACpD,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP;AAAA,EACF;AAAA,EACA,OAAO,WAAW,cAAc,UAAU;AAC5C;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configNames
3
- } from "./chunk-2EO7WKUA.js";
3
+ } from "./chunk-PHDHPPH2.js";
4
4
 
5
5
  // src/eslint/ignores.ts
6
6
  var ignoresConfig = ({
@@ -22,4 +22,4 @@ var ignoresConfig = ({
22
22
  export {
23
23
  ignoresConfig
24
24
  };
25
- //# sourceMappingURL=chunk-DXJEC5GK.js.map
25
+ //# sourceMappingURL=chunk-7WAIXW4V.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-26SVGV32.js";
4
4
  import {
5
5
  configNames
6
- } from "./chunk-2EO7WKUA.js";
6
+ } from "./chunk-PHDHPPH2.js";
7
7
 
8
8
  // src/eslint/react/config.ts
9
9
  import react from "eslint-plugin-react";
@@ -38,4 +38,4 @@ var reactEslintConfig = (functionStyle, typescript) => {
38
38
  export {
39
39
  reactEslintConfig
40
40
  };
41
- //# sourceMappingURL=chunk-DXH4IKTS.js.map
41
+ //# sourceMappingURL=chunk-HWZVK7LV.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configNames
3
- } from "./chunk-2EO7WKUA.js";
3
+ } from "./chunk-PHDHPPH2.js";
4
4
 
5
5
  // src/eslint/react-compiler/config.ts
6
6
  import reactCompiler from "eslint-plugin-react-compiler";
@@ -10,11 +10,11 @@ var reactCompilerEslintConfig = {
10
10
  "react-compiler": reactCompiler
11
11
  },
12
12
  rules: {
13
- "react-compiler/react-compiler": "error"
13
+ "react-compiler/react-compiler": "warn"
14
14
  }
15
15
  };
16
16
 
17
17
  export {
18
18
  reactCompilerEslintConfig
19
19
  };
20
- //# sourceMappingURL=chunk-D2NUXSOP.js.map
20
+ //# sourceMappingURL=chunk-LUPJ4SWW.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/eslint/react-compiler/config.ts"],"sourcesContent":["import reactCompiler from \"eslint-plugin-react-compiler\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\n\n/**\n * Creates an ESLint configuration for React Compiler.\n *\n * @returns ESLint configuration object for React Compiler\n */\nexport const reactCompilerEslintConfig: EslintConfigObject = {\n name: configNames.reactCompiler,\n plugins: {\n \"react-compiler\": reactCompiler,\n },\n rules: {\n \"react-compiler/react-compiler\": \"error\",\n },\n};\n"],"mappings":";;;;;AAAA,OAAO,mBAAmB;AAWnB,IAAM,4BAAgD;AAAA,EAC3D,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP,kBAAkB;AAAA,EACpB;AAAA,EACA,OAAO;AAAA,IACL,iCAAiC;AAAA,EACnC;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/eslint/react-compiler/config.ts"],"sourcesContent":["import reactCompiler from \"eslint-plugin-react-compiler\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\n\n/**\n * Creates an ESLint configuration for React Compiler.\n *\n * @returns ESLint configuration object for React Compiler\n */\nexport const reactCompilerEslintConfig: EslintConfigObject = {\n name: configNames.reactCompiler,\n plugins: {\n \"react-compiler\": reactCompiler,\n },\n rules: {\n \"react-compiler/react-compiler\": \"warn\",\n },\n};\n"],"mappings":";;;;;AAAA,OAAO,mBAAmB;AAWnB,IAAM,4BAAgD;AAAA,EAC3D,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP,kBAAkB;AAAA,EACpB;AAAA,EACA,OAAO;AAAA,IACL,iCAAiC;AAAA,EACnC;AACF;","names":[]}
@@ -1,3 +1,6 @@
1
+ import {
2
+ patchTailwindPlugin
3
+ } from "./chunk-ZED5DLW7.js";
1
4
  import {
2
5
  isObject,
3
6
  isString
@@ -49,6 +52,7 @@ var prettierConfig = (options = {}) => {
49
52
  } else {
50
53
  config.tailwindFunctions = defaultTailwindFunctions;
51
54
  }
55
+ patchTailwindPlugin();
52
56
  }
53
57
  config.plugins = plugins;
54
58
  return config;
@@ -57,4 +61,4 @@ var prettierConfig = (options = {}) => {
57
61
  export {
58
62
  prettierConfig
59
63
  };
60
- //# sourceMappingURL=chunk-HUTRDRS3.js.map
64
+ //# sourceMappingURL=chunk-MB4477NP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/prettier/index.ts"],"sourcesContent":["import type { Config as PrettierConfig } from \"prettier\";\nimport type { SortJsonOptions as SortJsonPluginOptions } from \"prettier-plugin-sort-json\";\nimport type { PluginOptions as TailwindPluginOptions } from \"prettier-plugin-tailwindcss\";\n\nimport { isObject, isString } from \"../utils/is-type.js\";\nimport { patchTailwindPlugin } from \"./patch-tailwind-plugin.js\";\n\nexport interface PrettierConfigOptions extends PrettierConfig {\n cssOrderPlugin?: boolean;\n curlyPlugin?: boolean;\n jsonSortPlugin?: boolean | SortJsonPluginOptions;\n packageJsonPlugin?: boolean;\n tailwindPlugin?: boolean | string | TailwindPluginOptions;\n}\n\nexport interface PrettierConfigWithPlugins\n extends PrettierConfig,\n SortJsonPluginOptions,\n TailwindPluginOptions {}\n\n/**\n * Creates a Prettier configuration object with optional Tailwind support\n *\n * @param options - Configuration options for Prettier\n * @param options.cssOrderPlugin CSS order sorting support\n * @param options.curlyPlugin Enforce curly braces for all control statements\n * @param options.jsonSortPlugin JSON sorting support\n * @param options.packageJsonPlugin Package.json sorting support\n * @param options.tailwindPlugin Tailwind CSS formatting support\n * @returns Prettier configuration object with:\n * - Default Prettier configuration\n * - Experimental ternaries enabled\n * - CSS order plugin\n * - Curly braces plugin\n * - JSON sorting plugin\n * - Package.json sorting plugin\n * - Optional Tailwind plugin and functions\n */\nexport const prettierConfig = (\n options: PrettierConfigOptions = {},\n): PrettierConfigWithPlugins => {\n const {\n cssOrderPlugin = true,\n curlyPlugin = true,\n jsonSortPlugin = true,\n packageJsonPlugin = true,\n tailwindPlugin = false,\n ...rest\n } = options;\n\n const plugins: string[] = [];\n const config: PrettierConfigWithPlugins = {\n experimentalTernaries: true,\n ...rest,\n };\n\n if (cssOrderPlugin) {\n plugins.push(\"prettier-plugin-css-order\");\n }\n\n if (curlyPlugin) {\n plugins.push(\"prettier-plugin-curly\");\n }\n\n if (jsonSortPlugin) {\n plugins.push(\"prettier-plugin-sort-json\");\n\n if (isObject(jsonSortPlugin)) {\n Object.assign(config, jsonSortPlugin);\n } else {\n config.jsonRecursiveSort = true;\n }\n }\n\n if (packageJsonPlugin) {\n plugins.push(\"prettier-plugin-packagejson\");\n }\n\n if (tailwindPlugin) {\n plugins.push(\"prettier-plugin-tailwindcss\");\n const defaultTailwindFunctions = [\"clsx\", \"cva\", \"cn\"];\n\n if (isString(tailwindPlugin)) {\n // then it's the path to the stylesheet\n config.tailwindStylesheet = tailwindPlugin;\n config.tailwindFunctions = defaultTailwindFunctions;\n } else if (isObject(tailwindPlugin)) {\n Object.assign(config, tailwindPlugin);\n\n // Ensure defaultTailwindFunctions is applied if tailwindFunctions wasn't specified\n if (!tailwindPlugin.tailwindFunctions) {\n config.tailwindFunctions = defaultTailwindFunctions;\n }\n } else {\n config.tailwindFunctions = defaultTailwindFunctions;\n }\n\n // Patch the Tailwind plugin declaration file to remove unsafe declare statement\n patchTailwindPlugin();\n }\n\n // Set plugins after all configurations are done\n config.plugins = plugins;\n\n return config;\n};\n"],"mappings":";;;;;;;;;AAsCO,IAAM,iBAAiB,CAC5B,UAAiC,CAAC,MACJ;AAC9B,QAAM;AAAA,IACJ,iBAAiB;AAAA,IACjB,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,oBAAoB;AAAA,IACpB,iBAAiB;AAAA,IACjB,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,UAAoB,CAAC;AAC3B,QAAM,SAAoC;AAAA,IACxC,uBAAuB;AAAA,IACvB,GAAG;AAAA,EACL;AAEA,MAAI,gBAAgB;AAClB,YAAQ,KAAK,2BAA2B;AAAA,EAC1C;AAEA,MAAI,aAAa;AACf,YAAQ,KAAK,uBAAuB;AAAA,EACtC;AAEA,MAAI,gBAAgB;AAClB,YAAQ,KAAK,2BAA2B;AAExC,QAAI,SAAS,cAAc,GAAG;AAC5B,aAAO,OAAO,QAAQ,cAAc;AAAA,IACtC,OAAO;AACL,aAAO,oBAAoB;AAAA,IAC7B;AAAA,EACF;AAEA,MAAI,mBAAmB;AACrB,YAAQ,KAAK,6BAA6B;AAAA,EAC5C;AAEA,MAAI,gBAAgB;AAClB,YAAQ,KAAK,6BAA6B;AAC1C,UAAM,2BAA2B,CAAC,QAAQ,OAAO,IAAI;AAErD,QAAI,SAAS,cAAc,GAAG;AAE5B,aAAO,qBAAqB;AAC5B,aAAO,oBAAoB;AAAA,IAC7B,WAAW,SAAS,cAAc,GAAG;AACnC,aAAO,OAAO,QAAQ,cAAc;AAGpC,UAAI,CAAC,eAAe,mBAAmB;AACrC,eAAO,oBAAoB;AAAA,MAC7B;AAAA,IACF,OAAO;AACL,aAAO,oBAAoB;AAAA,IAC7B;AAGA,wBAAoB;AAAA,EACtB;AAGA,SAAO,UAAU;AAEjB,SAAO;AACT;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configNames
3
- } from "./chunk-2EO7WKUA.js";
3
+ } from "./chunk-PHDHPPH2.js";
4
4
 
5
5
  // src/eslint/turbo/config.ts
6
6
  import turbo from "eslint-plugin-turbo";
@@ -17,4 +17,4 @@ var turboConfig = () => ({
17
17
  export {
18
18
  turboConfig
19
19
  };
20
- //# sourceMappingURL=chunk-KYBK4TYC.js.map
20
+ //# sourceMappingURL=chunk-NAQPNARH.js.map
@@ -14,10 +14,11 @@ var configNames = {
14
14
  testing: "testing-config",
15
15
  turbo: "turbo-config",
16
16
  typescript: "tseslint-config",
17
+ typescriptTesting: "tseslint-testing-config",
17
18
  unicorn: "unicorn-config"
18
19
  };
19
20
 
20
21
  export {
21
22
  configNames
22
23
  };
23
- //# sourceMappingURL=chunk-2EO7WKUA.js.map
24
+ //# sourceMappingURL=chunk-PHDHPPH2.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/eslint/constants.ts"],"sourcesContent":["/**\n * Debug names for ESLint configuration objects.\n * These names help identify different configuration sections in ESLint's debug output\n * and error messages, making it easier to track which rules come from which config.\n */\nexport const configNames = {\n base: \"base-config\",\n disableTypeChecked: \"typescript-eslint/disable-type-checked\",\n ignores: \"ignores-config\",\n jsdoc: \"jsdoc-config\",\n markdown: \"markdown-config\",\n perfectionist: \"perfectionist-config\",\n preferArrowFunction: \"prefer-arrow-function-config\",\n react: \"react-config\",\n reactCompiler: \"react-compiler-config\",\n storybook: \"storybook:stories\",\n storybookConfig: \"storybook:config\",\n testing: \"testing-config\",\n turbo: \"turbo-config\",\n typescript: \"tseslint-config\",\n unicorn: \"unicorn-config\",\n} as const;\n\nexport type ConfigName = (typeof configNames)[keyof typeof configNames];\n"],"mappings":";AAKO,IAAM,cAAc;AAAA,EACzB,MAAM;AAAA,EACN,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AAAA,EACV,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,SAAS;AACX;","names":[]}
1
+ {"version":3,"sources":["../src/eslint/constants.ts"],"sourcesContent":["/**\n * Debug names for ESLint configuration objects.\n * These names help identify different configuration sections in ESLint's debug output\n * and error messages, making it easier to track which rules come from which config.\n */\nexport const configNames = {\n base: \"base-config\",\n disableTypeChecked: \"typescript-eslint/disable-type-checked\",\n ignores: \"ignores-config\",\n jsdoc: \"jsdoc-config\",\n markdown: \"markdown-config\",\n perfectionist: \"perfectionist-config\",\n preferArrowFunction: \"prefer-arrow-function-config\",\n react: \"react-config\",\n reactCompiler: \"react-compiler-config\",\n storybook: \"storybook:stories\",\n storybookConfig: \"storybook:config\",\n testing: \"testing-config\",\n turbo: \"turbo-config\",\n typescript: \"tseslint-config\",\n typescriptTesting: \"tseslint-testing-config\",\n unicorn: \"unicorn-config\",\n} as const;\n\nexport type ConfigName = (typeof configNames)[keyof typeof configNames];\n"],"mappings":";AAKO,IAAM,cAAc;AAAA,EACzB,MAAM;AAAA,EACN,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AAAA,EACV,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,SAAS;AACX;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-YZG34ZNI.js";
4
4
  import {
5
5
  configNames
6
- } from "./chunk-2EO7WKUA.js";
6
+ } from "./chunk-PHDHPPH2.js";
7
7
 
8
8
  // src/eslint/unicorn/config.ts
9
9
  import unicorn from "eslint-plugin-unicorn";
@@ -18,4 +18,4 @@ var unicornConfig = {
18
18
  export {
19
19
  unicornConfig
20
20
  };
21
- //# sourceMappingURL=chunk-L4LQOBUL.js.map
21
+ //# sourceMappingURL=chunk-PIU5PRNJ.js.map
@@ -1,39 +1,39 @@
1
1
  import {
2
2
  turboConfig
3
- } from "./chunk-KYBK4TYC.js";
3
+ } from "./chunk-NAQPNARH.js";
4
4
  import {
5
5
  tseslintConfig
6
- } from "./chunk-Z6KYKZMZ.js";
6
+ } from "./chunk-ZKVGTPGV.js";
7
7
  import {
8
8
  unicornConfig
9
- } from "./chunk-L4LQOBUL.js";
9
+ } from "./chunk-PIU5PRNJ.js";
10
10
  import {
11
11
  preferArrowFunctionConfig
12
- } from "./chunk-NM7R77WJ.js";
12
+ } from "./chunk-YG7GTCRE.js";
13
13
  import {
14
14
  reactEslintConfig
15
- } from "./chunk-DXH4IKTS.js";
15
+ } from "./chunk-HWZVK7LV.js";
16
16
  import {
17
17
  reactCompilerEslintConfig
18
- } from "./chunk-D2NUXSOP.js";
18
+ } from "./chunk-LUPJ4SWW.js";
19
19
  import {
20
20
  storybookConfig
21
- } from "./chunk-2ASX5K3P.js";
21
+ } from "./chunk-YR7FD722.js";
22
22
  import {
23
23
  testingConfig
24
- } from "./chunk-3PBWLBKQ.js";
24
+ } from "./chunk-YGS6KBZK.js";
25
25
  import {
26
26
  baseEslintConfig
27
- } from "./chunk-5CDPACBF.js";
27
+ } from "./chunk-5HWRM6F6.js";
28
28
  import {
29
29
  jsdocConfig
30
- } from "./chunk-TIF7G5QI.js";
30
+ } from "./chunk-5XUVB2ZB.js";
31
31
  import {
32
32
  perfectionistConfig
33
- } from "./chunk-NUREJELC.js";
33
+ } from "./chunk-ZTAPCYRD.js";
34
34
  import {
35
35
  ignoresConfig
36
- } from "./chunk-DXJEC5GK.js";
36
+ } from "./chunk-7WAIXW4V.js";
37
37
  import {
38
38
  isObject,
39
39
  isString
@@ -131,4 +131,4 @@ var eslintConfig = ({
131
131
  export {
132
132
  eslintConfig
133
133
  };
134
- //# sourceMappingURL=chunk-S3BOQC2P.js.map
134
+ //# sourceMappingURL=chunk-QZHQTJ56.js.map
@@ -200,12 +200,6 @@ var baseEslintRules = (functionStyle) => ({
200
200
  * 🚫 Not fixable - https://eslint.org/docs/rules/no-multi-assign
201
201
  */
202
202
  "no-multi-assign": ["warn"],
203
- /**
204
- * Disallow nested ternary expressions.
205
- *
206
- * 🚫 Not fixable - https://eslint.org/docs/rules/no-nested-ternary
207
- */
208
- "no-nested-ternary": "warn",
209
203
  /**
210
204
  * Disallow `new` for side effects.
211
205
  *
@@ -429,4 +423,4 @@ var baseEslintRules = (functionStyle) => ({
429
423
  export {
430
424
  baseEslintRules
431
425
  };
432
- //# sourceMappingURL=chunk-ZOCL6XIB.js.map
426
+ //# sourceMappingURL=chunk-XICOWKSV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/eslint/base/rules.ts"],"sourcesContent":["import type { FunctionStyle } from \"../types.js\";\nimport type { BaseRules } from \"./types.js\";\n\n/**\n * Generates the base set of ESLint rules with configurable function style enforcement.\n *\n * @param functionStyle - Controls how functions should be written. Can be:\n * - \"off\": Disables function style enforcement\n * - \"arrow\": Enforces arrow function expressions\n * - \"declaration\": Enforces function declarations\n * - \"expression\": Enforces function expressions\n * @returns An object containing ESLint rule configurations\n */\nexport const baseEslintRules = (\n functionStyle: \"off\" | FunctionStyle,\n): BaseRules => ({\n /**\n * Require return statements in array methods callbacks.\n *\n * 🚫 Not fixable -https://eslint.org/docs/rules/array-callback-return\n */\n \"array-callback-return\": [\n \"warn\",\n { allowImplicit: true, checkForEach: true },\n ],\n /**\n * Treat `var` statements as if they were block scoped.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var\n */\n \"block-scoped-var\": \"warn\",\n /**\n * Require camel case names.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/camelcase\n */\n camelcase: [\n \"warn\",\n {\n allow: [\"^UNSAFE_\"],\n ignoreDestructuring: false,\n ignoreImports: true,\n properties: \"never\",\n },\n ],\n /**\n * Require curly braces for multiline blocks.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/curly\n */\n curly: [\"warn\", \"multi-line\"],\n /**\n * Require default clauses in switch statements to be last (if used).\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last\n */\n \"default-case-last\": \"warn\",\n /**\n * Require triple equals (`===` and `!==`).\n *å\n * 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq\n */\n eqeqeq: \"warn\",\n \"for-direction\": \"warn\",\n /**\n * Require function expressions to have a name.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/func-names\n */\n \"func-names\": [\"warn\", \"as-needed\"],\n \"func-style\":\n // if arrow function, we use the prefer-arrow-functions plugin\n functionStyle === \"off\" || functionStyle === \"arrow\" ?\n \"off\"\n : [\"warn\", functionStyle, { allowArrowFunctions: true }],\n /**\n * Require grouped accessor pairs in object literals and classes.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs\n */\n \"grouped-accessor-pairs\": \"warn\",\n /**\n * Require a capital letter for constructors.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/new-cap\n */\n \"new-cap\": [\"warn\", { capIsNew: false }],\n /**\n * Disallow use of `alert()`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-alert\n */\n \"no-alert\": \"warn\",\n \"no-async-promise-executor\": \"warn\",\n /**\n * Disallow use of bitwise operators.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-bitwise\n */\n \"no-bitwise\": \"warn\",\n /**\n * Disallow use of `caller`/`callee`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-caller\n */\n \"no-caller\": \"warn\",\n \"no-case-declarations\": \"warn\",\n \"no-compare-neg-zero\": \"warn\",\n \"no-cond-assign\": \"warn\",\n /**\n * Disallow the use of console.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-console\n */\n \"no-console\": [\"warn\", { allow: [\"info\", \"warn\", \"error\"] }],\n /**\n * Disallow expressions where the operation doesn't affect the value.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-console\n */\n \"no-constant-binary-expression\": \"warn\",\n \"no-constant-condition\": \"warn\",\n /**\n * Disallow returning value in constructor.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return\n */\n \"no-constructor-return\": \"warn\",\n \"no-control-regex\": \"warn\",\n \"no-debugger\": \"warn\",\n \"no-delete-var\": \"warn\",\n \"no-dupe-else-if\": \"warn\",\n \"no-duplicate-case\": \"warn\",\n /**\n * Disallow using an `else` if the `if` block contains a return.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-else-return\n */\n \"no-else-return\": \"warn\",\n \"no-empty\": \"warn\",\n \"no-empty-character-class\": \"warn\",\n \"no-empty-pattern\": \"warn\",\n \"no-empty-static-block\": \"warn\",\n /**\n * Disallow `eval()`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-eval\n */\n \"no-eval\": \"warn\",\n \"no-ex-assign\": \"warn\",\n /**\n * Disallow extending native objects.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native\n */\n \"no-extend-native\": \"warn\",\n /**\n * Disallow unnecessary function binding.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind\n */\n \"no-extra-bind\": \"warn\",\n \"no-extra-boolean-cast\": \"warn\",\n /**\n * Disallow unnecessary labels.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label\n */\n \"no-extra-label\": \"warn\",\n \"no-fallthrough\": \"warn\",\n \"no-global-assign\": \"warn\",\n /**\n * Make people convert types explicitly e.g. `Boolean(foo)` instead of `!!foo`.\n *\n * 🔧 Partially Fixable - https://eslint.org/docs/rules/no-implicit-coercion\n */\n \"no-implicit-coercion\": \"warn\",\n \"no-invalid-regexp\": \"warn\",\n \"no-irregular-whitespace\": \"warn\",\n /**\n * Disallow usage of `__iterator__` property.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator\n */\n \"no-iterator\": \"warn\",\n /**\n * Disallow labels that share a name with a variable.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-label-var\n */\n \"no-label-var\": \"warn\",\n /**\n * Disallow use of labels for anything other than loops and switches.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-labels\n */\n \"no-labels\": [\"warn\"],\n /**\n * Disallow unnecessary nested blocks.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks\n */\n \"no-lone-blocks\": \"warn\",\n /**\n * Disallow if as the only statement in an else block.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-lonely-if\n */\n \"no-lonely-if\": \"warn\",\n \"no-loss-of-precision\": \"warn\",\n \"no-misleading-character-class\": \"warn\",\n /**\n * Disallow use of chained assignment expressions.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-multi-assign\n */\n \"no-multi-assign\": [\"warn\"],\n /**\n * Disallow `new` for side effects.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-new\n */\n \"no-new\": \"warn\",\n /**\n * Disallow function constructors.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func\n */\n \"no-new-func\": \"warn\",\n /**\n * Disallow primitive wrapper instances, such as `new String('foo')`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers\n */\n \"no-new-wrappers\": \"warn\",\n \"no-nonoctal-decimal-escape\": \"warn\",\n \"no-octal\": \"warn\",\n /**\n * Disallow use of octal escape sequences in string literals.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape\n */\n \"no-octal-escape\": \"warn\",\n /**\n * Disallow reassignment of function parameters.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign\n */\n \"no-param-reassign\": \"warn\",\n /**\n * Disallow returning values from Promise executor functions.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-promise-executor-return\n */\n \"no-promise-executor-return\": \"warn\",\n /**\n * Disallow usage of the deprecated `__proto__` property.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-proto\n */\n \"no-proto\": \"warn\",\n \"no-prototype-builtins\": \"warn\",\n \"no-regex-spaces\": \"warn\",\n /**\n * Disallow assignment in `return` statement.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign\n */\n \"no-return-assign\": \"warn\",\n /**\n * Disallow use of `javascript:` urls.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url\n */\n \"no-script-url\": \"warn\",\n \"no-self-assign\": \"warn\",\n /**\n * Disallow comparisons where both sides are exactly the same.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare\n */\n \"no-self-compare\": \"warn\",\n /**\n * Disallow use of comma operator.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences\n */\n \"no-sequences\": \"warn\",\n \"no-shadow-restricted-names\": \"warn\",\n \"no-sparse-arrays\": \"warn\",\n /**\n * Disallow template literal placeholder syntax in regular strings, as\n * these are likely errors.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-template-curly-in-string\n */\n \"no-template-curly-in-string\": \"warn\",\n /**\n * Disallow initializing variables to `undefined`.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-undef-init\n */\n \"no-undef-init\": \"warn\",\n \"no-unexpected-multiline\": \"warn\",\n /**\n * Disallow ternary operators when simpler alternatives exist.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-unneeded-ternary\n */\n \"no-unneeded-ternary\": \"warn\",\n /**\n * Disallow loops with a body that allows only one iteration.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-unreachable-loop\n */\n \"no-unreachable-loop\": \"warn\",\n \"no-unsafe-finally\": \"warn\",\n \"no-unsafe-optional-chaining\": \"warn\",\n \"no-unused-labels\": \"warn\",\n \"no-unused-private-class-members\": \"warn\",\n \"no-useless-backreference\": \"warn\",\n /**\n * Disallow unnecessary `.call()` and `.apply()`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call\n */\n \"no-useless-call\": \"warn\",\n \"no-useless-catch\": \"warn\",\n /**\n * Disallow useless computed property keys.\n *\n * � Fixable - https://eslint.org/docs/rules/no-useless-computed-key\n */\n \"no-useless-computed-key\": \"warn\",\n /**\n * Disallow unnecessary concatenation of strings.\n *\n * � Not fixable - https://eslint.org/docs/rules/no-useless-concat\n */\n \"no-useless-concat\": \"warn\",\n \"no-useless-escape\": \"warn\",\n /**\n * Disallow renaming import, export, and destructured assignments to the\n * same name.\n *\n * � Fixable - https://eslint.org/docs/rules/no-useless-rename\n */\n \"no-useless-rename\": \"warn\",\n /**\n * Disallow redundant return statements.\n *\n * � Fixable - https://eslint.org/docs/rules/no-useless-return\n */\n \"no-useless-return\": \"warn\",\n /**\n * Require `let` or `const` instead of `var`.\n * ts transpiles let/const to var, so no need for vars any more\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-var\n */\n \"no-var\": \"warn\",\n \"no-with\": \"warn\",\n /**\n * Require object literal shorthand syntax.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/object-shorthand\n */\n \"object-shorthand\": \"warn\",\n /**\n * Require default to `const` instead of `let`.\n * ts provides better types with const\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-const\n */\n \"prefer-const\": \"warn\",\n /**\n * Require using named capture groups in regular expressions.\n *\n * � Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group\n */\n \"prefer-named-capture-group\": \"warn\",\n /**\n * Disallow parseInt() in favor of binary, octal, and hexadecimal literals.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-numeric-literals\n */\n \"prefer-numeric-literals\": \"warn\",\n /**\n * Require use of an object spread over Object.assign.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-object-spread\n */\n \"prefer-object-spread\": \"warn\",\n /**\n * Disallow use of the RegExp constructor in favor of regular expression\n * literals.\n *\n * � Not fixable - https://eslint.org/docs/rules/prefer-regex-literals\n */\n \"prefer-regex-literals\": \"warn\",\n /**\n * Require using rest parameters instead of `arguments`.\n * ts provides better types with rest args over arguments\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-rest-params\n */\n \"prefer-rest-params\": \"warn\",\n /**\n * Require using spread syntax instead of `.apply()`.\n * ts transpiles spread to apply, so no need for manual apply\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-spread\n */\n \"prefer-spread\": \"warn\",\n /**\n * Require using template literals instead of string concatenation.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-template\n */\n \"prefer-template\": \"warn\",\n \"require-yield\": \"warn\",\n /**\n * Require a `Symbol` description.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/symbol-description\n */\n \"symbol-description\": \"warn\",\n \"use-isnan\": \"warn\",\n \"valid-typeof\": \"warn\",\n /**\n * Disallow \"Yoda conditions\", ensuring the comparison.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/yoda\n */\n yoda: \"warn\",\n});\n"],"mappings":"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","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configNames
3
- } from "./chunk-2EO7WKUA.js";
3
+ } from "./chunk-PHDHPPH2.js";
4
4
 
5
5
  // src/eslint/prefer-arrow-function/config.ts
6
6
  import preferArrowFunctions from "eslint-plugin-prefer-arrow-functions";
@@ -23,4 +23,4 @@ var preferArrowFunctionConfig = () => ({
23
23
  export {
24
24
  preferArrowFunctionConfig
25
25
  };
26
- //# sourceMappingURL=chunk-NM7R77WJ.js.map
26
+ //# sourceMappingURL=chunk-YG7GTCRE.js.map
@@ -1,12 +1,12 @@
1
- import {
2
- vitestRules
3
- } from "./chunk-HOZDQJWG.js";
4
1
  import {
5
2
  jestRules
6
3
  } from "./chunk-UV6CA4PE.js";
4
+ import {
5
+ vitestRules
6
+ } from "./chunk-HOZDQJWG.js";
7
7
  import {
8
8
  configNames
9
- } from "./chunk-2EO7WKUA.js";
9
+ } from "./chunk-PHDHPPH2.js";
10
10
 
11
11
  // src/eslint/testing/config.ts
12
12
  import jest from "eslint-plugin-jest";
@@ -34,6 +34,7 @@ var testingConfig = ({
34
34
  },
35
35
  rules: {
36
36
  // jest doesn't have a file name rule, so we'll use this one for both
37
+ "@typescript-eslint/unbound-method": "off",
37
38
  "vitest/consistent-test-filename": [
38
39
  "warn",
39
40
  {
@@ -64,4 +65,4 @@ var testingConfig = ({
64
65
  export {
65
66
  testingConfig
66
67
  };
67
- //# sourceMappingURL=chunk-3PBWLBKQ.js.map
68
+ //# sourceMappingURL=chunk-YGS6KBZK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/eslint/testing/config.ts"],"sourcesContent":["import jest from \"eslint-plugin-jest\";\nimport vitest from \"eslint-plugin-vitest\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { jestRules } from \"./jest-rules.js\";\nimport { vitestRules } from \"./vitest-rules.js\";\n\nexport interface TestingConfig {\n filenamePattern?: \"spec\" | \"test\";\n files?: string[];\n formattingRules?: boolean;\n framework?: \"bun\" | \"jest\" | \"node\" | \"vitest\";\n itOrTest?: \"it\" | \"test\";\n}\n\n/**\n * Creates an ESLint configuration object for testing.\n *\n * @param options - Configuration options\n * @param options.files - Files to include in the configuration\n * @param options.filenamePattern - \".test\" or \".spec\" filename pattern\n * @param options.itOrTest - \"it\" or \"test\"\n * @param options.framework - \"jest\" or \"vitest\"\n * @param options.formattingRules - Whether to include formatting rules like padding around blocks\n * @returns ESLint configuration object\n */\nexport const testingConfig = (\n {\n filenamePattern,\n files,\n formattingRules,\n framework,\n itOrTest,\n }: TestingConfig = {\n filenamePattern: \"test\",\n formattingRules: true,\n framework: \"vitest\",\n itOrTest: \"test\",\n },\n): EslintConfigObject => ({\n files: files ?? [\"**/*.{test,spec}.{ts,tsx,js,jsx}\"],\n languageOptions: {\n globals:\n framework === \"vitest\" ?\n { ...vitest.environments.env.globals }\n : jest.environments.globals.globals,\n },\n name: configNames.testing,\n plugins: {\n jest,\n vitest,\n },\n rules: {\n // jest doesn't have a file name rule, so we'll use this one for both\n \"@typescript-eslint/unbound-method\": \"off\",\n \"vitest/consistent-test-filename\": [\n \"warn\",\n {\n allTestPattern: \".*\\\\.(test|spec)\\\\.[tj]sx?$\",\n pattern: `.*\\\\.${filenamePattern}\\\\.[tj]sx?$`,\n },\n ],\n ...(framework === \"vitest\" ? vitestRules(itOrTest) : jestRules(itOrTest)),\n ...(formattingRules ?\n {\n \"jest/padding-around-after-all-blocks\": \"warn\",\n \"jest/padding-around-after-each-blocks\": \"warn\",\n \"jest/padding-around-before-all-blocks\": \"warn\",\n \"jest/padding-around-before-each-blocks\": \"warn\",\n \"jest/padding-around-describe-blocks\": \"warn\",\n \"jest/padding-around-expect-groups\": \"warn\",\n \"jest/padding-around-test-blocks\": \"warn\",\n }\n : {}),\n },\n ...(framework !== \"jest\" && framework !== \"vitest\" ?\n {\n settings: {\n jest: {\n globalPackage: framework === \"node\" ? \"node:test\" : \"bun:test\",\n },\n },\n }\n : {}),\n});\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,UAAU;AACjB,OAAO,YAAY;AA2BZ,IAAM,gBAAgB,CAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,IAAmB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,UAAU;AACZ,OACwB;AAAA,EACxB,OAAO,SAAS,CAAC,kCAAkC;AAAA,EACnD,iBAAiB;AAAA,IACf,SACE,cAAc,WACZ,EAAE,GAAG,OAAO,aAAa,IAAI,QAAQ,IACrC,KAAK,aAAa,QAAQ;AAAA,EAChC;AAAA,EACA,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA;AAAA,IAEL,qCAAqC;AAAA,IACrC,mCAAmC;AAAA,MACjC;AAAA,MACA;AAAA,QACE,gBAAgB;AAAA,QAChB,SAAS,QAAQ,eAAe;AAAA,MAClC;AAAA,IACF;AAAA,IACA,GAAI,cAAc,WAAW,YAAY,QAAQ,IAAI,UAAU,QAAQ;AAAA,IACvE,GAAI,kBACF;AAAA,MACE,wCAAwC;AAAA,MACxC,yCAAyC;AAAA,MACzC,yCAAyC;AAAA,MACzC,0CAA0C;AAAA,MAC1C,uCAAuC;AAAA,MACvC,qCAAqC;AAAA,MACrC,mCAAmC;AAAA,IACrC,IACA,CAAC;AAAA,EACL;AAAA,EACA,GAAI,cAAc,UAAU,cAAc,WACxC;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,eAAe,cAAc,SAAS,cAAc;AAAA,MACtD;AAAA,IACF;AAAA,EACF,IACA,CAAC;AACL;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configNames
3
- } from "./chunk-2EO7WKUA.js";
3
+ } from "./chunk-PHDHPPH2.js";
4
4
 
5
5
  // src/eslint/storybook/config.ts
6
6
  import storybookPlugin from "eslint-plugin-storybook";
@@ -42,4 +42,4 @@ var storybookConfig = [
42
42
  export {
43
43
  storybookConfig
44
44
  };
45
- //# sourceMappingURL=chunk-2ASX5K3P.js.map
45
+ //# sourceMappingURL=chunk-YR7FD722.js.map
@@ -1,9 +1,17 @@
1
- // scripts/postinstall.js
1
+ // src/prettier/patch-tailwind-plugin.ts
2
2
  import * as fs from "node:fs";
3
3
  import * as path from "node:path";
4
- var patchPrettierPluginTailwindcss = () => {
4
+ var DECLARE_BLOCK = `declare module 'prettier' {
5
+ interface RequiredOptions extends PluginOptions {
6
+ }
7
+ interface ParserOptions extends PluginOptions {
8
+ }
9
+ }`;
10
+ var patchTailwindPlugin = () => {
5
11
  try {
6
- console.info("js-style-kit: Starting postinstall patch...");
12
+ console.info(
13
+ "js-style-kit: Patching prettier-plugin-tailwindcss declaration file..."
14
+ );
7
15
  let pluginPath;
8
16
  const rootPath = path.join(
9
17
  "node_modules",
@@ -12,9 +20,8 @@ var patchPrettierPluginTailwindcss = () => {
12
20
  "index.d.ts"
13
21
  );
14
22
  const packagePath = path.join(
15
- __dirname,
16
- "..",
17
- "..",
23
+ process.cwd(),
24
+ "node_modules",
18
25
  "prettier-plugin-tailwindcss",
19
26
  "dist",
20
27
  "index.d.ts"
@@ -27,7 +34,7 @@ var patchPrettierPluginTailwindcss = () => {
27
34
  console.warn(
28
35
  "js-style-kit: prettier-plugin-tailwindcss not found, skipping patch"
29
36
  );
30
- return;
37
+ return false;
31
38
  }
32
39
  console.info(`js-style-kit: Found plugin at ${pluginPath}`);
33
40
  const backupPath = `${pluginPath}.backup`;
@@ -36,32 +43,31 @@ var patchPrettierPluginTailwindcss = () => {
36
43
  console.info("js-style-kit: Created backup of original declaration file");
37
44
  }
38
45
  const content = fs.readFileSync(pluginPath, "utf8");
39
- const declareBlock = `declare module 'prettier' {
40
- interface RequiredOptions extends PluginOptions {
41
- }
42
- interface ParserOptions extends PluginOptions {
43
- }
44
- }`;
45
- const patchedContent = content.replace(
46
- declareBlock,
47
- "// Removed unsafe declare module statement"
48
- );
49
- if (content !== patchedContent) {
50
- fs.writeFileSync(pluginPath, patchedContent);
51
- console.info(
52
- "js-style-kit: Successfully patched prettier-plugin-tailwindcss declaration file"
53
- );
54
- } else {
46
+ if (!content.includes(DECLARE_BLOCK)) {
55
47
  console.info(
56
48
  "js-style-kit: No patching needed, declaration block not found or already patched"
57
49
  );
50
+ return true;
58
51
  }
52
+ const patchedContent = content.replace(
53
+ DECLARE_BLOCK,
54
+ "// Removed unsafe declare module statement"
55
+ );
56
+ fs.writeFileSync(pluginPath, patchedContent);
57
+ console.info(
58
+ "js-style-kit: Successfully patched prettier-plugin-tailwindcss declaration file"
59
+ );
60
+ return true;
59
61
  } catch (error) {
60
62
  console.error(
61
63
  "js-style-kit: Error patching prettier-plugin-tailwindcss:",
62
64
  error
63
65
  );
66
+ return false;
64
67
  }
65
68
  };
66
- patchPrettierPluginTailwindcss();
67
- //# sourceMappingURL=postinstall.js.map
69
+
70
+ export {
71
+ patchTailwindPlugin
72
+ };
73
+ //# sourceMappingURL=chunk-ZED5DLW7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/prettier/patch-tailwind-plugin.ts"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n\n/**\n * The exact declare statement to remove from the prettier-plugin-tailwindcss declaration file\n * This statement causes conflicts with other Prettier plugins\n */\nconst DECLARE_BLOCK = `declare module 'prettier' {\n interface RequiredOptions extends PluginOptions {\n }\n interface ParserOptions extends PluginOptions {\n }\n}`;\n\n/**\n * Patches the declaration file of prettier-plugin-tailwindcss to remove the unsafe declare statement\n * that can cause conflicts with other Prettier plugins.\n *\n * @returns True if the patch was applied or already in place, false if plugin was not found or error occurred\n */\nexport const patchTailwindPlugin = (): boolean => {\n try {\n console.info(\n \"js-style-kit: Patching prettier-plugin-tailwindcss declaration file...\",\n );\n\n // Find the location of prettier-plugin-tailwindcss\n // This will work regardless of where js-style-kit is installed\n let pluginPath: string | undefined;\n\n // First try from the project root\n const rootPath = path.join(\n \"node_modules\",\n \"prettier-plugin-tailwindcss\",\n \"dist\",\n \"index.d.ts\",\n );\n\n // Then try from js-style-kit's directory\n const packagePath = path.join(\n process.cwd(),\n \"node_modules\",\n \"prettier-plugin-tailwindcss\",\n \"dist\",\n \"index.d.ts\",\n );\n\n // Choose the path that exists\n if (fs.existsSync(rootPath)) {\n pluginPath = rootPath;\n } else if (fs.existsSync(packagePath)) {\n pluginPath = packagePath;\n } else {\n console.warn(\n \"js-style-kit: prettier-plugin-tailwindcss not found, skipping patch\",\n );\n return false;\n }\n\n console.info(`js-style-kit: Found plugin at ${pluginPath}`);\n\n // Create backup of original file if it doesn't exist already\n const backupPath = `${pluginPath}.backup`;\n if (!fs.existsSync(backupPath)) {\n fs.writeFileSync(backupPath, fs.readFileSync(pluginPath, \"utf8\"));\n console.info(\"js-style-kit: Created backup of original declaration file\");\n }\n\n // Read the file\n const content = fs.readFileSync(pluginPath, \"utf8\");\n\n // Check if already patched\n if (!content.includes(DECLARE_BLOCK)) {\n console.info(\n \"js-style-kit: No patching needed, declaration block not found or already patched\",\n );\n return true;\n }\n\n // Replace the declare block with a comment\n const patchedContent = content.replace(\n DECLARE_BLOCK,\n \"// Removed unsafe declare module statement\",\n );\n\n // Write the patched file back\n fs.writeFileSync(pluginPath, patchedContent);\n console.info(\n \"js-style-kit: Successfully patched prettier-plugin-tailwindcss declaration file\",\n );\n\n return true;\n } catch (error) {\n console.error(\n \"js-style-kit: Error patching prettier-plugin-tailwindcss:\",\n error,\n );\n return false;\n }\n};\n"],"mappings":";AAAA,YAAY,QAAQ;AACpB,YAAY,UAAU;AAMtB,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAaf,IAAM,sBAAsB,MAAe;AAChD,MAAI;AACF,YAAQ;AAAA,MACN;AAAA,IACF;AAIA,QAAI;AAGJ,UAAM,WAAgB;AAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAGA,UAAM,cAAmB;AAAA,MACvB,QAAQ,IAAI;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAGA,QAAO,cAAW,QAAQ,GAAG;AAC3B,mBAAa;AAAA,IACf,WAAc,cAAW,WAAW,GAAG;AACrC,mBAAa;AAAA,IACf,OAAO;AACL,cAAQ;AAAA,QACN;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAEA,YAAQ,KAAK,iCAAiC,UAAU,EAAE;AAG1D,UAAM,aAAa,GAAG,UAAU;AAChC,QAAI,CAAI,cAAW,UAAU,GAAG;AAC9B,MAAG,iBAAc,YAAe,gBAAa,YAAY,MAAM,CAAC;AAChE,cAAQ,KAAK,2DAA2D;AAAA,IAC1E;AAGA,UAAM,UAAa,gBAAa,YAAY,MAAM;AAGlD,QAAI,CAAC,QAAQ,SAAS,aAAa,GAAG;AACpC,cAAQ;AAAA,QACN;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAGA,UAAM,iBAAiB,QAAQ;AAAA,MAC7B;AAAA,MACA;AAAA,IACF;AAGA,IAAG,iBAAc,YAAY,cAAc;AAC3C,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ;AAAA,MACN;AAAA,MACA;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-LITSWCYQ.js";
4
4
  import {
5
5
  configNames
6
- } from "./chunk-2EO7WKUA.js";
6
+ } from "./chunk-PHDHPPH2.js";
7
7
 
8
8
  // src/eslint/typescript/config.ts
9
9
  import tseslint from "typescript-eslint";
@@ -35,4 +35,4 @@ var tseslintConfig = (tsconfigPath) => {
35
35
  export {
36
36
  tseslintConfig
37
37
  };
38
- //# sourceMappingURL=chunk-Z6KYKZMZ.js.map
38
+ //# sourceMappingURL=chunk-ZKVGTPGV.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-3SHRYTUT.js";
4
4
  import {
5
5
  configNames
6
- } from "./chunk-2EO7WKUA.js";
6
+ } from "./chunk-PHDHPPH2.js";
7
7
 
8
8
  // src/eslint/perfectionist/config.ts
9
9
  import perfectionist from "eslint-plugin-perfectionist";
@@ -18,4 +18,4 @@ var perfectionistConfig = {
18
18
  export {
19
19
  perfectionistConfig
20
20
  };
21
- //# sourceMappingURL=chunk-NUREJELC.js.map
21
+ //# sourceMappingURL=chunk-ZTAPCYRD.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  baseEslintConfig
3
- } from "../../chunk-5CDPACBF.js";
4
- import "../../chunk-ZOCL6XIB.js";
5
- import "../../chunk-2EO7WKUA.js";
3
+ } from "../../chunk-5HWRM6F6.js";
4
+ import "../../chunk-XICOWKSV.js";
5
+ import "../../chunk-PHDHPPH2.js";
6
6
  export {
7
7
  baseEslintConfig
8
8
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  baseEslintRules
3
- } from "../../chunk-ZOCL6XIB.js";
3
+ } from "../../chunk-XICOWKSV.js";
4
4
  export {
5
5
  baseEslintRules
6
6
  };
@@ -18,6 +18,7 @@ declare const configNames: {
18
18
  readonly testing: "testing-config";
19
19
  readonly turbo: "turbo-config";
20
20
  readonly typescript: "tseslint-config";
21
+ readonly typescriptTesting: "tseslint-testing-config";
21
22
  readonly unicorn: "unicorn-config";
22
23
  };
23
24
  type ConfigName = (typeof configNames)[keyof typeof configNames];
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configNames
3
- } from "../chunk-2EO7WKUA.js";
3
+ } from "../chunk-PHDHPPH2.js";
4
4
  export {
5
5
  configNames
6
6
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ignoresConfig
3
- } from "../chunk-DXJEC5GK.js";
4
- import "../chunk-2EO7WKUA.js";
3
+ } from "../chunk-7WAIXW4V.js";
4
+ import "../chunk-PHDHPPH2.js";
5
5
  export {
6
6
  ignoresConfig
7
7
  };
@@ -1,27 +1,27 @@
1
1
  import {
2
2
  eslintConfig
3
- } from "../chunk-S3BOQC2P.js";
4
- import "../chunk-KYBK4TYC.js";
5
- import "../chunk-Z6KYKZMZ.js";
3
+ } from "../chunk-QZHQTJ56.js";
4
+ import "../chunk-NAQPNARH.js";
5
+ import "../chunk-ZKVGTPGV.js";
6
6
  import "../chunk-LITSWCYQ.js";
7
- import "../chunk-L4LQOBUL.js";
7
+ import "../chunk-PIU5PRNJ.js";
8
8
  import "../chunk-YZG34ZNI.js";
9
- import "../chunk-NM7R77WJ.js";
10
- import "../chunk-DXH4IKTS.js";
9
+ import "../chunk-YG7GTCRE.js";
10
+ import "../chunk-HWZVK7LV.js";
11
11
  import "../chunk-26SVGV32.js";
12
- import "../chunk-D2NUXSOP.js";
13
- import "../chunk-2ASX5K3P.js";
14
- import "../chunk-3PBWLBKQ.js";
15
- import "../chunk-HOZDQJWG.js";
12
+ import "../chunk-LUPJ4SWW.js";
13
+ import "../chunk-YR7FD722.js";
14
+ import "../chunk-YGS6KBZK.js";
16
15
  import "../chunk-UV6CA4PE.js";
17
- import "../chunk-5CDPACBF.js";
18
- import "../chunk-ZOCL6XIB.js";
19
- import "../chunk-TIF7G5QI.js";
16
+ import "../chunk-HOZDQJWG.js";
17
+ import "../chunk-5HWRM6F6.js";
18
+ import "../chunk-XICOWKSV.js";
19
+ import "../chunk-5XUVB2ZB.js";
20
20
  import "../chunk-XCPOAYGQ.js";
21
- import "../chunk-NUREJELC.js";
21
+ import "../chunk-ZTAPCYRD.js";
22
22
  import "../chunk-3SHRYTUT.js";
23
- import "../chunk-DXJEC5GK.js";
24
- import "../chunk-2EO7WKUA.js";
23
+ import "../chunk-7WAIXW4V.js";
24
+ import "../chunk-PHDHPPH2.js";
25
25
  import "../chunk-PSSB4TGO.js";
26
26
  export {
27
27
  eslintConfig
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  jsdocConfig
3
- } from "../../chunk-TIF7G5QI.js";
3
+ } from "../../chunk-5XUVB2ZB.js";
4
4
  import "../../chunk-XCPOAYGQ.js";
5
- import "../../chunk-2EO7WKUA.js";
5
+ import "../../chunk-PHDHPPH2.js";
6
6
  export {
7
7
  jsdocConfig
8
8
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  perfectionistConfig
3
- } from "../../chunk-NUREJELC.js";
3
+ } from "../../chunk-ZTAPCYRD.js";
4
4
  import "../../chunk-3SHRYTUT.js";
5
- import "../../chunk-2EO7WKUA.js";
5
+ import "../../chunk-PHDHPPH2.js";
6
6
  export {
7
7
  perfectionistConfig
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  preferArrowFunctionConfig
3
- } from "../../chunk-NM7R77WJ.js";
4
- import "../../chunk-2EO7WKUA.js";
3
+ } from "../../chunk-YG7GTCRE.js";
4
+ import "../../chunk-PHDHPPH2.js";
5
5
  export {
6
6
  preferArrowFunctionConfig
7
7
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  reactEslintConfig
3
- } from "../../chunk-DXH4IKTS.js";
3
+ } from "../../chunk-HWZVK7LV.js";
4
4
  import "../../chunk-26SVGV32.js";
5
- import "../../chunk-2EO7WKUA.js";
5
+ import "../../chunk-PHDHPPH2.js";
6
6
  export {
7
7
  reactEslintConfig
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  reactCompilerEslintConfig
3
- } from "../../chunk-D2NUXSOP.js";
4
- import "../../chunk-2EO7WKUA.js";
3
+ } from "../../chunk-LUPJ4SWW.js";
4
+ import "../../chunk-PHDHPPH2.js";
5
5
  export {
6
6
  reactCompilerEslintConfig
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  storybookConfig
3
- } from "../../chunk-2ASX5K3P.js";
4
- import "../../chunk-2EO7WKUA.js";
3
+ } from "../../chunk-YR7FD722.js";
4
+ import "../../chunk-PHDHPPH2.js";
5
5
  export {
6
6
  storybookConfig
7
7
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  testingConfig
3
- } from "../../chunk-3PBWLBKQ.js";
4
- import "../../chunk-HOZDQJWG.js";
3
+ } from "../../chunk-YGS6KBZK.js";
5
4
  import "../../chunk-UV6CA4PE.js";
6
- import "../../chunk-2EO7WKUA.js";
5
+ import "../../chunk-HOZDQJWG.js";
6
+ import "../../chunk-PHDHPPH2.js";
7
7
  export {
8
8
  testingConfig
9
9
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  turboConfig
3
- } from "../../chunk-KYBK4TYC.js";
4
- import "../../chunk-2EO7WKUA.js";
3
+ } from "../../chunk-NAQPNARH.js";
4
+ import "../../chunk-PHDHPPH2.js";
5
5
  export {
6
6
  turboConfig
7
7
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  tseslintConfig
3
- } from "../../chunk-Z6KYKZMZ.js";
3
+ } from "../../chunk-ZKVGTPGV.js";
4
4
  import "../../chunk-LITSWCYQ.js";
5
- import "../../chunk-2EO7WKUA.js";
5
+ import "../../chunk-PHDHPPH2.js";
6
6
  export {
7
7
  tseslintConfig
8
8
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  unicornConfig
3
- } from "../../chunk-L4LQOBUL.js";
3
+ } from "../../chunk-PIU5PRNJ.js";
4
4
  import "../../chunk-YZG34ZNI.js";
5
- import "../../chunk-2EO7WKUA.js";
5
+ import "../../chunk-PHDHPPH2.js";
6
6
  export {
7
7
  unicornConfig
8
8
  };
package/dist/index.js CHANGED
@@ -1,30 +1,31 @@
1
1
  import {
2
2
  eslintConfig
3
- } from "./chunk-S3BOQC2P.js";
4
- import "./chunk-KYBK4TYC.js";
5
- import "./chunk-Z6KYKZMZ.js";
3
+ } from "./chunk-QZHQTJ56.js";
4
+ import "./chunk-NAQPNARH.js";
5
+ import "./chunk-ZKVGTPGV.js";
6
6
  import "./chunk-LITSWCYQ.js";
7
- import "./chunk-L4LQOBUL.js";
7
+ import "./chunk-PIU5PRNJ.js";
8
8
  import "./chunk-YZG34ZNI.js";
9
- import "./chunk-NM7R77WJ.js";
10
- import "./chunk-DXH4IKTS.js";
9
+ import "./chunk-YG7GTCRE.js";
10
+ import "./chunk-HWZVK7LV.js";
11
11
  import "./chunk-26SVGV32.js";
12
- import "./chunk-D2NUXSOP.js";
13
- import "./chunk-2ASX5K3P.js";
14
- import "./chunk-3PBWLBKQ.js";
15
- import "./chunk-HOZDQJWG.js";
12
+ import "./chunk-LUPJ4SWW.js";
13
+ import "./chunk-YR7FD722.js";
14
+ import "./chunk-YGS6KBZK.js";
16
15
  import "./chunk-UV6CA4PE.js";
17
- import "./chunk-5CDPACBF.js";
18
- import "./chunk-ZOCL6XIB.js";
19
- import "./chunk-TIF7G5QI.js";
16
+ import "./chunk-HOZDQJWG.js";
17
+ import "./chunk-5HWRM6F6.js";
18
+ import "./chunk-XICOWKSV.js";
19
+ import "./chunk-5XUVB2ZB.js";
20
20
  import "./chunk-XCPOAYGQ.js";
21
- import "./chunk-NUREJELC.js";
21
+ import "./chunk-ZTAPCYRD.js";
22
22
  import "./chunk-3SHRYTUT.js";
23
- import "./chunk-DXJEC5GK.js";
24
- import "./chunk-2EO7WKUA.js";
23
+ import "./chunk-7WAIXW4V.js";
24
+ import "./chunk-PHDHPPH2.js";
25
25
  import {
26
26
  prettierConfig
27
- } from "./chunk-HUTRDRS3.js";
27
+ } from "./chunk-MB4477NP.js";
28
+ import "./chunk-ZED5DLW7.js";
28
29
  import "./chunk-PSSB4TGO.js";
29
30
  export {
30
31
  eslintConfig,
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  prettierConfig
3
- } from "../chunk-HUTRDRS3.js";
3
+ } from "../chunk-MB4477NP.js";
4
+ import "../chunk-ZED5DLW7.js";
4
5
  import "../chunk-PSSB4TGO.js";
5
6
  export {
6
7
  prettierConfig
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Patches the declaration file of prettier-plugin-tailwindcss to remove the unsafe declare statement
3
+ * that can cause conflicts with other Prettier plugins.
4
+ *
5
+ * @returns True if the patch was applied or already in place, false if plugin was not found or error occurred
6
+ */
7
+ declare const patchTailwindPlugin: () => boolean;
8
+
9
+ export { patchTailwindPlugin };
@@ -0,0 +1,7 @@
1
+ import {
2
+ patchTailwindPlugin
3
+ } from "../chunk-ZED5DLW7.js";
4
+ export {
5
+ patchTailwindPlugin
6
+ };
7
+ //# sourceMappingURL=patch-tailwind-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-style-kit",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "A zero configuration style guide for ESLint and Prettier",
5
5
  "keywords": [
6
6
  "eslint",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/testing/config.ts"],"sourcesContent":["import jest from \"eslint-plugin-jest\";\nimport vitest from \"eslint-plugin-vitest\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { jestRules } from \"./jest-rules.js\";\nimport { vitestRules } from \"./vitest-rules.js\";\n\nexport interface TestingConfig {\n filenamePattern?: \"spec\" | \"test\";\n files?: string[];\n formattingRules?: boolean;\n framework?: \"bun\" | \"jest\" | \"node\" | \"vitest\";\n itOrTest?: \"it\" | \"test\";\n}\n\n/**\n * Creates an ESLint configuration object for testing.\n *\n * @param options - Configuration options\n * @param options.files - Files to include in the configuration\n * @param options.filenamePattern - \".test\" or \".spec\" filename pattern\n * @param options.itOrTest - \"it\" or \"test\"\n * @param options.framework - \"jest\" or \"vitest\"\n * @param options.formattingRules - Whether to include formatting rules like padding around blocks\n * @returns ESLint configuration object\n */\nexport const testingConfig = (\n {\n filenamePattern,\n files,\n formattingRules,\n framework,\n itOrTest,\n }: TestingConfig = {\n filenamePattern: \"test\",\n formattingRules: true,\n framework: \"vitest\",\n itOrTest: \"test\",\n },\n): EslintConfigObject => ({\n files: files ?? [\"**/*.{test,spec}.{ts,tsx,js,jsx}\"],\n languageOptions: {\n globals:\n framework === \"vitest\" ?\n { ...vitest.environments.env.globals }\n : jest.environments.globals.globals,\n },\n name: configNames.testing,\n plugins: {\n jest,\n vitest,\n },\n rules: {\n // jest doesn't have a file name rule, so we'll use this one for both\n \"vitest/consistent-test-filename\": [\n \"warn\",\n {\n allTestPattern: \".*\\\\.(test|spec)\\\\.[tj]sx?$\",\n pattern: `.*\\\\.${filenamePattern}\\\\.[tj]sx?$`,\n },\n ],\n ...(framework === \"vitest\" ? vitestRules(itOrTest) : jestRules(itOrTest)),\n ...(formattingRules ?\n {\n \"jest/padding-around-after-all-blocks\": \"warn\",\n \"jest/padding-around-after-each-blocks\": \"warn\",\n \"jest/padding-around-before-all-blocks\": \"warn\",\n \"jest/padding-around-before-each-blocks\": \"warn\",\n \"jest/padding-around-describe-blocks\": \"warn\",\n \"jest/padding-around-expect-groups\": \"warn\",\n \"jest/padding-around-test-blocks\": \"warn\",\n }\n : {}),\n },\n ...(framework !== \"jest\" && framework !== \"vitest\" ?\n {\n settings: {\n jest: {\n globalPackage: framework === \"node\" ? \"node:test\" : \"bun:test\",\n },\n },\n }\n : {}),\n});\n"],"mappings":";;;;;;;;;;;AAAA,OAAO,UAAU;AACjB,OAAO,YAAY;AA2BZ,IAAM,gBAAgB,CAC3B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,IAAmB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,UAAU;AACZ,OACwB;AAAA,EACxB,OAAO,SAAS,CAAC,kCAAkC;AAAA,EACnD,iBAAiB;AAAA,IACf,SACE,cAAc,WACZ,EAAE,GAAG,OAAO,aAAa,IAAI,QAAQ,IACrC,KAAK,aAAa,QAAQ;AAAA,EAChC;AAAA,EACA,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA;AAAA,IAEL,mCAAmC;AAAA,MACjC;AAAA,MACA;AAAA,QACE,gBAAgB;AAAA,QAChB,SAAS,QAAQ,eAAe;AAAA,MAClC;AAAA,IACF;AAAA,IACA,GAAI,cAAc,WAAW,YAAY,QAAQ,IAAI,UAAU,QAAQ;AAAA,IACvE,GAAI,kBACF;AAAA,MACE,wCAAwC;AAAA,MACxC,yCAAyC;AAAA,MACzC,yCAAyC;AAAA,MACzC,0CAA0C;AAAA,MAC1C,uCAAuC;AAAA,MACvC,qCAAqC;AAAA,MACrC,mCAAmC;AAAA,IACrC,IACA,CAAC;AAAA,EACL;AAAA,EACA,GAAI,cAAc,UAAU,cAAc,WACxC;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,eAAe,cAAc,SAAS,cAAc;AAAA,MACtD;AAAA,IACF;AAAA,EACF,IACA,CAAC;AACL;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/prettier/index.ts"],"sourcesContent":["import type { Config as PrettierConfig } from \"prettier\";\nimport type { SortJsonOptions as SortJsonPluginOptions } from \"prettier-plugin-sort-json\";\nimport type { PluginOptions as TailwindPluginOptions } from \"prettier-plugin-tailwindcss\";\n\nimport { isObject, isString } from \"../utils/is-type.js\";\n\nexport interface PrettierConfigOptions extends PrettierConfig {\n cssOrderPlugin?: boolean;\n curlyPlugin?: boolean;\n jsonSortPlugin?: boolean | SortJsonPluginOptions;\n packageJsonPlugin?: boolean;\n tailwindPlugin?: boolean | string | TailwindPluginOptions;\n}\n\nexport interface PrettierConfigWithPlugins\n extends PrettierConfig,\n SortJsonPluginOptions,\n TailwindPluginOptions {}\n\n/**\n * Creates a Prettier configuration object with optional Tailwind support\n *\n * @param options - Configuration options for Prettier\n * @param options.cssOrderPlugin CSS order sorting support\n * @param options.curlyPlugin Enforce curly braces for all control statements\n * @param options.jsonSortPlugin JSON sorting support\n * @param options.packageJsonPlugin Package.json sorting support\n * @param options.tailwindPlugin Tailwind CSS formatting support\n * @returns Prettier configuration object with:\n * - Default Prettier configuration\n * - Experimental ternaries enabled\n * - CSS order plugin\n * - Curly braces plugin\n * - JSON sorting plugin\n * - Package.json sorting plugin\n * - Optional Tailwind plugin and functions\n */\nexport const prettierConfig = (\n options: PrettierConfigOptions = {},\n): PrettierConfigWithPlugins => {\n const {\n cssOrderPlugin = true,\n curlyPlugin = true,\n jsonSortPlugin = true,\n packageJsonPlugin = true,\n tailwindPlugin = false,\n ...rest\n } = options;\n\n const plugins: string[] = [];\n const config: PrettierConfigWithPlugins = {\n experimentalTernaries: true,\n ...rest,\n };\n\n if (cssOrderPlugin) {\n plugins.push(\"prettier-plugin-css-order\");\n }\n\n if (curlyPlugin) {\n plugins.push(\"prettier-plugin-curly\");\n }\n\n if (jsonSortPlugin) {\n plugins.push(\"prettier-plugin-sort-json\");\n\n if (isObject(jsonSortPlugin)) {\n Object.assign(config, jsonSortPlugin);\n } else {\n config.jsonRecursiveSort = true;\n }\n }\n\n if (packageJsonPlugin) {\n plugins.push(\"prettier-plugin-packagejson\");\n }\n\n if (tailwindPlugin) {\n plugins.push(\"prettier-plugin-tailwindcss\");\n const defaultTailwindFunctions = [\"clsx\", \"cva\", \"cn\"];\n\n if (isString(tailwindPlugin)) {\n // then it's the path to the stylesheet\n config.tailwindStylesheet = tailwindPlugin;\n config.tailwindFunctions = defaultTailwindFunctions;\n } else if (isObject(tailwindPlugin)) {\n Object.assign(config, tailwindPlugin);\n\n // Ensure defaultTailwindFunctions is applied if tailwindFunctions wasn't specified\n if (!tailwindPlugin.tailwindFunctions) {\n config.tailwindFunctions = defaultTailwindFunctions;\n }\n } else {\n config.tailwindFunctions = defaultTailwindFunctions;\n }\n }\n\n // Set plugins after all configurations are done\n config.plugins = plugins;\n\n return config;\n};\n"],"mappings":";;;;;;AAqCO,IAAM,iBAAiB,CAC5B,UAAiC,CAAC,MACJ;AAC9B,QAAM;AAAA,IACJ,iBAAiB;AAAA,IACjB,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,oBAAoB;AAAA,IACpB,iBAAiB;AAAA,IACjB,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,UAAoB,CAAC;AAC3B,QAAM,SAAoC;AAAA,IACxC,uBAAuB;AAAA,IACvB,GAAG;AAAA,EACL;AAEA,MAAI,gBAAgB;AAClB,YAAQ,KAAK,2BAA2B;AAAA,EAC1C;AAEA,MAAI,aAAa;AACf,YAAQ,KAAK,uBAAuB;AAAA,EACtC;AAEA,MAAI,gBAAgB;AAClB,YAAQ,KAAK,2BAA2B;AAExC,QAAI,SAAS,cAAc,GAAG;AAC5B,aAAO,OAAO,QAAQ,cAAc;AAAA,IACtC,OAAO;AACL,aAAO,oBAAoB;AAAA,IAC7B;AAAA,EACF;AAEA,MAAI,mBAAmB;AACrB,YAAQ,KAAK,6BAA6B;AAAA,EAC5C;AAEA,MAAI,gBAAgB;AAClB,YAAQ,KAAK,6BAA6B;AAC1C,UAAM,2BAA2B,CAAC,QAAQ,OAAO,IAAI;AAErD,QAAI,SAAS,cAAc,GAAG;AAE5B,aAAO,qBAAqB;AAC5B,aAAO,oBAAoB;AAAA,IAC7B,WAAW,SAAS,cAAc,GAAG;AACnC,aAAO,OAAO,QAAQ,cAAc;AAGpC,UAAI,CAAC,eAAe,mBAAmB;AACrC,eAAO,oBAAoB;AAAA,MAC7B;AAAA,IACF,OAAO;AACL,aAAO,oBAAoB;AAAA,IAC7B;AAAA,EACF;AAGA,SAAO,UAAU;AAEjB,SAAO;AACT;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/base/rules.ts"],"sourcesContent":["import type { FunctionStyle } from \"../types.js\";\nimport type { BaseRules } from \"./types.js\";\n\n/**\n * Generates the base set of ESLint rules with configurable function style enforcement.\n *\n * @param functionStyle - Controls how functions should be written. Can be:\n * - \"off\": Disables function style enforcement\n * - \"arrow\": Enforces arrow function expressions\n * - \"declaration\": Enforces function declarations\n * - \"expression\": Enforces function expressions\n * @returns An object containing ESLint rule configurations\n */\nexport const baseEslintRules = (\n functionStyle: \"off\" | FunctionStyle,\n): BaseRules => ({\n /**\n * Require return statements in array methods callbacks.\n *\n * 🚫 Not fixable -https://eslint.org/docs/rules/array-callback-return\n */\n \"array-callback-return\": [\n \"warn\",\n { allowImplicit: true, checkForEach: true },\n ],\n /**\n * Treat `var` statements as if they were block scoped.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var\n */\n \"block-scoped-var\": \"warn\",\n /**\n * Require camel case names.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/camelcase\n */\n camelcase: [\n \"warn\",\n {\n allow: [\"^UNSAFE_\"],\n ignoreDestructuring: false,\n ignoreImports: true,\n properties: \"never\",\n },\n ],\n /**\n * Require curly braces for multiline blocks.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/curly\n */\n curly: [\"warn\", \"multi-line\"],\n /**\n * Require default clauses in switch statements to be last (if used).\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last\n */\n \"default-case-last\": \"warn\",\n /**\n * Require triple equals (`===` and `!==`).\n *å\n * 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq\n */\n eqeqeq: \"warn\",\n \"for-direction\": \"warn\",\n /**\n * Require function expressions to have a name.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/func-names\n */\n \"func-names\": [\"warn\", \"as-needed\"],\n \"func-style\":\n // if arrow function, we use the prefer-arrow-functions plugin\n functionStyle === \"off\" || functionStyle === \"arrow\" ?\n \"off\"\n : [\"warn\", functionStyle, { allowArrowFunctions: true }],\n /**\n * Require grouped accessor pairs in object literals and classes.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs\n */\n \"grouped-accessor-pairs\": \"warn\",\n /**\n * Require a capital letter for constructors.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/new-cap\n */\n \"new-cap\": [\"warn\", { capIsNew: false }],\n /**\n * Disallow use of `alert()`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-alert\n */\n \"no-alert\": \"warn\",\n \"no-async-promise-executor\": \"warn\",\n /**\n * Disallow use of bitwise operators.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-bitwise\n */\n \"no-bitwise\": \"warn\",\n /**\n * Disallow use of `caller`/`callee`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-caller\n */\n \"no-caller\": \"warn\",\n \"no-case-declarations\": \"warn\",\n \"no-compare-neg-zero\": \"warn\",\n \"no-cond-assign\": \"warn\",\n /**\n * Disallow the use of console.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-console\n */\n \"no-console\": [\"warn\", { allow: [\"info\", \"warn\", \"error\"] }],\n /**\n * Disallow expressions where the operation doesn't affect the value.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-console\n */\n \"no-constant-binary-expression\": \"warn\",\n \"no-constant-condition\": \"warn\",\n /**\n * Disallow returning value in constructor.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return\n */\n \"no-constructor-return\": \"warn\",\n \"no-control-regex\": \"warn\",\n \"no-debugger\": \"warn\",\n \"no-delete-var\": \"warn\",\n \"no-dupe-else-if\": \"warn\",\n \"no-duplicate-case\": \"warn\",\n /**\n * Disallow using an `else` if the `if` block contains a return.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-else-return\n */\n \"no-else-return\": \"warn\",\n \"no-empty\": \"warn\",\n \"no-empty-character-class\": \"warn\",\n \"no-empty-pattern\": \"warn\",\n \"no-empty-static-block\": \"warn\",\n /**\n * Disallow `eval()`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-eval\n */\n \"no-eval\": \"warn\",\n \"no-ex-assign\": \"warn\",\n /**\n * Disallow extending native objects.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native\n */\n \"no-extend-native\": \"warn\",\n /**\n * Disallow unnecessary function binding.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind\n */\n \"no-extra-bind\": \"warn\",\n \"no-extra-boolean-cast\": \"warn\",\n /**\n * Disallow unnecessary labels.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label\n */\n \"no-extra-label\": \"warn\",\n \"no-fallthrough\": \"warn\",\n \"no-global-assign\": \"warn\",\n /**\n * Make people convert types explicitly e.g. `Boolean(foo)` instead of `!!foo`.\n *\n * 🔧 Partially Fixable - https://eslint.org/docs/rules/no-implicit-coercion\n */\n \"no-implicit-coercion\": \"warn\",\n \"no-invalid-regexp\": \"warn\",\n \"no-irregular-whitespace\": \"warn\",\n /**\n * Disallow usage of `__iterator__` property.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator\n */\n \"no-iterator\": \"warn\",\n /**\n * Disallow labels that share a name with a variable.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-label-var\n */\n \"no-label-var\": \"warn\",\n /**\n * Disallow use of labels for anything other than loops and switches.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-labels\n */\n \"no-labels\": [\"warn\"],\n /**\n * Disallow unnecessary nested blocks.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks\n */\n \"no-lone-blocks\": \"warn\",\n /**\n * Disallow if as the only statement in an else block.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-lonely-if\n */\n \"no-lonely-if\": \"warn\",\n \"no-loss-of-precision\": \"warn\",\n \"no-misleading-character-class\": \"warn\",\n /**\n * Disallow use of chained assignment expressions.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-multi-assign\n */\n \"no-multi-assign\": [\"warn\"],\n /**\n * Disallow nested ternary expressions.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-nested-ternary\n */\n \"no-nested-ternary\": \"warn\",\n /**\n * Disallow `new` for side effects.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-new\n */\n \"no-new\": \"warn\",\n /**\n * Disallow function constructors.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func\n */\n \"no-new-func\": \"warn\",\n /**\n * Disallow primitive wrapper instances, such as `new String('foo')`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers\n */\n \"no-new-wrappers\": \"warn\",\n \"no-nonoctal-decimal-escape\": \"warn\",\n \"no-octal\": \"warn\",\n /**\n * Disallow use of octal escape sequences in string literals.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape\n */\n \"no-octal-escape\": \"warn\",\n /**\n * Disallow reassignment of function parameters.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign\n */\n \"no-param-reassign\": \"warn\",\n /**\n * Disallow returning values from Promise executor functions.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-promise-executor-return\n */\n \"no-promise-executor-return\": \"warn\",\n /**\n * Disallow usage of the deprecated `__proto__` property.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-proto\n */\n \"no-proto\": \"warn\",\n \"no-prototype-builtins\": \"warn\",\n \"no-regex-spaces\": \"warn\",\n /**\n * Disallow assignment in `return` statement.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign\n */\n \"no-return-assign\": \"warn\",\n /**\n * Disallow use of `javascript:` urls.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url\n */\n \"no-script-url\": \"warn\",\n \"no-self-assign\": \"warn\",\n /**\n * Disallow comparisons where both sides are exactly the same.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare\n */\n \"no-self-compare\": \"warn\",\n /**\n * Disallow use of comma operator.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences\n */\n \"no-sequences\": \"warn\",\n \"no-shadow-restricted-names\": \"warn\",\n \"no-sparse-arrays\": \"warn\",\n /**\n * Disallow template literal placeholder syntax in regular strings, as\n * these are likely errors.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-template-curly-in-string\n */\n \"no-template-curly-in-string\": \"warn\",\n /**\n * Disallow initializing variables to `undefined`.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-undef-init\n */\n \"no-undef-init\": \"warn\",\n \"no-unexpected-multiline\": \"warn\",\n /**\n * Disallow ternary operators when simpler alternatives exist.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-unneeded-ternary\n */\n \"no-unneeded-ternary\": \"warn\",\n /**\n * Disallow loops with a body that allows only one iteration.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-unreachable-loop\n */\n \"no-unreachable-loop\": \"warn\",\n \"no-unsafe-finally\": \"warn\",\n \"no-unsafe-optional-chaining\": \"warn\",\n \"no-unused-labels\": \"warn\",\n \"no-unused-private-class-members\": \"warn\",\n \"no-useless-backreference\": \"warn\",\n /**\n * Disallow unnecessary `.call()` and `.apply()`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call\n */\n \"no-useless-call\": \"warn\",\n \"no-useless-catch\": \"warn\",\n /**\n * Disallow useless computed property keys.\n *\n * � Fixable - https://eslint.org/docs/rules/no-useless-computed-key\n */\n \"no-useless-computed-key\": \"warn\",\n /**\n * Disallow unnecessary concatenation of strings.\n *\n * � Not fixable - https://eslint.org/docs/rules/no-useless-concat\n */\n \"no-useless-concat\": \"warn\",\n \"no-useless-escape\": \"warn\",\n /**\n * Disallow renaming import, export, and destructured assignments to the\n * same name.\n *\n * � Fixable - https://eslint.org/docs/rules/no-useless-rename\n */\n \"no-useless-rename\": \"warn\",\n /**\n * Disallow redundant return statements.\n *\n * � Fixable - https://eslint.org/docs/rules/no-useless-return\n */\n \"no-useless-return\": \"warn\",\n /**\n * Require `let` or `const` instead of `var`.\n * ts transpiles let/const to var, so no need for vars any more\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-var\n */\n \"no-var\": \"warn\",\n \"no-with\": \"warn\",\n /**\n * Require object literal shorthand syntax.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/object-shorthand\n */\n \"object-shorthand\": \"warn\",\n /**\n * Require default to `const` instead of `let`.\n * ts provides better types with const\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-const\n */\n \"prefer-const\": \"warn\",\n /**\n * Require using named capture groups in regular expressions.\n *\n * � Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group\n */\n \"prefer-named-capture-group\": \"warn\",\n /**\n * Disallow parseInt() in favor of binary, octal, and hexadecimal literals.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-numeric-literals\n */\n \"prefer-numeric-literals\": \"warn\",\n /**\n * Require use of an object spread over Object.assign.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-object-spread\n */\n \"prefer-object-spread\": \"warn\",\n /**\n * Disallow use of the RegExp constructor in favor of regular expression\n * literals.\n *\n * � Not fixable - https://eslint.org/docs/rules/prefer-regex-literals\n */\n \"prefer-regex-literals\": \"warn\",\n /**\n * Require using rest parameters instead of `arguments`.\n * ts provides better types with rest args over arguments\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-rest-params\n */\n \"prefer-rest-params\": \"warn\",\n /**\n * Require using spread syntax instead of `.apply()`.\n * ts transpiles spread to apply, so no need for manual apply\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-spread\n */\n \"prefer-spread\": \"warn\",\n /**\n * Require using template literals instead of string concatenation.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-template\n */\n \"prefer-template\": \"warn\",\n \"require-yield\": \"warn\",\n /**\n * Require a `Symbol` description.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/symbol-description\n */\n \"symbol-description\": \"warn\",\n \"use-isnan\": \"warn\",\n \"valid-typeof\": \"warn\",\n /**\n * Disallow \"Yoda conditions\", ensuring the comparison.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/yoda\n */\n yoda: \"warn\",\n});\n"],"mappings":";AAaO,IAAM,kBAAkB,CAC7B,mBACe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMf,yBAAyB;AAAA,IACvB;AAAA,IACA,EAAE,eAAe,MAAM,cAAc,KAAK;AAAA,EAC5C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,WAAW;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO,CAAC,UAAU;AAAA,MAClB,qBAAqB;AAAA,MACrB,eAAe;AAAA,MACf,YAAY;AAAA,IACd;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OAAO,CAAC,QAAQ,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM5B,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrB,QAAQ;AAAA,EACR,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,cAAc,CAAC,QAAQ,WAAW;AAAA,EAClC;AAAA;AAAA,IAEE,kBAAkB,SAAS,kBAAkB,UAC3C,QACA,CAAC,QAAQ,eAAe,EAAE,qBAAqB,KAAK,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzD,0BAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1B,WAAW,CAAC,QAAQ,EAAE,UAAU,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvC,YAAY;AAAA,EACZ,6BAA6B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM7B,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMd,aAAa;AAAA,EACb,wBAAwB;AAAA,EACxB,uBAAuB;AAAA,EACvB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMlB,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,QAAQ,OAAO,EAAE,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3D,iCAAiC;AAAA,EACjC,yBAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzB,yBAAyB;AAAA,EACzB,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrB,kBAAkB;AAAA,EAClB,YAAY;AAAA,EACZ,4BAA4B;AAAA,EAC5B,oBAAoB;AAAA,EACpB,yBAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzB,WAAW;AAAA,EACX,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,iBAAiB;AAAA,EACjB,yBAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,wBAAwB;AAAA,EACxB,qBAAqB;AAAA,EACrB,2BAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3B,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMf,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhB,aAAa,CAAC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMlB,gBAAgB;AAAA,EAChB,wBAAwB;AAAA,EACxB,iCAAiC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjC,mBAAmB,CAAC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1B,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMV,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMf,mBAAmB;AAAA,EACnB,8BAA8B;AAAA,EAC9B,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMZ,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMnB,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrB,8BAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM9B,YAAY;AAAA,EACZ,yBAAyB;AAAA,EACzB,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMnB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMlB,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMnB,gBAAgB;AAAA,EAChB,8BAA8B;AAAA,EAC9B,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOpB,+BAA+B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM/B,iBAAiB;AAAA,EACjB,2BAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3B,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvB,uBAAuB;AAAA,EACvB,qBAAqB;AAAA,EACrB,+BAA+B;AAAA,EAC/B,oBAAoB;AAAA,EACpB,mCAAmC;AAAA,EACnC,4BAA4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM5B,mBAAmB;AAAA,EACnB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,2BAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3B,qBAAqB;AAAA,EACrB,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOrB,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrB,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOrB,UAAU;AAAA,EACV,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMX,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOpB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhB,8BAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM9B,2BAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3B,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOxB,yBAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOzB,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOtB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,sBAAsB;AAAA,EACtB,aAAa;AAAA,EACb,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhB,MAAM;AACR;","names":[]}
@@ -1,91 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (let key of __getOwnPropNames(from))
11
- if (!__hasOwnProp.call(to, key) && key !== except)
12
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- }
14
- return to;
15
- };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
- // If the importer is in node compatibility mode or this is not an ESM
18
- // file that has been converted to a CommonJS file using a Babel-
19
- // compatible transform (i.e. "__esModule" has not been set), then set
20
- // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
- mod
23
- ));
24
-
25
- // scripts/postinstall.js
26
- var fs = __toESM(require("fs"), 1);
27
- var path = __toESM(require("path"), 1);
28
- var patchPrettierPluginTailwindcss = () => {
29
- try {
30
- console.info("js-style-kit: Starting postinstall patch...");
31
- let pluginPath;
32
- const rootPath = path.join(
33
- "node_modules",
34
- "prettier-plugin-tailwindcss",
35
- "dist",
36
- "index.d.ts"
37
- );
38
- const packagePath = path.join(
39
- __dirname,
40
- "..",
41
- "..",
42
- "prettier-plugin-tailwindcss",
43
- "dist",
44
- "index.d.ts"
45
- );
46
- if (fs.existsSync(rootPath)) {
47
- pluginPath = rootPath;
48
- } else if (fs.existsSync(packagePath)) {
49
- pluginPath = packagePath;
50
- } else {
51
- console.warn(
52
- "js-style-kit: prettier-plugin-tailwindcss not found, skipping patch"
53
- );
54
- return;
55
- }
56
- console.info(`js-style-kit: Found plugin at ${pluginPath}`);
57
- const backupPath = `${pluginPath}.backup`;
58
- if (!fs.existsSync(backupPath)) {
59
- fs.writeFileSync(backupPath, fs.readFileSync(pluginPath, "utf8"));
60
- console.info("js-style-kit: Created backup of original declaration file");
61
- }
62
- const content = fs.readFileSync(pluginPath, "utf8");
63
- const declareBlock = `declare module 'prettier' {
64
- interface RequiredOptions extends PluginOptions {
65
- }
66
- interface ParserOptions extends PluginOptions {
67
- }
68
- }`;
69
- const patchedContent = content.replace(
70
- declareBlock,
71
- "// Removed unsafe declare module statement"
72
- );
73
- if (content !== patchedContent) {
74
- fs.writeFileSync(pluginPath, patchedContent);
75
- console.info(
76
- "js-style-kit: Successfully patched prettier-plugin-tailwindcss declaration file"
77
- );
78
- } else {
79
- console.info(
80
- "js-style-kit: No patching needed, declaration block not found or already patched"
81
- );
82
- }
83
- } catch (error) {
84
- console.error(
85
- "js-style-kit: Error patching prettier-plugin-tailwindcss:",
86
- error
87
- );
88
- }
89
- };
90
- patchPrettierPluginTailwindcss();
91
- //# sourceMappingURL=postinstall.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../scripts/postinstall.js"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n\n/**\n * Patch the declaration file of prettier-plugin-tailwindcss to remove the unsafe declare statement\n */\nconst patchPrettierPluginTailwindcss = () => {\n try {\n console.info(\"js-style-kit: Starting postinstall patch...\");\n\n // Find the location of prettier-plugin-tailwindcss\n // This will work regardless of where js-style-kit is installed\n let pluginPath;\n\n // First try from the project root\n const rootPath = path.join(\n \"node_modules\",\n \"prettier-plugin-tailwindcss\",\n \"dist\",\n \"index.d.ts\",\n );\n\n // Then try from js-style-kit's directory\n const packagePath = path.join(\n __dirname,\n \"..\",\n \"..\",\n \"prettier-plugin-tailwindcss\",\n \"dist\",\n \"index.d.ts\",\n );\n\n // Choose the path that exists\n if (fs.existsSync(rootPath)) {\n pluginPath = rootPath;\n } else if (fs.existsSync(packagePath)) {\n pluginPath = packagePath;\n } else {\n console.warn(\n \"js-style-kit: prettier-plugin-tailwindcss not found, skipping patch\",\n );\n return;\n }\n\n console.info(`js-style-kit: Found plugin at ${pluginPath}`);\n\n // Create backup of original file if it doesn't exist already\n const backupPath = `${pluginPath}.backup`;\n if (!fs.existsSync(backupPath)) {\n fs.writeFileSync(backupPath, fs.readFileSync(pluginPath, \"utf8\"));\n console.info(\"js-style-kit: Created backup of original declaration file\");\n }\n\n // Read the file\n const content = fs.readFileSync(pluginPath, \"utf8\");\n\n // The exact declare statement to remove\n const declareBlock = `declare module 'prettier' {\n interface RequiredOptions extends PluginOptions {\n }\n interface ParserOptions extends PluginOptions {\n }\n}`;\n\n // Replace the declare block with a comment\n const patchedContent = content.replace(\n declareBlock,\n \"// Removed unsafe declare module statement\",\n );\n\n // Only write if content has changed\n if (content !== patchedContent) {\n // Write the patched file back\n fs.writeFileSync(pluginPath, patchedContent);\n console.info(\n \"js-style-kit: Successfully patched prettier-plugin-tailwindcss declaration file\",\n );\n } else {\n console.info(\n \"js-style-kit: No patching needed, declaration block not found or already patched\",\n );\n }\n } catch (error) {\n console.error(\n \"js-style-kit: Error patching prettier-plugin-tailwindcss:\",\n error,\n );\n }\n};\n\n// Run the patch function\npatchPrettierPluginTailwindcss();\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAoB;AACpB,WAAsB;AAKtB,IAAM,iCAAiC,MAAM;AAC3C,MAAI;AACF,YAAQ,KAAK,6CAA6C;AAI1D,QAAI;AAGJ,UAAM,WAAgB;AAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAGA,UAAM,cAAmB;AAAA,MACvB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAGA,QAAO,cAAW,QAAQ,GAAG;AAC3B,mBAAa;AAAA,IACf,WAAc,cAAW,WAAW,GAAG;AACrC,mBAAa;AAAA,IACf,OAAO;AACL,cAAQ;AAAA,QACN;AAAA,MACF;AACA;AAAA,IACF;AAEA,YAAQ,KAAK,iCAAiC,UAAU,EAAE;AAG1D,UAAM,aAAa,GAAG,UAAU;AAChC,QAAI,CAAI,cAAW,UAAU,GAAG;AAC9B,MAAG,iBAAc,YAAe,gBAAa,YAAY,MAAM,CAAC;AAChE,cAAQ,KAAK,2DAA2D;AAAA,IAC1E;AAGA,UAAM,UAAa,gBAAa,YAAY,MAAM;AAGlD,UAAM,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAQrB,UAAM,iBAAiB,QAAQ;AAAA,MAC7B;AAAA,MACA;AAAA,IACF;AAGA,QAAI,YAAY,gBAAgB;AAE9B,MAAG,iBAAc,YAAY,cAAc;AAC3C,cAAQ;AAAA,QACN;AAAA,MACF;AAAA,IACF,OAAO;AACL,cAAQ;AAAA,QACN;AAAA,MACF;AAAA,IACF;AAAA,EACF,SAAS,OAAO;AACd,YAAQ;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAGA,+BAA+B;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../scripts/postinstall.js"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n\n/**\n * Patch the declaration file of prettier-plugin-tailwindcss to remove the unsafe declare statement\n */\nconst patchPrettierPluginTailwindcss = () => {\n try {\n console.info(\"js-style-kit: Starting postinstall patch...\");\n\n // Find the location of prettier-plugin-tailwindcss\n // This will work regardless of where js-style-kit is installed\n let pluginPath;\n\n // First try from the project root\n const rootPath = path.join(\n \"node_modules\",\n \"prettier-plugin-tailwindcss\",\n \"dist\",\n \"index.d.ts\",\n );\n\n // Then try from js-style-kit's directory\n const packagePath = path.join(\n __dirname,\n \"..\",\n \"..\",\n \"prettier-plugin-tailwindcss\",\n \"dist\",\n \"index.d.ts\",\n );\n\n // Choose the path that exists\n if (fs.existsSync(rootPath)) {\n pluginPath = rootPath;\n } else if (fs.existsSync(packagePath)) {\n pluginPath = packagePath;\n } else {\n console.warn(\n \"js-style-kit: prettier-plugin-tailwindcss not found, skipping patch\",\n );\n return;\n }\n\n console.info(`js-style-kit: Found plugin at ${pluginPath}`);\n\n // Create backup of original file if it doesn't exist already\n const backupPath = `${pluginPath}.backup`;\n if (!fs.existsSync(backupPath)) {\n fs.writeFileSync(backupPath, fs.readFileSync(pluginPath, \"utf8\"));\n console.info(\"js-style-kit: Created backup of original declaration file\");\n }\n\n // Read the file\n const content = fs.readFileSync(pluginPath, \"utf8\");\n\n // The exact declare statement to remove\n const declareBlock = `declare module 'prettier' {\n interface RequiredOptions extends PluginOptions {\n }\n interface ParserOptions extends PluginOptions {\n }\n}`;\n\n // Replace the declare block with a comment\n const patchedContent = content.replace(\n declareBlock,\n \"// Removed unsafe declare module statement\",\n );\n\n // Only write if content has changed\n if (content !== patchedContent) {\n // Write the patched file back\n fs.writeFileSync(pluginPath, patchedContent);\n console.info(\n \"js-style-kit: Successfully patched prettier-plugin-tailwindcss declaration file\",\n );\n } else {\n console.info(\n \"js-style-kit: No patching needed, declaration block not found or already patched\",\n );\n }\n } catch (error) {\n console.error(\n \"js-style-kit: Error patching prettier-plugin-tailwindcss:\",\n error,\n );\n }\n};\n\n// Run the patch function\npatchPrettierPluginTailwindcss();\n"],"mappings":";AAAA,YAAY,QAAQ;AACpB,YAAY,UAAU;AAKtB,IAAM,iCAAiC,MAAM;AAC3C,MAAI;AACF,YAAQ,KAAK,6CAA6C;AAI1D,QAAI;AAGJ,UAAM,WAAgB;AAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAGA,UAAM,cAAmB;AAAA,MACvB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAGA,QAAO,cAAW,QAAQ,GAAG;AAC3B,mBAAa;AAAA,IACf,WAAc,cAAW,WAAW,GAAG;AACrC,mBAAa;AAAA,IACf,OAAO;AACL,cAAQ;AAAA,QACN;AAAA,MACF;AACA;AAAA,IACF;AAEA,YAAQ,KAAK,iCAAiC,UAAU,EAAE;AAG1D,UAAM,aAAa,GAAG,UAAU;AAChC,QAAI,CAAI,cAAW,UAAU,GAAG;AAC9B,MAAG,iBAAc,YAAe,gBAAa,YAAY,MAAM,CAAC;AAChE,cAAQ,KAAK,2DAA2D;AAAA,IAC1E;AAGA,UAAM,UAAa,gBAAa,YAAY,MAAM;AAGlD,UAAM,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAQrB,UAAM,iBAAiB,QAAQ;AAAA,MAC7B;AAAA,MACA;AAAA,IACF;AAGA,QAAI,YAAY,gBAAgB;AAE9B,MAAG,iBAAc,YAAY,cAAc;AAC3C,cAAQ;AAAA,QACN;AAAA,MACF;AAAA,IACF,OAAO;AACL,cAAQ;AAAA,QACN;AAAA,MACF;AAAA,IACF;AAAA,EACF,SAAS,OAAO;AACd,YAAQ;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAGA,+BAA+B;","names":[]}