ras-stack 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -182,6 +182,28 @@ Extend the supplied configuration and override anything specific to the applicat
182
182
 
183
183
  TypeScript bases are also available at `ras-stack/config/typescript/browser` and `ras-stack/config/typescript/library`.
184
184
 
185
+ The TypeScript configs compose by runtime role:
186
+
187
+ - `base` contains runtime-neutral strictness and module-safety options.
188
+ - `bundler` adds ESM bundler resolution without assuming DOM or Node globals.
189
+ - `browser` adds DOM, JSX, and no-emit defaults.
190
+ - `tanstack` adds Vite and Node types to the browser role.
191
+ - `node-bundler` targets bundled Node 24 workers and scripts.
192
+ - `library` uses NodeNext resolution and declaration-friendly strictness.
193
+
194
+ Oxlint applications can extend the strict default plus independent layers for shared application preferences and generated TanStack files:
195
+
196
+ ```json
197
+ {
198
+ "extends": ["./node_modules/ras-stack/config/oxlint/application.json", "./node_modules/ras-stack/config/oxlint/tanstack.json"],
199
+ "rules": {
200
+ "application-specific-rule": "off"
201
+ }
202
+ }
203
+ ```
204
+
205
+ These configs do not set include paths, aliases, generated directories outside TanStack's route tree, or framework-specific worker globals. Keep those differences in the consuming repository.
206
+
185
207
  ## Repository policy
186
208
 
187
209
  Policy files which cannot inherit can stay committed while being checked against the shared source. Select only the policies a repository wants in `ras-stack.policy.json`:
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": ["../oxlint.json"],
3
+ "rules": {
4
+ "no-console": "off",
5
+ "no-await-in-loop": "off",
6
+ "no-underscore-dangle": "off",
7
+ "unicorn/require-post-message-target-origin": "off",
8
+ "vitest/require-to-throw-message": "off",
9
+ "vitest/no-conditional-expect": "off",
10
+ "unicorn/no-array-sort": "off",
11
+ "oxc/no-map-spread": "off",
12
+ "unicorn/consistent-function-scoping": "off",
13
+ "unicorn/prefer-add-event-listener": "off",
14
+ "typescript/no-unnecessary-type-parameters": "off"
15
+ }
16
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": ["../oxlint.json"],
3
+ "ignorePatterns": ["src/routeTree.gen.ts", ".output/**", "node_modules/**"]
4
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "noUncheckedIndexedAccess": true,
5
+ "esModuleInterop": true,
6
+ "skipLibCheck": true,
7
+ "forceConsistentCasingInFileNames": true,
8
+ "verbatimModuleSyntax": true
9
+ }
10
+ }
@@ -1,15 +1,8 @@
1
1
  {
2
+ "extends": "./bundler.json",
2
3
  "compilerOptions": {
3
- "strict": true,
4
- "noUncheckedIndexedAccess": true,
5
- "esModuleInterop": true,
6
4
  "jsx": "react-jsx",
7
- "module": "ESNext",
8
- "moduleResolution": "Bundler",
9
- "target": "ES2023",
10
5
  "lib": ["ES2023", "DOM", "DOM.Iterable"],
11
- "skipLibCheck": true,
12
- "noEmit": true,
13
- "verbatimModuleSyntax": true
6
+ "noEmit": true
14
7
  }
15
8
  }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "./base.json",
3
+ "compilerOptions": {
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "target": "ES2023",
7
+ "lib": ["ES2023"]
8
+ }
9
+ }
@@ -1,13 +1,11 @@
1
1
  {
2
+ "extends": "./base.json",
2
3
  "compilerOptions": {
3
- "strict": true,
4
- "noUncheckedIndexedAccess": true,
5
4
  "exactOptionalPropertyTypes": true,
6
5
  "module": "NodeNext",
7
6
  "moduleResolution": "NodeNext",
8
7
  "target": "ES2024",
9
8
  "lib": ["ES2024", "DOM", "DOM.Iterable"],
10
- "skipLibCheck": true,
11
- "verbatimModuleSyntax": true
9
+ "skipLibCheck": true
12
10
  }
13
11
  }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "./bundler.json",
3
+ "compilerOptions": {
4
+ "target": "ES2024",
5
+ "lib": ["ES2024"],
6
+ "types": ["node"],
7
+ "noEmit": true
8
+ }
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ras-stack",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Composable full-stack primitives shared across Richard Solomou's applications.",
5
5
  "keywords": [
6
6
  "authentication",
@@ -59,8 +59,13 @@
59
59
  "default": "./dist/uploads/index.js"
60
60
  },
61
61
  "./config/oxlint": "./config/oxlint.json",
62
+ "./config/oxlint/application": "./config/oxlint/application.json",
63
+ "./config/oxlint/tanstack": "./config/oxlint/tanstack.json",
64
+ "./config/typescript/base": "./config/typescript/base.json",
62
65
  "./config/typescript/browser": "./config/typescript/browser.json",
66
+ "./config/typescript/bundler": "./config/typescript/bundler.json",
63
67
  "./config/typescript/library": "./config/typescript/library.json",
68
+ "./config/typescript/node-bundler": "./config/typescript/node-bundler.json",
64
69
  "./config/typescript/tanstack": "./config/typescript/tanstack.json"
65
70
  },
66
71
  "publishConfig": {
@@ -68,7 +73,7 @@
68
73
  },
69
74
  "scripts": {
70
75
  "build": "tsc -p tsconfig.build.json",
71
- "config:check": "tsc -p test/config-consumer/tsconfig.json",
76
+ "config:check": "tsc -p test/config-consumer/tsconfig.json && tsc -p test/config-consumer/tsconfig-bundler.json && tsc -p test/config-consumer/tsconfig-node-bundler.json && tsc -p test/config-consumer/tsconfig-library.json && oxlint --config config/oxlint/application.json --print-config > /dev/null && oxlint --config config/oxlint/tanstack.json --print-config > /dev/null",
72
77
  "typecheck": "tsc --noEmit",
73
78
  "lint": "oxlint --type-aware --deny-warnings .",
74
79
  "format": "oxfmt --write .",