@rimelight/config 0.0.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.
- package/README.md +75 -0
- package/package.json +40 -0
- package/tsconfig/base.json +31 -0
- package/tsconfig/solid.json +9 -0
- package/vite-plus/base.ts +24 -0
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# @rimelight/config
|
|
2
|
+
|
|
3
|
+
Shared configuration package for Rimelight Entertainment projects.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add -D @rimelight/config
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## TypeScript Configs
|
|
12
|
+
|
|
13
|
+
### Base Config
|
|
14
|
+
|
|
15
|
+
Default strict TypeScript configuration for all Rimelight projects:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"extends": "@rimelight/config/tsconfig/base.json"
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### SolidJS Config
|
|
24
|
+
|
|
25
|
+
For SolidJS/Astro projects:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"extends": "@rimelight/config/tsconfig/solid.json"
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Vite+ Configs
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { rimelightConfig } from "@rimelight/config/vite-plus/base"
|
|
37
|
+
|
|
38
|
+
export default defineConfig({
|
|
39
|
+
...rimelightConfig()
|
|
40
|
+
// your custom config
|
|
41
|
+
})
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Config Details
|
|
45
|
+
|
|
46
|
+
### TypeScript Base Config
|
|
47
|
+
|
|
48
|
+
- Target: ESNext
|
|
49
|
+
- Module: ESNext
|
|
50
|
+
- Strict mode enabled
|
|
51
|
+
- DOM and Node types
|
|
52
|
+
- Solid JSX support
|
|
53
|
+
- No emission (for Vite projects)
|
|
54
|
+
- All strict checks enabled by default
|
|
55
|
+
|
|
56
|
+
### Vite+ Base Config
|
|
57
|
+
|
|
58
|
+
- Type-aware linting
|
|
59
|
+
- Type checking
|
|
60
|
+
- Consistent formatting rules
|
|
61
|
+
- No trailing commas
|
|
62
|
+
- No semicolons
|
|
63
|
+
- Consistent quote props
|
|
64
|
+
|
|
65
|
+
## Usage in Rimelight Monorepo
|
|
66
|
+
|
|
67
|
+
Internal packages should reference the config via workspace:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@rimelight/config": "workspace:*"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rimelight/config",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Rimelight Entertainment's shared configuration package",
|
|
6
|
+
"homepage": "https://rimelight.com/docs",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/Rimelight-Entertainment/rimelight/issues"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "Rimelight Entertainment"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/Rimelight-Entertainment/rimelight.git"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"tsconfig",
|
|
20
|
+
"vite-plus",
|
|
21
|
+
"src"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"exports": {
|
|
25
|
+
"./tsconfig/base": "./tsconfig/base.json",
|
|
26
|
+
"./tsconfig/solid": "./tsconfig/solid.json",
|
|
27
|
+
"./vite-plus/base": "./vite-plus/base.ts"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"typescript": "6.0.3",
|
|
34
|
+
"vite-plus": "0.2.9"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=26.7.0"
|
|
38
|
+
},
|
|
39
|
+
"packageManager": "pnpm@11.22.0"
|
|
40
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"exclude": ["dist"],
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
8
|
+
"types": ["node"],
|
|
9
|
+
"allowImportingTsExtensions": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"verbatimModuleSyntax": true,
|
|
12
|
+
"isolatedModules": true,
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"forceConsistentCasingInFileNames": true,
|
|
16
|
+
"strict": true,
|
|
17
|
+
"skipLibCheck": true,
|
|
18
|
+
"allowJs": true,
|
|
19
|
+
"jsx": "preserve",
|
|
20
|
+
"allowArbitraryExtensions": true,
|
|
21
|
+
"noFallthroughCasesInSwitch": true,
|
|
22
|
+
"noImplicitOverride": true,
|
|
23
|
+
"noImplicitReturns": true,
|
|
24
|
+
"noUnusedLocals": true,
|
|
25
|
+
"noUnusedParameters": true,
|
|
26
|
+
"noUncheckedIndexedAccess": true,
|
|
27
|
+
"exactOptionalPropertyTypes": true,
|
|
28
|
+
"allowUnreachableCode": false,
|
|
29
|
+
"allowUnusedLabels": false
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { UserConfig } from "vite-plus"
|
|
2
|
+
|
|
3
|
+
export function rimelightConfig(): UserConfig {
|
|
4
|
+
return {
|
|
5
|
+
lint: {
|
|
6
|
+
options: {
|
|
7
|
+
typeAware: true,
|
|
8
|
+
typeCheck: true
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
fmt: {
|
|
12
|
+
jsdoc: {
|
|
13
|
+
bracketSpacing: true,
|
|
14
|
+
commentLineStrategy: "multiline"
|
|
15
|
+
},
|
|
16
|
+
trailingComma: "none",
|
|
17
|
+
semi: false,
|
|
18
|
+
quoteProps: "consistent"
|
|
19
|
+
},
|
|
20
|
+
staged: {
|
|
21
|
+
"*": "vp check --fix"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|