@solvro/config 2.0.7 → 2.1.1

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 (39) hide show
  1. package/dist/{adonis-GN4AQKAU.js → adonis-TD3FMQKC.js} +5 -5
  2. package/dist/adonis-TD3FMQKC.js.map +1 -0
  3. package/dist/{chunk-LNSDT6IT.js → chunk-DPDE52KB.js} +2 -2
  4. package/dist/chunk-DPDE52KB.js.map +1 -0
  5. package/dist/{chunk-VMUJRX4H.js → chunk-GO7SIG7Y.js} +1 -1
  6. package/dist/chunk-GO7SIG7Y.js.map +1 -0
  7. package/dist/{chunk-VXVVMPZI.js → chunk-NCPWMNFM.js} +2 -2
  8. package/dist/chunk-NCPWMNFM.js.map +1 -0
  9. package/dist/{chunk-SUGOLX7X.js → chunk-YZ6XWZKU.js} +2 -2
  10. package/dist/chunk-YZ6XWZKU.js.map +1 -0
  11. package/dist/cli/index.cjs +70 -55
  12. package/dist/cli/index.cjs.map +1 -1
  13. package/dist/cli/index.js +70 -55
  14. package/dist/cli/index.js.map +1 -1
  15. package/dist/commitlint/index.cjs +1 -1
  16. package/dist/commitlint/index.cjs.map +1 -1
  17. package/dist/commitlint/index.js +1 -1
  18. package/dist/commitlint/index.js.map +1 -1
  19. package/dist/eslint/index.cjs +4 -3
  20. package/dist/eslint/index.cjs.map +1 -1
  21. package/dist/eslint/index.d.cts +2 -3
  22. package/dist/eslint/index.d.ts +2 -3
  23. package/dist/eslint/index.js +7 -7
  24. package/dist/eslint/index.js.map +1 -1
  25. package/dist/{nestjs-SVXAEFXN.js → nestjs-2STKSA5M.js} +5 -5
  26. package/dist/nestjs-2STKSA5M.js.map +1 -0
  27. package/dist/{node-LOZFNKBL.js → node-6FQFMXKP.js} +5 -5
  28. package/dist/node-6FQFMXKP.js.map +1 -0
  29. package/dist/{react-CM27K2YV.js → react-ZVTTVRVH.js} +5 -4
  30. package/dist/react-ZVTTVRVH.js.map +1 -0
  31. package/package.json +51 -47
  32. package/dist/adonis-GN4AQKAU.js.map +0 -1
  33. package/dist/chunk-LNSDT6IT.js.map +0 -1
  34. package/dist/chunk-SUGOLX7X.js.map +0 -1
  35. package/dist/chunk-VMUJRX4H.js.map +0 -1
  36. package/dist/chunk-VXVVMPZI.js.map +0 -1
  37. package/dist/nestjs-SVXAEFXN.js.map +0 -1
  38. package/dist/node-LOZFNKBL.js.map +0 -1
  39. package/dist/react-CM27K2YV.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  typescriptStrict,
3
3
  unicorn
4
- } from "./chunk-VXVVMPZI.js";
4
+ } from "./chunk-NCPWMNFM.js";
5
5
  import {
6
6
  imports
7
- } from "./chunk-LNSDT6IT.js";
8
- import "./chunk-VMUJRX4H.js";
7
+ } from "./chunk-DPDE52KB.js";
8
+ import "./chunk-GO7SIG7Y.js";
9
9
 
10
10
  // src/eslint/configs/a11y.ts
11
11
  import jsxA11y from "eslint-plugin-jsx-a11y";
@@ -64,6 +64,7 @@ async function react() {
64
64
  {
65
65
  name: "solvro/next/setup",
66
66
  plugins: {
67
+ // @ts-expect-error ???
67
68
  "@next/next": nextPlugin
68
69
  },
69
70
  rules: nextPlugin.configs.recommended.rules
@@ -164,4 +165,4 @@ var reactPreset = async () => [
164
165
  export {
165
166
  reactPreset
166
167
  };
167
- //# sourceMappingURL=react-CM27K2YV.js.map
168
+ //# sourceMappingURL=react-ZVTTVRVH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/eslint/configs/a11y.ts","../src/eslint/configs/react.ts","../src/eslint/presets/react.ts"],"sourcesContent":["import type { ConfigWithExtends } from \"@eslint/config-helpers\";\nimport jsxA11y from \"eslint-plugin-jsx-a11y\";\nimport globals from \"globals\";\n\nexport function a11y(): ConfigWithExtends[] {\n return [\n {\n files: [\"**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}\"],\n ...jsxA11y.flatConfigs.recommended,\n languageOptions: {\n ...jsxA11y.flatConfigs.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n },\n settings: {\n \"jsx-a11y\": {\n components: {\n Input: \"input\",\n Button: \"button\",\n Link: \"a\",\n Label: \"label\",\n Select: \"select\",\n Textarea: \"textarea\",\n },\n attributes: {\n for: [\"htmlFor\", \"for\"],\n },\n },\n },\n },\n ];\n}\n","import type { ConfigWithExtends } from \"@eslint/config-helpers\";\nimport pluginQuery from \"@tanstack/eslint-plugin-query\";\nimport pluginReact from \"eslint-plugin-react\";\nimport pluginReactHooks from \"eslint-plugin-react-hooks\";\nimport pluginReactRefresh from \"eslint-plugin-react-refresh\";\nimport reactYouMightNotNeedAnEffect from \"eslint-plugin-react-you-might-not-need-an-effect\";\nimport { isPackageListedSync } from \"local-pkg\";\n\nconst nextJsPackages = [\"next\"];\nconst vitePackages = [\"vite\"];\n\nexport async function react(): Promise<ConfigWithExtends[]> {\n const isUsingNext = nextJsPackages.some((index) =>\n isPackageListedSync(index),\n );\n const isUsingVite = vitePackages.some((index) => isPackageListedSync(index));\n\n const nextjsConfig: ConfigWithExtends[] = [];\n\n if (isUsingNext) {\n const nextPlugin = await import(\"@next/eslint-plugin-next\").then(\n (d) => d.default,\n );\n\n nextjsConfig.push(\n {\n name: \"solvro/next/setup\",\n plugins: {\n // @ts-expect-error ???\n \"@next/next\": nextPlugin,\n },\n\n rules: nextPlugin.configs.recommended.rules,\n },\n {\n files: [\n \"**/app/**/{page,loading,layout,template,error,not-found,unauthorized,forbidden,default,robots,sitemap}.{js,jsx,ts,tsx}\",\n \"**/pages/**/*.{js,jsx,ts,tsx}\",\n ],\n name: \"solvro/next/pages\",\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n );\n }\n\n const viteConfig: ConfigWithExtends[] = [];\n\n if (isUsingVite) {\n viteConfig.push(pluginReactRefresh.configs.vite);\n }\n\n return [\n {\n name: \"solvro/react/setup\",\n plugins: {\n react: pluginReact,\n\n \"react-hooks\": pluginReactHooks,\n },\n },\n ...nextjsConfig,\n ...viteConfig,\n {\n files: [\"**/*.{js,jsx,mjs,cjs,ts,tsx}\"],\n languageOptions: {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n sourceType: \"module\",\n },\n settings: {\n react: {\n version: \"detect\",\n },\n },\n name: \"solvro/react/rules\",\n rules: {\n ...pluginReact.configs.flat.recommended.rules,\n ...pluginReact.configs.flat[\"jsx-runtime\"].rules,\n \"react/no-danger\": \"warn\",\n \"react/jsx-no-leaked-render\": \"warn\",\n // recommended rules react-hooks\n \"react-hooks/exhaustive-deps\": \"warn\",\n \"react-hooks/rules-of-hooks\": \"error\",\n \"react/jsx-no-useless-fragment\": \"error\",\n \"react/function-component-definition\": [\n \"error\",\n {\n unnamedComponents: \"arrow-function\",\n namedComponents: \"function-declaration\",\n },\n ],\n \"react/hook-use-state\": [\n \"error\",\n {\n allowDestructuredState: true,\n },\n ],\n \"react/no-array-index-key\": \"warn\",\n },\n },\n ...pluginQuery.configs[\"flat/recommended\"],\n reactYouMightNotNeedAnEffect.configs.recommended,\n {\n name: \"solvro/react/disables\",\n files: [\"**/components/ui/*.{jsx,tsx}\"],\n rules: {\n \"react/prop-types\": \"off\",\n \"no-shadow\": \"off\",\n \"@typescript-eslint/no-shadow\": \"off\",\n \"@typescript-eslint/restrict-template-expressions\": \"off\",\n \"unicorn/no-document-cookie\": \"off\",\n \"@typescript-eslint/no-redeclare\": \"off\",\n \"@typescript-eslint/no-deprecated\": \"off\",\n },\n },\n ];\n}\n","import type { ConfigWithExtends } from \"@eslint/config-helpers\";\n\nimport { a11y } from \"../configs/a11y\";\nimport { imports } from \"../configs/imports\";\nimport { react } from \"../configs/react\";\nimport { typescriptStrict } from \"../configs/typescript-strict\";\nimport { unicorn } from \"../configs/unicorn\";\n\nexport const reactPreset = async (): Promise<ConfigWithExtends[]> => [\n ...a11y(),\n ...unicorn(),\n ...typescriptStrict(),\n ...imports({ forbidDefaultExport: true }),\n ...(await react()),\n];\n"],"mappings":";;;;;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AAoB;AAAA,QACpB,aAAa;AAAA,QACb,gCAAgC;AAAA,QAChC,oDAAoD;AAAA,QACpD,8BAA8B;AAAA,QAC9B,mCAAmC;AAAA,QACnC,oCAAoC;AAAA,MACtC;AAAA,IACF;AAAA,EACF;AACF;;;ACjHO,IAAM,cAAc,YAA0C;AAAA,EACnE,GAAG,KAAK;AAAA,EACR,GAAG,QAAQ;AAAA,EACX,GAAG,iBAAiB;AAAA,EACpB,GAAG,QAAQ,EAAE,qBAAqB,KAAK,CAAC;AAAA,EACxC,GAAI,MAAM,MAAM;AAClB;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solvro/config",
3
- "version": "2.0.7",
3
+ "version": "2.1.1",
4
4
  "description": "Solvro's engineering style guide",
5
5
  "keywords": [
6
6
  "eslint",
@@ -52,74 +52,78 @@
52
52
  "test": "vitest run",
53
53
  "test:ui": "vitest --ui",
54
54
  "test:watch": "vitest",
55
- "typecheck": "tsc --noEmit"
55
+ "typecheck": "tsgo --noEmit"
56
56
  },
57
57
  "lint-staged": {
58
58
  "*": "prettier -w --ignore-unknown"
59
59
  },
60
60
  "prettier": "./dist/prettier/index.js",
61
61
  "dependencies": {
62
- "@adonisjs/eslint-config": "^2.1.2",
63
- "@clack/prompts": "^0.11.0",
64
- "@commitlint/config-conventional": "^19.8.1",
65
- "@darraghor/eslint-plugin-nestjs-typed": "^6.7.1",
66
- "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
67
- "@eslint/js": "^9.34.0",
68
- "@tanstack/eslint-plugin-query": "^5.83.1",
69
- "@trivago/prettier-plugin-sort-imports": "^5.2.2",
70
- "@typescript-eslint/eslint-plugin": "^8.41.0",
71
- "commander": "^14.0.0",
72
- "eslint-config-flat-gitignore": "^2.1.0",
62
+ "@adonisjs/eslint-config": "^3.0.0",
63
+ "@clack/prompts": "^1.1.0",
64
+ "@commitlint/config-conventional": "^20.4.3",
65
+ "@darraghor/eslint-plugin-nestjs-typed": "^7.1.26",
66
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
67
+ "@eslint/config-helpers": "^0.4.2",
68
+ "@eslint/js": "^9.37.0",
69
+ "@tanstack/eslint-plugin-query": "^5.91.4",
70
+ "@trivago/prettier-plugin-sort-imports": "^6.0.2",
71
+ "@typescript-eslint/eslint-plugin": "^8.46.0",
72
+ "commander": "^14.0.3",
73
+ "eslint-config-flat-gitignore": "^2.2.1",
73
74
  "eslint-config-prettier": "^10.1.8",
74
- "eslint-plugin-antfu": "^3.1.1",
75
+ "eslint-plugin-antfu": "^3.2.2",
75
76
  "eslint-plugin-import": "^2.32.0",
76
- "eslint-plugin-jsdoc": "^54.1.1",
77
+ "eslint-plugin-jsdoc": "^62.7.1",
77
78
  "eslint-plugin-jsx-a11y": "^6.10.2",
78
- "eslint-plugin-n": "^17.21.3",
79
+ "eslint-plugin-n": "^17.24.0",
79
80
  "eslint-plugin-react": "^7.37.5",
80
- "eslint-plugin-react-hooks": "^5.2.0",
81
- "eslint-plugin-react-refresh": "^0.4.20",
82
- "eslint-plugin-react-you-might-not-need-an-effect": "^0.5.0",
83
- "eslint-plugin-unicorn": "^61.0.2",
84
- "eslint-plugin-unused-imports": "^4.2.0",
85
- "execa": "^9.6.0",
81
+ "eslint-plugin-react-hooks": "^7.0.1",
82
+ "eslint-plugin-react-refresh": "^0.5.2",
83
+ "eslint-plugin-react-you-might-not-need-an-effect": "^0.9.2",
84
+ "eslint-plugin-unicorn": "^63.0.0",
85
+ "eslint-plugin-unused-imports": "^4.4.1",
86
+ "execa": "^9.6.1",
86
87
  "find-up-simple": "^1.0.1",
87
- "globals": "^16.3.0",
88
+ "globals": "^17.4.0",
88
89
  "is-interactive": "^2.0.0",
89
90
  "local-pkg": "^1.1.2",
90
- "package-manager-detector": "^1.3.0",
91
+ "package-manager-detector": "^1.6.0",
91
92
  "picocolors": "^1.1.1",
92
- "prettier-plugin-packagejson": "^2.5.19",
93
- "prettier-plugin-tailwindcss": "^0.6.14",
94
- "semver": "^7.7.2",
95
- "typescript-eslint": "^8.41.0"
93
+ "prettier-plugin-packagejson": "^3.0.2",
94
+ "prettier-plugin-tailwindcss": "^0.7.2",
95
+ "semver": "^7.7.4",
96
+ "typescript-eslint": "^8.56.1"
96
97
  },
97
98
  "devDependencies": {
98
- "@commitlint/cli": "^19.8.1",
99
- "@eslint/config-inspector": "^1.2.0",
100
- "@next/eslint-plugin-next": "^15.5.2",
99
+ "@commitlint/cli": "^20.4.3",
100
+ "@commitlint/types": "^20.4.3",
101
+ "@eslint/config-inspector": "^1.5.0",
102
+ "@next/eslint-plugin-next": "^16.1.6",
101
103
  "@semantic-release/git": "^10.0.1",
102
- "@types/node": "^24.3.0",
103
- "@types/semver": "^7.7.0",
104
- "@vitest/coverage-v8": "^3.2.4",
105
- "@vitest/ui": "^3.2.4",
106
- "eslint": "^9.34.0",
104
+ "@types/node": "^25.3.5",
105
+ "@types/semver": "^7.7.1",
106
+ "@typescript-eslint/utils": "^8.56.1",
107
+ "@typescript/native-preview": "^7.0.0-dev.20251012.1",
108
+ "@vitest/coverage-v8": "^4.0.18",
109
+ "@vitest/ui": "^4.0.18",
110
+ "eslint": "^9.39.4",
107
111
  "husky": "^9.1.7",
108
- "knip": "^5.63.0",
109
- "lint-staged": "^16.1.5",
110
- "pkg-pr-new": "^0.0.59",
111
- "prettier": "^3.6.2",
112
- "semantic-release": "^24.2.7",
113
- "tsup": "^8.5.0",
114
- "tsx": "^4.20.5",
115
- "typescript": "^5.9.2",
116
- "vitest": "^3.2.4"
112
+ "knip": "^5.86.0",
113
+ "lint-staged": "^16.3.2",
114
+ "pkg-pr-new": "^0.0.65",
115
+ "prettier": "^3.8.1",
116
+ "semantic-release": "^25.0.3",
117
+ "tsup": "^8.5.1",
118
+ "tsx": "^4.21.0",
119
+ "typescript": "^5.9.3",
120
+ "vitest": "^4.0.18"
117
121
  },
118
122
  "peerDependencies": {
119
- "@next/eslint-plugin-next": ">=12.3.0 <16.0.0-0",
123
+ "@next/eslint-plugin-next": ">=12.3.0",
120
124
  "eslint": ">=9.0.0 <10.0.0"
121
125
  },
122
- "packageManager": "npm@11.5.2",
126
+ "packageManager": "npm@11.11.0",
123
127
  "engines": {
124
128
  "node": "^20.19.0 || >=22.12.0"
125
129
  },
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/presets/adonis.ts"],"sourcesContent":["import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { configApp } from \"@adonisjs/eslint-config\";\n\nimport { imports } from \"../configs/imports\";\nimport { node } from \"../configs/node\";\n\nexport const adonisPreset = (): ConfigWithExtends[] => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call\n const builtinAdonisConfig: ConfigWithExtends[] = configApp();\n\n return [\n ...builtinAdonisConfig,\n ...node(),\n ...imports(),\n {\n rules: {\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n {\n selector: [\"enum\", \"enumMember\", \"class\", \"interface\", \"typeLike\"],\n format: [\"PascalCase\"],\n leadingUnderscore: \"allow\",\n trailingUnderscore: \"allow\",\n },\n {\n selector: [\n \"classProperty\",\n \"classMethod\",\n \"method\",\n \"variableLike\",\n ],\n format: [\"camelCase\"],\n leadingUnderscore: \"allow\",\n trailingUnderscore: \"allow\",\n },\n {\n selector: \"variable\",\n format: [\"camelCase\", \"UPPER_CASE\", \"PascalCase\"],\n leadingUnderscore: \"allow\",\n trailingUnderscore: \"allow\",\n },\n ],\n },\n },\n ];\n};\n"],"mappings":";;;;;;;;;AAEA,SAAS,iBAAiB;AAKnB,IAAM,eAAe,MAA2B;AAErD,QAAM,sBAA2C,UAAU;AAE3D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG,KAAK;AAAA,IACR,GAAG,QAAQ;AAAA,IACX;AAAA,MACE,OAAO;AAAA,QACL,wCAAwC;AAAA,UACtC;AAAA,UACA;AAAA,YACE,UAAU,CAAC,QAAQ,cAAc,SAAS,aAAa,UAAU;AAAA,YACjE,QAAQ,CAAC,YAAY;AAAA,YACrB,mBAAmB;AAAA,YACnB,oBAAoB;AAAA,UACtB;AAAA,UACA;AAAA,YACE,UAAU;AAAA,cACR;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,YACF;AAAA,YACA,QAAQ,CAAC,WAAW;AAAA,YACpB,mBAAmB;AAAA,YACnB,oBAAoB;AAAA,UACtB;AAAA,UACA;AAAA,YACE,UAAU;AAAA,YACV,QAAQ,CAAC,aAAa,cAAc,YAAY;AAAA,YAChD,mBAAmB;AAAA,YACnB,oBAAoB;AAAA,UACtB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/configs/imports.ts"],"sourcesContent":["import type { Config, ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginAntfu, pluginImport } from \"../plugins\";\n\nconst forbiddenUiLibraries = [\n \"@headlessui/react\",\n \"@mui/material\",\n \"@chakra-ui/react\",\n \"@chakra-ui/core\",\n \"@nextui-org/react\",\n \"react-bootstrap\",\n \"antd\",\n];\n\nexport function imports({\n forbidDefaultExport = true,\n} = {}): ConfigWithExtends[] {\n const config: Config = [\n pluginImport.flatConfigs.typescript,\n {\n name: \"solvro/imports/rules\",\n plugins: {\n antfu: pluginAntfu,\n },\n\n rules: {\n \"antfu/import-dedupe\": \"error\",\n \"antfu/no-import-dist\": \"error\",\n \"antfu/no-import-node-modules-by-path\": \"error\",\n\n ...(pluginImport.flatConfigs.recommended\n .rules as ConfigWithExtends[\"rules\"]),\n \"import/no-dynamic-require\": \"warn\",\n \"import/no-unresolved\": \"off\",\n \"import/consistent-type-specifier-style\": \"warn\",\n \"@typescript-eslint/no-restricted-imports\": [\n \"error\",\n {\n paths: [\n {\n name: \"axios\",\n message: \"Please use fetch instead\",\n },\n ...forbiddenUiLibraries.map((library) => ({\n name: library,\n message: `Please use ui.shadcn.com components instead.`,\n })),\n ],\n },\n ],\n },\n },\n ] satisfies Config;\n\n if (forbidDefaultExport) {\n config.push(\n {\n rules: { \"import/no-default-export\": \"error\" },\n },\n {\n files: [\n \"tsup.config.*\",\n \"eslint.config.*\",\n \".commitlintrc.*\",\n \"knip.*\",\n \"next.config.*\",\n \"commitlint.config.*\",\n \"vite.config.*\",\n \".releaserc.*\",\n \"vitest.config.*\",\n \"postcss.config.*\",\n \"playwright.config.*\",\n ],\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n );\n }\n\n return config;\n}\n"],"mappings":";;;;;;AAIA,IAAM,uBAAuB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,QAAQ;AAAA,EACtB,sBAAsB;AACxB,IAAI,CAAC,GAAwB;AAC3B,QAAM,SAAiB;AAAA,IACrBA,SAAa,YAAY;AAAA,IACzB;AAAA,MACE,MAAM;AAAA,MACN,SAAS;AAAA,QACP,OAAOA;AAAA,MACT;AAAA,MAEA,OAAO;AAAA,QACL,uBAAuB;AAAA,QACvB,wBAAwB;AAAA,QACxB,wCAAwC;AAAA,QAExC,GAAIA,SAAa,YAAY,YAC1B;AAAA,QACH,6BAA6B;AAAA,QAC7B,wBAAwB;AAAA,QACxB,0CAA0C;AAAA,QAC1C,4CAA4C;AAAA,UAC1C;AAAA,UACA;AAAA,YACE,OAAO;AAAA,cACL;AAAA,gBACE,MAAM;AAAA,gBACN,SAAS;AAAA,cACX;AAAA,cACA,GAAG,qBAAqB,IAAI,CAAC,aAAa;AAAA,gBACxC,MAAM;AAAA,gBACN,SAAS;AAAA,cACX,EAAE;AAAA,YACJ;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,MAAI,qBAAqB;AACvB,WAAO;AAAA,MACL;AAAA,QACE,OAAO,EAAE,4BAA4B,QAAQ;AAAA,MAC/C;AAAA,MACA;AAAA,QACE,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,OAAO;AAAA,UACL,4BAA4B;AAAA,QAC9B;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;","names":["default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/configs/node.ts"],"sourcesContent":["import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginNode } from \"../plugins\";\n\nexport function node(): ConfigWithExtends[] {\n return [\n {\n name: \"solvro/node/rules\",\n plugins: {\n node: pluginNode,\n },\n rules: {\n \"node/handle-callback-err\": [\"error\", \"^(err|error)$\"],\n \"node/no-deprecated-api\": \"error\",\n \"node/no-exports-assign\": \"error\",\n \"node/no-new-require\": \"error\",\n \"node/no-path-concat\": \"error\",\n \"node/prefer-global/buffer\": [\"error\"],\n \"node/prefer-global/process\": [\"error\"],\n \"node/process-exit-as-throw\": \"error\",\n },\n },\n ];\n}\n"],"mappings":";;;;;AAIO,SAAS,OAA4B;AAC1C,SAAO;AAAA,IACL;AAAA,MACE,MAAM;AAAA,MACN,SAAS;AAAA,QACP,MAAMA;AAAA,MACR;AAAA,MACA,OAAO;AAAA,QACL,4BAA4B,CAAC,SAAS,eAAe;AAAA,QACrD,0BAA0B;AAAA,QAC1B,0BAA0B;AAAA,QAC1B,uBAAuB;AAAA,QACvB,uBAAuB;AAAA,QACvB,6BAA6B,CAAC,OAAO;AAAA,QACrC,8BAA8B,CAAC,OAAO;AAAA,QACtC,8BAA8B;AAAA,MAChC;AAAA,IACF;AAAA,EACF;AACF;","names":["default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/plugins.ts"],"sourcesContent":["//@ts-expect-error not working\nexport { default as pluginComments } from \"@eslint-community/eslint-plugin-eslint-comments\";\nexport { default as pluginAntfu } from \"eslint-plugin-antfu\";\nexport { default as pluginImport } from \"eslint-plugin-import\";\nexport { default as pluginNode } from \"eslint-plugin-n\";\nexport { default as pluginUnicorn } from \"eslint-plugin-unicorn\";\nexport { default as pluginUnusedImports } from \"eslint-plugin-unused-imports\";\n"],"mappings":";AACA,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAA8B;AACvC,SAAoB,WAAXA,gBAA+B;AACxC,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAgC;AACzC,SAAoB,WAAXA,gBAAsC;","names":["default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/configs/typescript-strict.ts","../src/eslint/configs/unicorn.ts"],"sourcesContent":["import tseslint from \"typescript-eslint\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginAntfu } from \"../plugins\";\n\nexport function typescriptStrict(): ConfigWithExtends[] {\n return [\n ...tseslint.configs.strictTypeChecked,\n ...tseslint.configs.stylisticTypeChecked,\n {\n name: \"solvro/typescript-strict/setup\",\n plugins: {\n antfu: pluginAntfu,\n },\n },\n {\n files: [\"**/*.{ts,tsx}\"],\n name: \"solvro/typescript-strict/rules\",\n rules: {\n \"@typescript-eslint/ban-ts-comment\": [\n \"error\",\n { \"ts-expect-error\": \"allow-with-description\" },\n ],\n \"@typescript-eslint/consistent-type-definitions\": [\n \"error\",\n \"interface\",\n ],\n \"@typescript-eslint/consistent-type-imports\": [\n \"error\",\n {\n disallowTypeAnnotations: false,\n prefer: \"type-imports\",\n },\n ],\n \"@typescript-eslint/method-signature-style\": [\"error\", \"property\"], // https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful\n \"@typescript-eslint/no-dupe-class-members\": \"error\",\n \"@typescript-eslint/no-empty-object-type\": [\n \"error\",\n { allowInterfaces: \"always\" },\n ],\n \"@typescript-eslint/no-import-type-side-effects\": \"error\",\n \"@typescript-eslint/no-redeclare\": [\"error\", { builtinGlobals: false }],\n \"@typescript-eslint/no-require-imports\": \"error\",\n \"@typescript-eslint/no-unused-expressions\": [\n \"error\",\n {\n allowShortCircuit: true,\n allowTaggedTemplates: true,\n allowTernary: true,\n },\n ],\n \"@typescript-eslint/no-use-before-define\": [\n \"error\",\n { classes: false, functions: false, variables: true },\n ],\n \"@typescript-eslint/no-wrapper-object-types\": \"error\",\n // prevent unnecessary use of void operator\n \"@typescript-eslint/no-meaningless-void-operator\": \"error\",\n // \"using non-null assertions cancels the benefits of the strict\n // null-checking mode.\"\n // warn when one of the types in union / intersection overrides others\n \"@typescript-eslint/no-redundant-type-constituents\": \"warn\",\n // prevent variables shadowing\n \"no-shadow\": \"error\",\n \"@typescript-eslint/no-shadow\": \"error\",\n // prevent assignment of this, signals a wrong usage of it\n \"@typescript-eslint/no-this-alias\": \"error\",\n // prevent throwing non-error\n \"no-throw-literal\": \"off\",\n\n // prevent unnecessary explicitly adding a default type argument\n \"@typescript-eslint/no-unnecessary-type-arguments\": \"error\",\n // prevent unnecessary assertions that won't change the outcome\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"error\",\n // prevent extending default types\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"error\",\n // force typing out function arguments\n \"@typescript-eslint/no-unsafe-argument\": \"error\",\n // prevent usage of any via reassigning\n \"@typescript-eslint/no-unsafe-assignment\": \"error\",\n // prevent usage of any via calling it\n \"@typescript-eslint/no-unsafe-call\": \"error\",\n // prevent usage of any via using it's members\n \"@typescript-eslint/no-unsafe-member-access\": \"error\",\n // prevent reverting any from functions\n \"@typescript-eslint/no-unsafe-return\": \"error\",\n // prevent unused expressions\n \"no-unused-expressions\": \"off\",\n // var<'string'> = 'string' -> var = 'string' as const\n \"@typescript-eslint/prefer-as-const\": \"error\",\n // force initializing enums\n \"@typescript-eslint/prefer-enum-initializers\": \"error\",\n // prefer for x of obj to for let i = 0...\n \"@typescript-eslint/prefer-for-of\": \"error\",\n // prefer includes() to indexOf()\n \"@typescript-eslint/prefer-includes\": \"error\",\n // use literals for enum initialization\n \"@typescript-eslint/prefer-literal-enum-member\": \"error\",\n // prefer safe cascade of a value when dealing with undefined or null\n \"@typescript-eslint/prefer-nullish-coalescing\": \"error\",\n // prefer optional chaining (a?.b)\n \"@typescript-eslint/prefer-optional-chain\": \"error\",\n // prefer using type parameter for Array.reduce\n \"@typescript-eslint/prefer-reduce-type-parameter\": \"error\",\n // prefer RegExp#exec when no /g flag in regex\n \"@typescript-eslint/prefer-regexp-exec\": \"error\",\n // enforce `this` as a type when stating type for a method\n \"@typescript-eslint/prefer-return-this-type\": \"error\",\n // enforce startsWith to indexOf === 0\n \"@typescript-eslint/prefer-string-starts-ends-with\": \"error\",\n // prevents default behavior of .sort() - which is confusing\n \"@typescript-eslint/require-array-sort-compare\": \"error\",\n // no async functions without awaits in body\n \"require-await\": \"off\",\n \"@typescript-eslint/require-await\": \"error\",\n // prevent number + string\n \"@typescript-eslint/restrict-plus-operands\": \"error\",\n // only allow string in templates\n \"@typescript-eslint/restrict-template-expressions\": \"error\",\n // prevent returning await\n \"no-return-await\": \"off\",\n \"@typescript-eslint/return-await\": \"error\",\n // only booleans in ifs and whiles\n \"@typescript-eslint/strict-boolean-expressions\": \"error\",\n // check if all paths are followed in code\n \"@typescript-eslint/switch-exhaustiveness-check\": \"error\",\n \"dot-notation\": \"off\",\n \"no-implied-eval\": \"off\",\n \"@typescript-eslint/await-thenable\": \"error\",\n \"@typescript-eslint/dot-notation\": [\"error\", { allowKeywords: true }],\n \"@typescript-eslint/no-floating-promises\": \"error\",\n \"@typescript-eslint/no-for-in-array\": \"error\",\n \"@typescript-eslint/no-implied-eval\": \"error\",\n \"@typescript-eslint/no-misused-promises\": \"error\",\n \"@typescript-eslint/promise-function-async\": \"error\",\n \"@typescript-eslint/unbound-method\": \"error\",\n \"no-restricted-imports\": \"off\",\n },\n },\n ];\n}\n","import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginUnicorn } from \"../plugins\";\n\nexport function unicorn(): ConfigWithExtends[] {\n return [\n {\n name: \"solvro/unicorn/rules\",\n plugins: {\n unicorn: pluginUnicorn,\n },\n rules: {\n ...pluginUnicorn.configs.recommended.rules,\n \"unicorn/no-array-reduce\": \"off\",\n \"unicorn/no-null\": \"off\",\n \"unicorn/no-useless-switch-case\": \"off\",\n \"unicorn/prefer-global-this\": \"off\",\n \"unicorn/prevent-abbreviations\": [\n \"error\",\n {\n replacements: {\n env: false,\n envs: false,\n props: false,\n prop: false,\n ref: false,\n utils: false,\n },\n allowList: {\n e2e: true,\n },\n ignore: [String.raw`e2e`],\n },\n ],\n },\n },\n ];\n}\n"],"mappings":";;;;;;AAAA,OAAO,cAAc;AAKd,SAAS,mBAAwC;AACtD,SAAO;AAAA,IACL,GAAG,SAAS,QAAQ;AAAA,IACpB,GAAG,SAAS,QAAQ;AAAA,IACpB;AAAA,MACE,MAAM;AAAA,MACN,SAAS;AAAA,QACP,OAAOA;AAAA,MACT;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO,CAAC,eAAe;AAAA,MACvB,MAAM;AAAA,MACN,OAAO;AAAA,QACL,qCAAqC;AAAA,UACnC;AAAA,UACA,EAAE,mBAAmB,yBAAyB;AAAA,QAChD;AAAA,QACA,kDAAkD;AAAA,UAChD;AAAA,UACA;AAAA,QACF;AAAA,QACA,8CAA8C;AAAA,UAC5C;AAAA,UACA;AAAA,YACE,yBAAyB;AAAA,YACzB,QAAQ;AAAA,UACV;AAAA,QACF;AAAA,QACA,6CAA6C,CAAC,SAAS,UAAU;AAAA;AAAA,QACjE,4CAA4C;AAAA,QAC5C,2CAA2C;AAAA,UACzC;AAAA,UACA,EAAE,iBAAiB,SAAS;AAAA,QAC9B;AAAA,QACA,kDAAkD;AAAA,QAClD,mCAAmC,CAAC,SAAS,EAAE,gBAAgB,MAAM,CAAC;AAAA,QACtE,yCAAyC;AAAA,QACzC,4CAA4C;AAAA,UAC1C;AAAA,UACA;AAAA,YACE,mBAAmB;AAAA,YACnB,sBAAsB;AAAA,YACtB,cAAc;AAAA,UAChB;AAAA,QACF;AAAA,QACA,2CAA2C;AAAA,UACzC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0C;AAAA,QAC1C,6CAA6C;AAAA,QAC7C,qCAAqC;AAAA,QACrC,yBAAyB;AAAA,MAC3B;AAAA,IACF;AAAA,EACF;AACF;;;ACxIO,SAAS,UAA+B;AAC7C,SAAO;AAAA,IACL;AAAA,MACE,MAAM;AAAA,MACN,SAAS;AAAA,QACP,SAASC;AAAA,MACX;AAAA,MACA,OAAO;AAAA,QACL,GAAGA,SAAc,QAAQ,YAAY;AAAA,QACrC,2BAA2B;AAAA,QAC3B,mBAAmB;AAAA,QACnB,kCAAkC;AAAA,QAClC,8BAA8B;AAAA,QAC9B,iCAAiC;AAAA,UAC/B;AAAA,UACA;AAAA,YACE,cAAc;AAAA,cACZ,KAAK;AAAA,cACL,MAAM;AAAA,cACN,OAAO;AAAA,cACP,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,YACT;AAAA,YACA,WAAW;AAAA,cACT,KAAK;AAAA,YACP;AAAA,YACA,QAAQ,CAAC,OAAO,QAAQ;AAAA,UAC1B;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;","names":["default","default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/presets/nestjs.ts"],"sourcesContent":["import eslintNestJs from \"@darraghor/eslint-plugin-nestjs-typed\";\nimport { isPackageListed } from \"local-pkg\";\nimport type { ConfigArray, ConfigWithExtends } from \"typescript-eslint\";\n\nimport { imports } from \"../configs/imports\";\nimport { node } from \"../configs/node\";\nimport { typescriptStrict } from \"../configs/typescript-strict\";\nimport { unicorn } from \"../configs/unicorn\";\n\nexport const nestjsPreset = async (): Promise<ConfigWithExtends[]> => {\n const hasSwagger = await isPackageListed(\"@nestjs/swagger\");\n\n const nestjsConfig = hasSwagger\n ? ([\n ...eslintNestJs.configs.flatRecommended,\n {\n rules: {\n \"@darraghor/nestjs-typed/api-property-matches-property-optionality\":\n \"warn\",\n \"@darraghor/nestjs-typed/controllers-should-supply-api-tags\":\n \"warn\",\n \"@darraghor/nestjs-typed/api-method-should-specify-api-response\":\n \"warn\",\n \"@darraghor/nestjs-typed/api-method-should-specify-api-operation\":\n \"warn\",\n \"@darraghor/nestjs-typed/api-enum-property-best-practices\": \"warn\",\n \"@darraghor/nestjs-typed/api-property-returning-array-should-set-array\":\n \"warn\",\n },\n },\n ] satisfies ConfigArray)\n : eslintNestJs.configs.flatNoSwagger;\n\n return [\n ...node(),\n ...unicorn(),\n ...typescriptStrict(),\n ...imports({ forbidDefaultExport: true }),\n ...nestjsConfig,\n {\n rules: {\n \"no-implicit-coercion\": [\n \"error\",\n {\n allow: [\"+\"],\n },\n ],\n \"unicorn/prefer-top-level-await\": \"off\",\n // flaky as hell\n \"@darraghor/nestjs-typed/injectable-should-be-provided\": \"off\",\n },\n },\n {\n rules: {\n \"@typescript-eslint/no-extraneous-class\": [\n \"error\",\n {\n allowEmpty: true,\n },\n ],\n },\n files: [\"**/*.module.ts\"],\n },\n {\n rules: {\n \"@typescript-eslint/no-floating-promises\": \"off\",\n },\n files: [\"./src/main.ts\"],\n },\n ];\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAO,kBAAkB;AACzB,SAAS,uBAAuB;AAQzB,IAAM,eAAe,YAA0C;AACpE,QAAM,aAAa,MAAM,gBAAgB,iBAAiB;AAE1D,QAAM,eAAe,aAChB;AAAA,IACC,GAAG,aAAa,QAAQ;AAAA,IACxB;AAAA,MACE,OAAO;AAAA,QACL,qEACE;AAAA,QACF,8DACE;AAAA,QACF,kEACE;AAAA,QACF,mEACE;AAAA,QACF,4DAA4D;AAAA,QAC5D,yEACE;AAAA,MACJ;AAAA,IACF;AAAA,EACF,IACA,aAAa,QAAQ;AAEzB,SAAO;AAAA,IACL,GAAG,KAAK;AAAA,IACR,GAAG,QAAQ;AAAA,IACX,GAAG,iBAAiB;AAAA,IACpB,GAAG,QAAQ,EAAE,qBAAqB,KAAK,CAAC;AAAA,IACxC,GAAG;AAAA,IACH;AAAA,MACE,OAAO;AAAA,QACL,wBAAwB;AAAA,UACtB;AAAA,UACA;AAAA,YACE,OAAO,CAAC,GAAG;AAAA,UACb;AAAA,QACF;AAAA,QACA,kCAAkC;AAAA;AAAA,QAElC,yDAAyD;AAAA,MAC3D;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO;AAAA,QACL,0CAA0C;AAAA,UACxC;AAAA,UACA;AAAA,YACE,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,MACA,OAAO,CAAC,gBAAgB;AAAA,IAC1B;AAAA,IACA;AAAA,MACE,OAAO;AAAA,QACL,2CAA2C;AAAA,MAC7C;AAAA,MACA,OAAO,CAAC,eAAe;AAAA,IACzB;AAAA,EACF;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/presets/node.ts"],"sourcesContent":["import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { imports } from \"../configs/imports\";\nimport { node } from \"../configs/node\";\nimport { typescriptStrict } from \"../configs/typescript-strict\";\nimport { unicorn } from \"../configs/unicorn\";\n\nexport const nodePreset = (): ConfigWithExtends[] => [\n ...node(),\n ...unicorn(),\n ...typescriptStrict(),\n ...imports({ forbidDefaultExport: true }),\n];\n"],"mappings":";;;;;;;;;;;;;AAOO,IAAM,aAAa,MAA2B;AAAA,EACnD,GAAG,KAAK;AAAA,EACR,GAAG,QAAQ;AAAA,EACX,GAAG,iBAAiB;AAAA,EACpB,GAAG,QAAQ,EAAE,qBAAqB,KAAK,CAAC;AAC1C;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/eslint/configs/a11y.ts","../src/eslint/configs/react.ts","../src/eslint/presets/react.ts"],"sourcesContent":["import jsxA11y from \"eslint-plugin-jsx-a11y\";\nimport globals from \"globals\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nexport function a11y(): ConfigWithExtends[] {\n return [\n {\n files: [\"**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}\"],\n ...jsxA11y.flatConfigs.recommended,\n languageOptions: {\n ...jsxA11y.flatConfigs.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n },\n settings: {\n \"jsx-a11y\": {\n components: {\n Input: \"input\",\n Button: \"button\",\n Link: \"a\",\n Label: \"label\",\n Select: \"select\",\n Textarea: \"textarea\",\n },\n attributes: {\n for: [\"htmlFor\", \"for\"],\n },\n },\n },\n },\n ];\n}\n","import pluginQuery from \"@tanstack/eslint-plugin-query\";\nimport pluginReact from \"eslint-plugin-react\";\nimport pluginReactHooks from \"eslint-plugin-react-hooks\";\nimport pluginReactRefresh from \"eslint-plugin-react-refresh\";\nimport reactYouMightNotNeedAnEffect from \"eslint-plugin-react-you-might-not-need-an-effect\";\nimport { isPackageListedSync } from \"local-pkg\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nconst nextJsPackages = [\"next\"];\nconst vitePackages = [\"vite\"];\n\nexport async function react(): Promise<ConfigWithExtends[]> {\n const isUsingNext = nextJsPackages.some((index) =>\n isPackageListedSync(index),\n );\n const isUsingVite = vitePackages.some((index) => isPackageListedSync(index));\n\n const nextjsConfig: ConfigWithExtends[] = [];\n\n if (isUsingNext) {\n const nextPlugin = await import(\"@next/eslint-plugin-next\").then(\n (d) => d.default,\n );\n\n nextjsConfig.push(\n {\n name: \"solvro/next/setup\",\n plugins: {\n \"@next/next\": nextPlugin,\n },\n\n rules: nextPlugin.configs.recommended.rules,\n },\n {\n files: [\n \"**/app/**/{page,loading,layout,template,error,not-found,unauthorized,forbidden,default,robots,sitemap}.{js,jsx,ts,tsx}\",\n \"**/pages/**/*.{js,jsx,ts,tsx}\",\n ],\n name: \"solvro/next/pages\",\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n );\n }\n\n const viteConfig: ConfigWithExtends[] = [];\n\n if (isUsingVite) {\n viteConfig.push(pluginReactRefresh.configs.vite);\n }\n\n return [\n {\n name: \"solvro/react/setup\",\n plugins: {\n react: pluginReact,\n\n \"react-hooks\": pluginReactHooks,\n },\n },\n ...nextjsConfig,\n ...viteConfig,\n {\n files: [\"**/*.{js,jsx,mjs,cjs,ts,tsx}\"],\n languageOptions: {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n sourceType: \"module\",\n },\n settings: {\n react: {\n version: \"detect\",\n },\n },\n name: \"solvro/react/rules\",\n rules: {\n ...pluginReact.configs.flat.recommended.rules,\n ...pluginReact.configs.flat[\"jsx-runtime\"].rules,\n \"react/no-danger\": \"warn\",\n \"react/jsx-no-leaked-render\": \"warn\",\n // recommended rules react-hooks\n \"react-hooks/exhaustive-deps\": \"warn\",\n \"react-hooks/rules-of-hooks\": \"error\",\n \"react/jsx-no-useless-fragment\": \"error\",\n \"react/function-component-definition\": [\n \"error\",\n {\n unnamedComponents: \"arrow-function\",\n namedComponents: \"function-declaration\",\n },\n ],\n \"react/hook-use-state\": [\n \"error\",\n {\n allowDestructuredState: true,\n },\n ],\n \"react/no-array-index-key\": \"warn\",\n },\n },\n ...pluginQuery.configs[\"flat/recommended\"],\n reactYouMightNotNeedAnEffect.configs.recommended,\n {\n name: \"solvro/react/disables\",\n files: [\"**/components/ui/*.{jsx,tsx}\"],\n rules: {\n \"react/prop-types\": \"off\",\n \"no-shadow\": \"off\",\n \"@typescript-eslint/no-shadow\": \"off\",\n \"@typescript-eslint/restrict-template-expressions\": \"off\",\n \"unicorn/no-document-cookie\": \"off\",\n \"@typescript-eslint/no-redeclare\": \"off\",\n \"@typescript-eslint/no-deprecated\": \"off\",\n },\n },\n ];\n}\n","import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { a11y } from \"../configs/a11y\";\nimport { imports } from \"../configs/imports\";\nimport { react } from \"../configs/react\";\nimport { typescriptStrict } from \"../configs/typescript-strict\";\nimport { unicorn } from \"../configs/unicorn\";\n\nexport const reactPreset = async (): Promise<ConfigWithExtends[]> => [\n ...a11y(),\n ...unicorn(),\n ...typescriptStrict(),\n ...imports({ forbidDefaultExport: true }),\n ...(await react()),\n];\n"],"mappings":";;;;;;;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