@kasoa/vite-plus-config 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Emmanuel Chucks
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,144 @@
1
+ # @kasoa/vite-plus-config
2
+
3
+ Kasoa's Vite+ configurations
4
+
5
+ ## Installation
6
+
7
+ Install Vite+ and the shared config:
8
+
9
+ ```bash
10
+ pnpm add -D @kasoa/vite-plus-config vite-plus
11
+ ```
12
+
13
+ **Note**: Requires Node.js >=24 and TypeScript-first projects.
14
+
15
+ ## Usage
16
+
17
+ Create a local `vite.config.ts` and re-export the shared preset that matches the project.
18
+
19
+ ### Base Config
20
+
21
+ ```ts
22
+ export { base as default } from "@kasoa/vite-plus-config/base";
23
+ ```
24
+
25
+ ### React Projects
26
+
27
+ ```ts
28
+ export { react as default } from "@kasoa/vite-plus-config/react";
29
+ ```
30
+
31
+ ### Server Projects
32
+
33
+ ```ts
34
+ export { server as default } from "@kasoa/vite-plus-config/server";
35
+ ```
36
+
37
+ ### Libraries
38
+
39
+ ```ts
40
+ export { library as default } from "@kasoa/vite-plus-config/library";
41
+ ```
42
+
43
+ ### Monorepo Root
44
+
45
+ ```ts
46
+ export { monorepo as default } from "@kasoa/vite-plus-config/monorepo";
47
+ ```
48
+
49
+ ## Composing Presets
50
+
51
+ Use Vite+'s normal `defineConfig` API when a project needs to mix presets or add overrides.
52
+
53
+ ```ts
54
+ import { defineConfig } from "vite-plus";
55
+ import { library } from "@kasoa/vite-plus-config/library";
56
+ import { react } from "@kasoa/vite-plus-config/react";
57
+
58
+ export default defineConfig({
59
+ ...react,
60
+ pack: library.pack,
61
+ lint: {
62
+ ...react.lint,
63
+ rules: {
64
+ ...react.lint?.rules,
65
+ "no-console": "warn",
66
+ },
67
+ },
68
+ });
69
+ ```
70
+
71
+ ## Cloudflare Workers Tests
72
+
73
+ For Worker projects, the package also ships a thin Cloudflare test preset that wires up `cloudflareTest()` with a default root `wrangler.jsonc`.
74
+
75
+ ```bash
76
+ pnpm add -D @cloudflare/vitest-pool-workers wrangler
77
+ ```
78
+
79
+ ```ts
80
+ import { defineConfig } from "vite-plus";
81
+ import { server } from "@kasoa/vite-plus-config/server";
82
+ import { createCloudflareWorkersTestConfig } from "@kasoa/vite-plus-config/test/cloudflare-workers";
83
+
84
+ const cloudflareWorkers = createCloudflareWorkersTestConfig({
85
+ miniflare: {
86
+ bindings: {
87
+ CORS_ALLOWED_ORIGINS: "",
88
+ },
89
+ },
90
+ });
91
+
92
+ export default defineConfig({
93
+ ...server,
94
+ ...cloudflareWorkers,
95
+ test: {
96
+ ...cloudflareWorkers.test,
97
+ provide: {
98
+ d1Migrations: [],
99
+ },
100
+ },
101
+ });
102
+ ```
103
+
104
+ The shared preset only covers the repeated Worker runtime wiring. Project-specific migrations, bindings, coverage, setup files, and `test.provide` values should stay in the consuming project.
105
+
106
+ At the moment, Cloudflare Worker projects should prefer plain `vitest --config vite.config.ts` for running tests. The Worker test preset itself is validated, but `vp test` is not yet a recommended path there because the current `vite-plus-test` runner still appears to have compatibility issues with this setup.
107
+
108
+ ## Recommended Workflow
109
+
110
+ - For Vite+-first apps and packages, prefer a simple `check` script that runs `vp check`.
111
+ - Pair it with `check:fix` that runs `vp check --fix`.
112
+ - Use `vp check` for formatting, linting, and type checking in one pass.
113
+ - Use `vp check --fix` for autofixable formatting and linting issues.
114
+ - Use `vp config` if you want commit hooks generated from the shared `staged` rules.
115
+ - Use one `vite.config.ts` by default, then keep separate config files only when a project genuinely needs them.
116
+
117
+ Example:
118
+
119
+ ```json
120
+ {
121
+ "scripts": {
122
+ "check": "vp check",
123
+ "check:fix": "vp check --fix"
124
+ }
125
+ }
126
+ ```
127
+
128
+ ## Configurations
129
+
130
+ - **`base`**: Strict TypeScript-first format, lint, test include, and staged-file defaults.
131
+ - **`react`**: Extends `base` with React lint rules and Tailwind-aware formatting.
132
+ - **`server`**: Extends `base` with server-oriented lint rules.
133
+ - **`library`**: Extends `base` with ESM-only packaging defaults for `vp pack`.
134
+ - **`monorepo`**: Extends `base` with root-only `run` defaults for workspace caching.
135
+ - **`test/cloudflare-workers`**: Optional Cloudflare Worker test wiring for Vitest.
136
+
137
+ ## Author
138
+
139
+ Emmanuel Chucks
140
+ https://github.com/emmanuelchucks
141
+
142
+ ## License
143
+
144
+ MIT
@@ -0,0 +1,255 @@
1
+ import { n as DEFAULT_STAGED_CHECK_GLOB, r as DEFAULT_TEST_INCLUDE, t as DEFAULT_STAGED_CHECK_COMMAND } from "./constants-CGGN7b-7.mjs";
2
+ import { defineConfig } from "vite-plus";
3
+ import { defineConfig as defineConfig$1 } from "oxfmt";
4
+ //#region src/shared/fmt.ts
5
+ const baseFmt = defineConfig$1({ sortImports: {
6
+ internalPattern: ["#", "@/"],
7
+ newlinesBetween: false,
8
+ groups: [
9
+ "type-import",
10
+ ["value-builtin", "value-external"],
11
+ "type-internal",
12
+ "value-internal",
13
+ [
14
+ "type-parent",
15
+ "type-sibling",
16
+ "type-index"
17
+ ],
18
+ [
19
+ "value-parent",
20
+ "value-sibling",
21
+ "value-index"
22
+ ],
23
+ "unknown"
24
+ ]
25
+ } });
26
+ const reactFmt = defineConfig$1({
27
+ ...baseFmt,
28
+ sortTailwindcss: {
29
+ attributes: ["/.*ClassName/"],
30
+ functions: ["tv"]
31
+ }
32
+ });
33
+ //#endregion
34
+ //#region src/shared/lint.ts
35
+ const BASE_LINT_PLUGINS = [
36
+ "typescript",
37
+ "unicorn",
38
+ "oxc",
39
+ "import",
40
+ "promise"
41
+ ];
42
+ const baseLint = {
43
+ plugins: [...BASE_LINT_PLUGINS],
44
+ env: {
45
+ serviceworker: true,
46
+ worker: true
47
+ },
48
+ options: {
49
+ reportUnusedDisableDirectives: "error",
50
+ typeAware: true,
51
+ typeCheck: true
52
+ },
53
+ categories: {
54
+ correctness: "error",
55
+ suspicious: "error",
56
+ pedantic: "error",
57
+ perf: "error",
58
+ style: "error"
59
+ },
60
+ rules: {
61
+ "capitalized-comments": "off",
62
+ "func-style": "off",
63
+ "id-length": "off",
64
+ "init-declarations": "off",
65
+ "max-classes-per-file": "off",
66
+ "max-lines-per-function": "off",
67
+ "max-statements": "off",
68
+ "no-continue": "off",
69
+ "no-magic-numbers": "off",
70
+ "no-ternary": "off",
71
+ "require-await": "off",
72
+ "sort-imports": "off",
73
+ "sort-keys": "off",
74
+ "vars-on-top": "off",
75
+ complexity: ["error", { max: 10 }],
76
+ curly: [
77
+ "error",
78
+ "multi-line",
79
+ "consistent"
80
+ ],
81
+ "default-case-last": "error",
82
+ eqeqeq: "error",
83
+ "getter-return": "error",
84
+ "grouped-accessor-pairs": ["error", "getBeforeSet"],
85
+ "max-depth": ["error", { max: 3 }],
86
+ "max-nested-callbacks": ["error", { max: 3 }],
87
+ "max-params": ["error", { max: 3 }],
88
+ "new-cap": "off",
89
+ "no-alert": "error",
90
+ "no-bitwise": "error",
91
+ "no-console": ["error", { allow: [
92
+ "info",
93
+ "warn",
94
+ "error"
95
+ ] }],
96
+ "no-duplicate-imports": ["error", { allowSeparateTypeImports: true }],
97
+ "no-param-reassign": ["error", { props: true }],
98
+ "no-plusplus": "error",
99
+ "no-undef": "error",
100
+ "no-unneeded-ternary": "error",
101
+ "no-unreachable": "error",
102
+ "no-useless-return": "error",
103
+ "prefer-template": "error",
104
+ "import/exports-last": "off",
105
+ "import/group-exports": "off",
106
+ "import/no-anonymous-default-export": "off",
107
+ "import/no-named-export": "off",
108
+ "import/no-namespace": "off",
109
+ "import/no-nodejs-modules": "off",
110
+ "import/no-unassigned-import": "off",
111
+ "import/prefer-default-export": "off",
112
+ "import/no-cycle": "error",
113
+ "promise/prefer-await-to-callbacks": "off",
114
+ "typescript/ban-ts-comment": ["error", { minimumDescriptionLength: 10 }],
115
+ "typescript/consistent-type-definitions": "off",
116
+ "typescript/consistent-return": "error",
117
+ "typescript/consistent-type-exports": "error",
118
+ "typescript/consistent-type-imports": ["error", {
119
+ prefer: "type-imports",
120
+ fixStyle: "separate-type-imports"
121
+ }],
122
+ "typescript/dot-notation": "error",
123
+ "typescript/no-confusing-void-expression": "error",
124
+ "typescript/no-dynamic-delete": "error",
125
+ "typescript/no-explicit-any": "error",
126
+ "typescript/no-floating-promises": "error",
127
+ "typescript/no-misused-promises": "error",
128
+ "typescript/no-misused-spread": "error",
129
+ "typescript/no-non-null-assertion": "error",
130
+ "typescript/no-require-imports": "error",
131
+ "typescript/no-unnecessary-condition": "error",
132
+ "typescript/no-unnecessary-qualifier": "error",
133
+ "typescript/no-unnecessary-type-arguments": "error",
134
+ "typescript/no-unnecessary-type-assertion": "error",
135
+ "typescript/no-unnecessary-type-parameters": "error",
136
+ "typescript/no-unsafe-argument": "error",
137
+ "typescript/no-unsafe-assignment": "error",
138
+ "typescript/no-unsafe-call": "error",
139
+ "typescript/no-unsafe-member-access": "error",
140
+ "typescript/no-unsafe-return": "error",
141
+ "typescript/no-useless-default-assignment": "error",
142
+ "typescript/non-nullable-type-assertion-style": "error",
143
+ "typescript/only-throw-error": "error",
144
+ "typescript/prefer-find": "error",
145
+ "typescript/prefer-nullish-coalescing": "error",
146
+ "typescript/prefer-optional-chain": "error",
147
+ "typescript/prefer-readonly": "error",
148
+ "typescript/prefer-regexp-exec": "error",
149
+ "typescript/require-await": "off",
150
+ "typescript/require-array-sort-compare": "error",
151
+ "typescript/restrict-plus-operands": "error",
152
+ "typescript/restrict-template-expressions": "error",
153
+ "typescript/return-await": "error",
154
+ "typescript/strict-boolean-expressions": "error",
155
+ "typescript/strict-void-return": "error",
156
+ "typescript/switch-exhaustiveness-check": "error",
157
+ "typescript/unbound-method": "error",
158
+ "typescript/use-unknown-in-catch-callback-variable": "error",
159
+ "unicorn/no-null": "off",
160
+ "unicorn/no-abusive-eslint-disable": "error",
161
+ "unicorn/filename-case": ["error", { case: "kebabCase" }]
162
+ },
163
+ overrides: [
164
+ {
165
+ files: ["**/*.{cjs,cts}"],
166
+ env: { node: true },
167
+ rules: { "typescript/no-require-imports": "off" }
168
+ },
169
+ {
170
+ files: ["**/*.config.{js,jsx,ts,tsx,mjs,cjs,mts,cts}"],
171
+ env: { node: true },
172
+ rules: { "func-names": "off" }
173
+ },
174
+ {
175
+ files: ["**/*.d.ts"],
176
+ rules: { "typescript/no-empty-interface": "off" }
177
+ },
178
+ {
179
+ files: [
180
+ "**/test/**",
181
+ "**/tests/**",
182
+ "**/__tests__/**",
183
+ "**/*.{test,spec}.{js,jsx,ts,tsx,mjs,cjs,mts,cts}"
184
+ ],
185
+ plugins: [...BASE_LINT_PLUGINS, "vitest"],
186
+ env: { vitest: true },
187
+ rules: {
188
+ "vitest/no-importing-vitest-globals": "off",
189
+ "vitest/max-nested-describe": ["error", { max: 3 }]
190
+ }
191
+ }
192
+ ]
193
+ };
194
+ const reactLint = {
195
+ ...baseLint,
196
+ plugins: [
197
+ ...baseLint.plugins ?? [],
198
+ "react",
199
+ "react-perf",
200
+ "jsx-a11y"
201
+ ],
202
+ rules: {
203
+ ...baseLint.rules,
204
+ "jsx-a11y/alt-text": "error",
205
+ "react/jsx-props-no-spreading": "off",
206
+ "react/react-in-jsx-scope": "off",
207
+ "react/exhaustive-deps": "error",
208
+ "react/jsx-key": "error",
209
+ "react/jsx-max-depth": ["error", { max: 4 }],
210
+ "react/jsx-no-constructed-context-values": "error",
211
+ "react/jsx-no-duplicate-props": "error",
212
+ "react/jsx-no-undef": "error",
213
+ "react/no-array-index-key": "error",
214
+ "react/no-children-prop": "error",
215
+ "react/no-clone-element": "error",
216
+ "react/no-danger": "error",
217
+ "react/no-danger-with-children": "error",
218
+ "react/no-direct-mutation-state": "error",
219
+ "react/no-find-dom-node": "error",
220
+ "react/no-react-children": "error",
221
+ "react/no-string-refs": "error",
222
+ "react/style-prop-object": "off",
223
+ "react/no-unsafe": "error",
224
+ "react/no-unknown-property": "error",
225
+ "react/void-dom-elements-no-children": "error",
226
+ "react-perf/jsx-no-jsx-as-prop": "error",
227
+ "react-perf/jsx-no-new-array-as-prop": "error",
228
+ "react-perf/jsx-no-new-function-as-prop": "error",
229
+ "react-perf/jsx-no-new-object-as-prop": "error"
230
+ }
231
+ };
232
+ const serverLint = {
233
+ ...baseLint,
234
+ plugins: [...baseLint.plugins ?? [], "node"],
235
+ globals: {
236
+ ...baseLint.globals,
237
+ WebSocketPair: "readonly"
238
+ },
239
+ rules: {
240
+ ...baseLint.rules,
241
+ "node/no-exports-assign": "error"
242
+ }
243
+ };
244
+ //#endregion
245
+ //#region src/base/index.ts
246
+ const base = defineConfig({
247
+ fmt: baseFmt,
248
+ lint: baseLint,
249
+ test: { include: [...DEFAULT_TEST_INCLUDE] },
250
+ staged: { [DEFAULT_STAGED_CHECK_GLOB]: DEFAULT_STAGED_CHECK_COMMAND }
251
+ });
252
+ //#endregion
253
+ export { reactFmt as i, reactLint as n, serverLint as r, base as t };
254
+
255
+ //# sourceMappingURL=base-CEVWvOxk.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-CEVWvOxk.mjs","names":["defineConfig"],"sources":["../src/shared/fmt.ts","../src/shared/lint.ts","../src/base/index.ts"],"sourcesContent":["import { defineConfig } from \"oxfmt\";\n\nexport const baseFmt = defineConfig({\n sortImports: {\n internalPattern: [\"#\", \"@/\"],\n newlinesBetween: false,\n groups: [\n \"type-import\",\n [\"value-builtin\", \"value-external\"],\n \"type-internal\",\n \"value-internal\",\n [\"type-parent\", \"type-sibling\", \"type-index\"],\n [\"value-parent\", \"value-sibling\", \"value-index\"],\n \"unknown\",\n ],\n },\n});\n\nexport const reactFmt = defineConfig({\n ...baseFmt,\n sortTailwindcss: {\n attributes: [\"/.*ClassName/\"],\n functions: [\"tv\"],\n },\n});\n","import type { OxlintConfig } from \"oxlint\";\n\nexport const BASE_LINT_PLUGINS = [\"typescript\", \"unicorn\", \"oxc\", \"import\", \"promise\"] as const;\n\nconst baseLintConfig: OxlintConfig = {\n plugins: [...BASE_LINT_PLUGINS],\n env: {\n serviceworker: true,\n worker: true,\n },\n options: {\n reportUnusedDisableDirectives: \"error\",\n typeAware: true,\n typeCheck: true,\n },\n categories: {\n correctness: \"error\",\n suspicious: \"error\",\n pedantic: \"error\",\n perf: \"error\",\n style: \"error\",\n },\n rules: {\n \"capitalized-comments\": \"off\",\n \"func-style\": \"off\",\n \"id-length\": \"off\",\n \"init-declarations\": \"off\",\n \"max-classes-per-file\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"no-continue\": \"off\",\n \"no-magic-numbers\": \"off\",\n \"no-ternary\": \"off\",\n \"require-await\": \"off\",\n \"sort-imports\": \"off\",\n \"sort-keys\": \"off\",\n \"vars-on-top\": \"off\",\n\n complexity: [\"error\", { max: 10 }],\n curly: [\"error\", \"multi-line\", \"consistent\"],\n \"default-case-last\": \"error\",\n eqeqeq: \"error\",\n \"getter-return\": \"error\",\n \"grouped-accessor-pairs\": [\"error\", \"getBeforeSet\"],\n \"max-depth\": [\"error\", { max: 3 }],\n \"max-nested-callbacks\": [\"error\", { max: 3 }],\n \"max-params\": [\"error\", { max: 3 }],\n \"new-cap\": \"off\",\n \"no-alert\": \"error\",\n \"no-bitwise\": \"error\",\n \"no-console\": [\"error\", { allow: [\"info\", \"warn\", \"error\"] }],\n \"no-duplicate-imports\": [\"error\", { allowSeparateTypeImports: true }],\n \"no-param-reassign\": [\"error\", { props: true }],\n \"no-plusplus\": \"error\",\n \"no-undef\": \"error\",\n \"no-unneeded-ternary\": \"error\",\n \"no-unreachable\": \"error\",\n \"no-useless-return\": \"error\",\n \"prefer-template\": \"error\",\n\n \"import/exports-last\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/no-anonymous-default-export\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/no-namespace\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"import/no-unassigned-import\": \"off\",\n \"import/prefer-default-export\": \"off\",\n \"import/no-cycle\": \"error\",\n\n \"promise/prefer-await-to-callbacks\": \"off\",\n\n \"typescript/ban-ts-comment\": [\"error\", { minimumDescriptionLength: 10 }],\n \"typescript/consistent-type-definitions\": \"off\",\n \"typescript/consistent-return\": \"error\",\n \"typescript/consistent-type-exports\": \"error\",\n \"typescript/consistent-type-imports\": [\n \"error\",\n { prefer: \"type-imports\", fixStyle: \"separate-type-imports\" },\n ],\n \"typescript/dot-notation\": \"error\",\n \"typescript/no-confusing-void-expression\": \"error\",\n \"typescript/no-dynamic-delete\": \"error\",\n \"typescript/no-explicit-any\": \"error\",\n \"typescript/no-floating-promises\": \"error\",\n \"typescript/no-misused-promises\": \"error\",\n \"typescript/no-misused-spread\": \"error\",\n \"typescript/no-non-null-assertion\": \"error\",\n \"typescript/no-require-imports\": \"error\",\n \"typescript/no-unnecessary-condition\": \"error\",\n \"typescript/no-unnecessary-qualifier\": \"error\",\n \"typescript/no-unnecessary-type-arguments\": \"error\",\n \"typescript/no-unnecessary-type-assertion\": \"error\",\n \"typescript/no-unnecessary-type-parameters\": \"error\",\n \"typescript/no-unsafe-argument\": \"error\",\n \"typescript/no-unsafe-assignment\": \"error\",\n \"typescript/no-unsafe-call\": \"error\",\n \"typescript/no-unsafe-member-access\": \"error\",\n \"typescript/no-unsafe-return\": \"error\",\n \"typescript/no-useless-default-assignment\": \"error\",\n \"typescript/non-nullable-type-assertion-style\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/prefer-find\": \"error\",\n \"typescript/prefer-nullish-coalescing\": \"error\",\n \"typescript/prefer-optional-chain\": \"error\",\n \"typescript/prefer-readonly\": \"error\",\n \"typescript/prefer-regexp-exec\": \"error\",\n \"typescript/require-await\": \"off\",\n \"typescript/require-array-sort-compare\": \"error\",\n \"typescript/restrict-plus-operands\": \"error\",\n \"typescript/restrict-template-expressions\": \"error\",\n \"typescript/return-await\": \"error\",\n \"typescript/strict-boolean-expressions\": \"error\",\n \"typescript/strict-void-return\": \"error\",\n \"typescript/switch-exhaustiveness-check\": \"error\",\n \"typescript/unbound-method\": \"error\",\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n\n \"unicorn/no-null\": \"off\",\n \"unicorn/no-abusive-eslint-disable\": \"error\",\n \"unicorn/filename-case\": [\"error\", { case: \"kebabCase\" }],\n },\n overrides: [\n {\n files: [\"**/*.{cjs,cts}\"],\n env: {\n node: true,\n },\n rules: {\n \"typescript/no-require-imports\": \"off\",\n },\n },\n {\n files: [\"**/*.config.{js,jsx,ts,tsx,mjs,cjs,mts,cts}\"],\n env: {\n node: true,\n },\n rules: {\n \"func-names\": \"off\",\n },\n },\n {\n files: [\"**/*.d.ts\"],\n rules: {\n \"typescript/no-empty-interface\": \"off\",\n },\n },\n {\n files: [\n \"**/test/**\",\n \"**/tests/**\",\n \"**/__tests__/**\",\n \"**/*.{test,spec}.{js,jsx,ts,tsx,mjs,cjs,mts,cts}\",\n ],\n plugins: [...BASE_LINT_PLUGINS, \"vitest\"],\n env: {\n vitest: true,\n },\n rules: {\n \"vitest/no-importing-vitest-globals\": \"off\",\n \"vitest/max-nested-describe\": [\"error\", { max: 3 }],\n },\n },\n ],\n};\n\nexport const baseLint: OxlintConfig = baseLintConfig;\n\nconst reactLintConfig: OxlintConfig = {\n ...baseLint,\n plugins: [...(baseLint.plugins ?? []), \"react\", \"react-perf\", \"jsx-a11y\"],\n rules: {\n ...baseLint.rules,\n \"jsx-a11y/alt-text\": \"error\",\n\n \"react/jsx-props-no-spreading\": \"off\",\n \"react/react-in-jsx-scope\": \"off\",\n \"react/exhaustive-deps\": \"error\",\n \"react/jsx-key\": \"error\",\n \"react/jsx-max-depth\": [\"error\", { max: 4 }],\n \"react/jsx-no-constructed-context-values\": \"error\",\n \"react/jsx-no-duplicate-props\": \"error\",\n \"react/jsx-no-undef\": \"error\",\n \"react/no-array-index-key\": \"error\",\n \"react/no-children-prop\": \"error\",\n \"react/no-clone-element\": \"error\",\n \"react/no-danger\": \"error\",\n \"react/no-danger-with-children\": \"error\",\n \"react/no-direct-mutation-state\": \"error\",\n \"react/no-find-dom-node\": \"error\",\n \"react/no-react-children\": \"error\",\n \"react/no-string-refs\": \"error\",\n \"react/style-prop-object\": \"off\",\n \"react/no-unsafe\": \"error\",\n \"react/no-unknown-property\": \"error\",\n \"react/void-dom-elements-no-children\": \"error\",\n\n \"react-perf/jsx-no-jsx-as-prop\": \"error\",\n \"react-perf/jsx-no-new-array-as-prop\": \"error\",\n \"react-perf/jsx-no-new-function-as-prop\": \"error\",\n \"react-perf/jsx-no-new-object-as-prop\": \"error\",\n },\n};\n\nexport const reactLint: OxlintConfig = reactLintConfig;\n\nconst serverLintConfig: OxlintConfig = {\n ...baseLint,\n plugins: [...(baseLint.plugins ?? []), \"node\"],\n globals: {\n ...baseLint.globals,\n WebSocketPair: \"readonly\",\n },\n rules: {\n ...baseLint.rules,\n \"node/no-exports-assign\": \"error\",\n },\n};\n\nexport const serverLint: OxlintConfig = serverLintConfig;\n","import type { UserConfig } from \"vite-plus\";\nimport { defineConfig } from \"vite-plus\";\nimport {\n DEFAULT_STAGED_CHECK_COMMAND,\n DEFAULT_STAGED_CHECK_GLOB,\n DEFAULT_TEST_INCLUDE,\n} from \"../shared/constants.ts\";\nimport { baseFmt } from \"../shared/fmt.ts\";\nimport { baseLint } from \"../shared/lint.ts\";\n\nexport const base: UserConfig = defineConfig({\n fmt: baseFmt,\n lint: baseLint,\n test: {\n include: [...DEFAULT_TEST_INCLUDE],\n },\n staged: {\n [DEFAULT_STAGED_CHECK_GLOB]: DEFAULT_STAGED_CHECK_COMMAND,\n },\n});\n"],"mappings":"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"}
@@ -0,0 +1,9 @@
1
+ //#region src/shared/constants.ts
2
+ const DEFAULT_TEST_INCLUDE = ["**/*.{test,spec}.{ts,tsx,mts,cts}"];
3
+ const DEFAULT_STAGED_CHECK_GLOB = "*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}";
4
+ const DEFAULT_STAGED_CHECK_COMMAND = "vp check --fix";
5
+ const DEFAULT_WRANGLER_CONFIG_PATH = "./wrangler.jsonc";
6
+ //#endregion
7
+ export { DEFAULT_WRANGLER_CONFIG_PATH as i, DEFAULT_STAGED_CHECK_GLOB as n, DEFAULT_TEST_INCLUDE as r, DEFAULT_STAGED_CHECK_COMMAND as t };
8
+
9
+ //# sourceMappingURL=constants-CGGN7b-7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants-CGGN7b-7.mjs","names":[],"sources":["../src/shared/constants.ts"],"sourcesContent":["export const DEFAULT_TEST_INCLUDE = [\"**/*.{test,spec}.{ts,tsx,mts,cts}\"] as const;\n\nexport const DEFAULT_STAGED_CHECK_GLOB = \"*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}\";\nexport const DEFAULT_STAGED_CHECK_COMMAND = \"vp check --fix\";\nexport const DEFAULT_WRANGLER_CONFIG_PATH = \"./wrangler.jsonc\";\n"],"mappings":";AAAA,MAAa,uBAAuB,CAAC,oCAAoC;AAEzE,MAAa,4BAA4B;AACzC,MAAa,+BAA+B;AAC5C,MAAa,+BAA+B"}
@@ -0,0 +1,7 @@
1
+ import { UserConfig } from "vite-plus";
2
+
3
+ //#region src/base/index.d.ts
4
+ declare const base: UserConfig;
5
+ //#endregion
6
+ export { base };
7
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/base/index.ts"],"mappings":";;;cAUa,IAAA,EAAM,UAAA"}
@@ -0,0 +1,2 @@
1
+ import { t as base } from "../../base-CEVWvOxk.mjs";
2
+ export { base };
@@ -0,0 +1,7 @@
1
+ import { base } from "./base/index.mjs";
2
+ import { library } from "./library/index.mjs";
3
+ import { monorepo } from "./monorepo/index.mjs";
4
+ import { react } from "./react/index.mjs";
5
+ import { server } from "./server/index.mjs";
6
+ import { CloudflareWorkersTestConfigOptions, cloudflareWorkers, createCloudflareWorkersTestConfig } from "./test/cloudflare-workers/index.mjs";
7
+ export { type CloudflareWorkersTestConfigOptions, base, cloudflareWorkers, createCloudflareWorkersTestConfig, library, monorepo, react, server };
@@ -0,0 +1,7 @@
1
+ import { t as base } from "../base-CEVWvOxk.mjs";
2
+ import { library } from "./library/index.mjs";
3
+ import { monorepo } from "./monorepo/index.mjs";
4
+ import { react } from "./react/index.mjs";
5
+ import { server } from "./server/index.mjs";
6
+ import { cloudflareWorkers, createCloudflareWorkersTestConfig } from "./test/cloudflare-workers/index.mjs";
7
+ export { base, cloudflareWorkers, createCloudflareWorkersTestConfig, library, monorepo, react, server };
@@ -0,0 +1,7 @@
1
+ import { UserConfig } from "vite-plus";
2
+
3
+ //#region src/library/index.d.ts
4
+ declare const library: UserConfig;
5
+ //#endregion
6
+ export { library };
7
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/library/index.ts"],"mappings":";;;cAIa,OAAA,EAAS,UAAA"}
@@ -0,0 +1,15 @@
1
+ import { t as base } from "../../base-CEVWvOxk.mjs";
2
+ import { defineConfig } from "vite-plus";
3
+ //#region src/library/index.ts
4
+ const library = defineConfig({
5
+ ...base,
6
+ pack: {
7
+ dts: true,
8
+ format: ["esm"],
9
+ sourcemap: true
10
+ }
11
+ });
12
+ //#endregion
13
+ export { library };
14
+
15
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/library/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport { defineConfig } from \"vite-plus\";\nimport { base } from \"../base/index.ts\";\n\nexport const library: UserConfig = defineConfig({\n ...base,\n pack: {\n dts: true,\n format: [\"esm\"],\n sourcemap: true,\n },\n});\n"],"mappings":";;;AAIA,MAAa,UAAsB,aAAa;CAC9C,GAAG;CACH,MAAM;EACJ,KAAK;EACL,QAAQ,CAAC,MAAM;EACf,WAAW;EACZ;CACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { UserConfig } from "vite-plus";
2
+
3
+ //#region src/monorepo/index.d.ts
4
+ declare const monorepo: UserConfig;
5
+ //#endregion
6
+ export { monorepo };
7
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/monorepo/index.ts"],"mappings":";;;cAIa,QAAA,EAAU,UAAA"}
@@ -0,0 +1,17 @@
1
+ import { t as base } from "../../base-CEVWvOxk.mjs";
2
+ import { defineConfig } from "vite-plus";
3
+ //#region src/monorepo/index.ts
4
+ const monorepo = defineConfig({
5
+ ...base,
6
+ run: {
7
+ cache: {
8
+ scripts: true,
9
+ tasks: true
10
+ },
11
+ enablePrePostScripts: true
12
+ }
13
+ });
14
+ //#endregion
15
+ export { monorepo };
16
+
17
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/monorepo/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport { defineConfig } from \"vite-plus\";\nimport { base } from \"../base/index.ts\";\n\nexport const monorepo: UserConfig = defineConfig({\n ...base,\n run: {\n cache: {\n scripts: true,\n tasks: true,\n },\n enablePrePostScripts: true,\n },\n});\n"],"mappings":";;;AAIA,MAAa,WAAuB,aAAa;CAC/C,GAAG;CACH,KAAK;EACH,OAAO;GACL,SAAS;GACT,OAAO;GACR;EACD,sBAAsB;EACvB;CACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { UserConfig } from "vite-plus";
2
+
3
+ //#region src/react/index.d.ts
4
+ declare const react: UserConfig;
5
+ //#endregion
6
+ export { react };
7
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/react/index.ts"],"mappings":";;;cAMa,KAAA,EAAO,UAAA"}
@@ -0,0 +1,12 @@
1
+ import { i as reactFmt, n as reactLint, t as base } from "../../base-CEVWvOxk.mjs";
2
+ import { defineConfig } from "vite-plus";
3
+ //#region src/react/index.ts
4
+ const react = defineConfig({
5
+ ...base,
6
+ fmt: reactFmt,
7
+ lint: reactLint
8
+ });
9
+ //#endregion
10
+ export { react };
11
+
12
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/react/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport { defineConfig } from \"vite-plus\";\nimport { base } from \"../base/index.ts\";\nimport { reactFmt } from \"../shared/fmt.ts\";\nimport { reactLint } from \"../shared/lint.ts\";\n\nexport const react: UserConfig = defineConfig({\n ...base,\n fmt: reactFmt,\n lint: reactLint,\n});\n"],"mappings":";;;AAMA,MAAa,QAAoB,aAAa;CAC5C,GAAG;CACH,KAAK;CACL,MAAM;CACP,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { UserConfig } from "vite-plus";
2
+
3
+ //#region src/server/index.d.ts
4
+ declare const server: UserConfig;
5
+ //#endregion
6
+ export { server };
7
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/server/index.ts"],"mappings":";;;cAKa,MAAA,EAAQ,UAAA"}
@@ -0,0 +1,11 @@
1
+ import { r as serverLint, t as base } from "../../base-CEVWvOxk.mjs";
2
+ import { defineConfig } from "vite-plus";
3
+ //#region src/server/index.ts
4
+ const server = defineConfig({
5
+ ...base,
6
+ lint: serverLint
7
+ });
8
+ //#endregion
9
+ export { server };
10
+
11
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/server/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport { defineConfig } from \"vite-plus\";\nimport { base } from \"../base/index.ts\";\nimport { serverLint } from \"../shared/lint.ts\";\n\nexport const server: UserConfig = defineConfig({\n ...base,\n lint: serverLint,\n});\n"],"mappings":";;;AAKA,MAAa,SAAqB,aAAa;CAC7C,GAAG;CACH,MAAM;CACP,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { UserConfig } from "vite-plus";
2
+ import { cloudflareTest } from "@cloudflare/vitest-pool-workers";
3
+
4
+ //#region src/test/cloudflare-workers/index.d.ts
5
+ type CloudflareWorkersPluginOptions = Exclude<NonNullable<Parameters<typeof cloudflareTest>[0]>, (...args: never[]) => unknown>;
6
+ interface CloudflareWorkersTestConfigOptions extends Omit<CloudflareWorkersPluginOptions, "wrangler"> {
7
+ include?: string[];
8
+ wrangler?: CloudflareWorkersPluginOptions["wrangler"];
9
+ }
10
+ declare function createCloudflareWorkersTestConfig(options?: CloudflareWorkersTestConfigOptions): UserConfig;
11
+ declare const cloudflareWorkers: UserConfig;
12
+ //#endregion
13
+ export { CloudflareWorkersTestConfigOptions, cloudflareWorkers, createCloudflareWorkersTestConfig };
14
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/test/cloudflare-workers/index.ts"],"mappings":";;;;KAKK,8BAAA,GAAiC,OAAA,CACpC,WAAA,CAAY,UAAA,QAAkB,cAAA,WAC1B,IAAA;AAAA,UAGW,kCAAA,SAA2C,IAAA,CAC1D,8BAAA;EAGA,OAAA;EACA,QAAA,GAAW,8BAAA;AAAA;AAAA,iBAGG,iCAAA,CACd,OAAA,GAAS,kCAAA,GACR,UAAA;AAAA,cAmBU,iBAAA,EAAiB,UAAA"}
@@ -0,0 +1,22 @@
1
+ import { i as DEFAULT_WRANGLER_CONFIG_PATH, r as DEFAULT_TEST_INCLUDE } from "../../../constants-CGGN7b-7.mjs";
2
+ import { defineConfig } from "vite-plus";
3
+ import { cloudflareTest } from "@cloudflare/vitest-pool-workers";
4
+ //#region src/test/cloudflare-workers/index.ts
5
+ function createCloudflareWorkersTestConfig(options = {}) {
6
+ const { include = [...DEFAULT_TEST_INCLUDE], wrangler, ...pluginOptions } = options;
7
+ return defineConfig({
8
+ plugins: [cloudflareTest({
9
+ ...pluginOptions,
10
+ wrangler: {
11
+ configPath: DEFAULT_WRANGLER_CONFIG_PATH,
12
+ ...wrangler
13
+ }
14
+ })],
15
+ test: { include }
16
+ });
17
+ }
18
+ const cloudflareWorkers = createCloudflareWorkersTestConfig();
19
+ //#endregion
20
+ export { cloudflareWorkers, createCloudflareWorkersTestConfig };
21
+
22
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/test/cloudflare-workers/index.ts"],"sourcesContent":["import type { UserConfig } from \"vite-plus\";\nimport { cloudflareTest } from \"@cloudflare/vitest-pool-workers\";\nimport { defineConfig } from \"vite-plus\";\nimport { DEFAULT_TEST_INCLUDE, DEFAULT_WRANGLER_CONFIG_PATH } from \"../../shared/constants.ts\";\n\ntype CloudflareWorkersPluginOptions = Exclude<\n NonNullable<Parameters<typeof cloudflareTest>[0]>,\n (...args: never[]) => unknown\n>;\n\nexport interface CloudflareWorkersTestConfigOptions extends Omit<\n CloudflareWorkersPluginOptions,\n \"wrangler\"\n> {\n include?: string[];\n wrangler?: CloudflareWorkersPluginOptions[\"wrangler\"];\n}\n\nexport function createCloudflareWorkersTestConfig(\n options: CloudflareWorkersTestConfigOptions = {},\n): UserConfig {\n const { include = [...DEFAULT_TEST_INCLUDE], wrangler, ...pluginOptions } = options;\n\n return defineConfig({\n plugins: [\n cloudflareTest({\n ...pluginOptions,\n wrangler: {\n configPath: DEFAULT_WRANGLER_CONFIG_PATH,\n ...wrangler,\n },\n }),\n ],\n test: {\n include,\n },\n });\n}\n\nexport const cloudflareWorkers = createCloudflareWorkersTestConfig();\n"],"mappings":";;;;AAkBA,SAAgB,kCACd,UAA8C,EAAE,EACpC;CACZ,MAAM,EAAE,UAAU,CAAC,GAAG,qBAAqB,EAAE,UAAU,GAAG,kBAAkB;AAE5E,QAAO,aAAa;EAClB,SAAS,CACP,eAAe;GACb,GAAG;GACH,UAAU;IACR,YAAY;IACZ,GAAG;IACJ;GACF,CAAC,CACH;EACD,MAAM,EACJ,SACD;EACF,CAAC;;AAGJ,MAAa,oBAAoB,mCAAmC"}
package/package.json ADDED
@@ -0,0 +1,100 @@
1
+ {
2
+ "name": "@kasoa/vite-plus-config",
3
+ "version": "0.0.2",
4
+ "description": "Kasoa's Vite+ configurations",
5
+ "keywords": [
6
+ "config",
7
+ "kasoa",
8
+ "tooling",
9
+ "vite",
10
+ "vite-plus"
11
+ ],
12
+ "homepage": "https://github.com/emmanuelchucks/kasoa/tree/main/packages/vite-plus-config",
13
+ "bugs": {
14
+ "url": "https://github.com/emmanuelchucks/kasoa/issues"
15
+ },
16
+ "license": "MIT",
17
+ "author": {
18
+ "name": "Emmanuel Chucks",
19
+ "email": "hi@emmanuelchucks.com",
20
+ "url": "https://emmanuelchucks.com"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/emmanuelchucks/kasoa.git",
25
+ "directory": "packages/vite-plus-config"
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "type": "module",
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/src/index.d.mts",
34
+ "import": "./dist/src/index.mjs"
35
+ },
36
+ "./base": {
37
+ "types": "./dist/src/base/index.d.mts",
38
+ "import": "./dist/src/base/index.mjs"
39
+ },
40
+ "./react": {
41
+ "types": "./dist/src/react/index.d.mts",
42
+ "import": "./dist/src/react/index.mjs"
43
+ },
44
+ "./server": {
45
+ "types": "./dist/src/server/index.d.mts",
46
+ "import": "./dist/src/server/index.mjs"
47
+ },
48
+ "./library": {
49
+ "types": "./dist/src/library/index.d.mts",
50
+ "import": "./dist/src/library/index.mjs"
51
+ },
52
+ "./monorepo": {
53
+ "types": "./dist/src/monorepo/index.d.mts",
54
+ "import": "./dist/src/monorepo/index.mjs"
55
+ },
56
+ "./test/cloudflare-workers": {
57
+ "types": "./dist/src/test/cloudflare-workers/index.d.mts",
58
+ "import": "./dist/src/test/cloudflare-workers/index.mjs"
59
+ }
60
+ },
61
+ "publishConfig": {
62
+ "access": "public"
63
+ },
64
+ "devDependencies": {
65
+ "@cloudflare/vitest-pool-workers": "^0.13.4",
66
+ "@types/node": "^25.5.0",
67
+ "@typescript/native-preview": "^7.0.0-dev.20260319.1",
68
+ "oxfmt": "^0.42.0",
69
+ "oxlint": "^1.57.0",
70
+ "oxlint-tsgolint": "^0.17.3",
71
+ "vite-plus": "^0.1.14",
72
+ "wrangler": "^4.77.0"
73
+ },
74
+ "peerDependencies": {
75
+ "@cloudflare/vitest-pool-workers": ">=0.13.0 <1",
76
+ "vite-plus": ">=0.1.14 <1",
77
+ "wrangler": ">=4 <5"
78
+ },
79
+ "peerDependenciesMeta": {
80
+ "@cloudflare/vitest-pool-workers": {
81
+ "optional": true
82
+ },
83
+ "wrangler": {
84
+ "optional": true
85
+ }
86
+ },
87
+ "engines": {
88
+ "node": ">=24"
89
+ },
90
+ "scripts": {
91
+ "dev": "vp pack --watch",
92
+ "build": "vp pack",
93
+ "check": "vp check",
94
+ "check:fix": "vp check --fix",
95
+ "lint": "vp lint --fix .",
96
+ "format": "vp fmt .",
97
+ "typecheck": "vp exec tsgo --noEmit",
98
+ "test": "vp test --passWithNoTests"
99
+ }
100
+ }