@rtorcato/repo-tooling 2.59.0 → 3.0.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/package.json
CHANGED
package/tooling/biome/README.md
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
# Biome Configuration
|
|
2
|
-
|
|
3
|
-
This package provides a standardized Biome configuration for consistent code formatting and linting across projects.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install -D @rtorcato/repo-tooling @biomejs/biome
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
### Option 1: CLI Copy Command (Recommended)
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npx @rtorcato/repo-tooling copy biome
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
This will copy the base `biome.json` configuration to your project root.
|
|
20
|
-
|
|
21
|
-
### Option 2: Manual Copy
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
cp node_modules/@rtorcato/repo-tooling/tooling/biome/biome.json ./biome.json
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### Option 3: Reference in package.json
|
|
28
|
-
|
|
29
|
-
```json
|
|
30
|
-
{
|
|
31
|
-
"scripts": {
|
|
32
|
-
"lint": "biome lint .",
|
|
33
|
-
"format": "biome format .",
|
|
34
|
-
"check": "biome check .",
|
|
35
|
-
"check:fix": "biome check --fix ."
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Configuration Features
|
|
41
|
-
|
|
42
|
-
- **Formatter**: Tab indentation, 100 character line width, single quotes
|
|
43
|
-
- **Linter**: Recommended rules with sensible overrides
|
|
44
|
-
- **JavaScript**: ES5 trailing commas, semicolons as needed
|
|
45
|
-
- **Import organization**: Disabled to prevent conflicts
|
|
46
|
-
- **File patterns**: Excludes common build/config directories
|
|
47
|
-
|
|
48
|
-
## Customization
|
|
49
|
-
|
|
50
|
-
After copying the configuration, you can customize it for your project:
|
|
51
|
-
|
|
52
|
-
```json
|
|
53
|
-
{
|
|
54
|
-
// Add project-specific rules
|
|
55
|
-
"linter": {
|
|
56
|
-
"rules": {
|
|
57
|
-
"recommended": true,
|
|
58
|
-
"suspicious": {
|
|
59
|
-
"noExplicitAny": "error"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
// Add project-specific file patterns
|
|
64
|
-
"files": {
|
|
65
|
-
"includes": [
|
|
66
|
-
"src/**/*",
|
|
67
|
-
"!src/generated/**"
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## VS Code Integration
|
|
74
|
-
|
|
75
|
-
Add to your `.vscode/settings.json`:
|
|
76
|
-
|
|
77
|
-
```json
|
|
78
|
-
{
|
|
79
|
-
"editor.defaultFormatter": "biomejs.biome",
|
|
80
|
-
"editor.formatOnSave": true,
|
|
81
|
-
"editor.codeActionsOnSave": {
|
|
82
|
-
"quickfix.biome": "explicit",
|
|
83
|
-
"source.organizeImports.biome": "explicit"
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Why Biome Can't Extend Configurations
|
|
89
|
-
|
|
90
|
-
Unlike ESLint or TypeScript, Biome doesn't support configuration inheritance/extending. Each project needs its own complete `biome.json` file. This package provides a well-tested base configuration that you can copy and customize.
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Changesets preset
|
|
2
|
-
|
|
3
|
-
Shared [Changesets](https://github.com/changesets/changesets) configuration for projects using `@rtorcato/repo-tooling`.
|
|
4
|
-
|
|
5
|
-
Changesets is a **monorepo-friendly alternative to semantic-release**. The release workflow is the same shape (CI bumps versions, generates a changelog, publishes to npm), but the *intent* is captured in changeset markdown files at PR time rather than parsed from commit messages.
|
|
6
|
-
|
|
7
|
-
Pick one — Changesets or semantic-release — per repo. The `doctor` check flags repos configured for both.
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npx @rtorcato/repo-tooling copy changesets
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
This scaffolds `.changeset/config.json` from this preset. After that:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
pnpm changeset # interactive — author a changeset for the current change
|
|
19
|
-
pnpm changeset version # consume changesets, bump versions, write CHANGELOG.md
|
|
20
|
-
pnpm changeset publish # publish to npm
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
CI typically runs the [Changesets release bot](https://github.com/changesets/action), which opens a "Version Packages" PR when changesets are present and publishes on merge.
|
|
24
|
-
|
|
25
|
-
## Why pick this over semantic-release
|
|
26
|
-
|
|
27
|
-
- **Monorepos** — Changesets handles multi-package version bumps in a way semantic-release doesn't out of the box.
|
|
28
|
-
- **Explicit intent** — Authors declare a change's bump level in the changeset file rather than encoding it in commit message conventions, which is more forgiving for human commits.
|
|
29
|
-
- **Pre-release flows** — `--snapshot` and `pre enter <tag>` are first-class.
|
|
30
|
-
|
|
31
|
-
## Why pick semantic-release instead
|
|
32
|
-
|
|
33
|
-
- **Single-package repos** — Less ceremony; nothing to author per change.
|
|
34
|
-
- **Strict conventional-commits discipline already in place.**
|
|
35
|
-
- **Existing CI built around the `npm run release` path.**
|
package/tooling/oxlint/README.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Oxlint preset
|
|
2
|
-
|
|
3
|
-
Shared [Oxlint](https://oxc.rs/docs/guide/usage/linter.html) configuration for projects using `@rtorcato/repo-tooling`.
|
|
4
|
-
|
|
5
|
-
Oxlint is a Rust-based linter that's 50–100× faster than ESLint. It is intentionally **additive** to Biome — Biome handles formatting and the broad lint baseline, Oxlint adds a faster pass for the type-aware and import rules Biome doesn't cover yet.
|
|
6
|
-
|
|
7
|
-
## Usage
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npx @rtorcato/repo-tooling copy oxlint
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
This drops `.oxlintrc.json` at the project root, extending the conventions in this preset. Run it with:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
pnpm oxlint
|
|
17
|
-
# or
|
|
18
|
-
npx oxlint
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Notes
|
|
22
|
-
|
|
23
|
-
- Oxlint shares its rule catalog with ESLint's plugins (`typescript`, `unicorn`, `oxc`, `import`), so most ESLint rules you know already work here.
|
|
24
|
-
- The preset disables Biome-overlapping rules to keep CI noise down — Biome stays the source of truth for formatting and the baseline lint set.
|
|
25
|
-
- For projects without Biome, you can run Oxlint standalone and re-enable the `style` and `pedantic` categories.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# `tsconfig`
|
|
2
|
-
|
|
3
|
-
These are base shared `tsconfig.json` files from which all other `tsconfig.json`'s inherit.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
1. **Install this package** (if published as a package):
|
|
8
|
-
```sh
|
|
9
|
-
pnpm add -D @your-org/tsconfig
|
|
10
|
-
# or
|
|
11
|
-
npm install --save-dev @your-org/tsconfig
|
|
12
|
-
# or
|
|
13
|
-
yarn add -D @your-org/tsconfig
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
2. **Extend the relevant config in your project `tsconfig.json`:**
|
|
17
|
-
```jsonc
|
|
18
|
-
{
|
|
19
|
-
"extends": "./path/to/tooling/typescript/tsconfig.base.json", // or tsconfig.react.jsonc, etc.
|
|
20
|
-
// ...your overrides
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
Replace the path with the config that matches your project type:
|
|
24
|
-
- `tsconfig.base.jsonc`: General base config
|
|
25
|
-
- `tsconfig.build.jsonc`: For npm package/library builds
|
|
26
|
-
- `tsconfig.react.jsonc`: For React apps
|
|
27
|
-
- `tsconfig.next.jsonc`: For Next.js apps
|
|
28
|
-
- `tsconfig.node.jsonc`: For Node.js/Express APIs
|
|
29
|
-
- `tsconfig.express.jsonc`: (If used) For Express APIs
|
|
30
|
-
|
|
31
|
-
3. **Customizing:**
|
|
32
|
-
You can override or add any settings in your own `tsconfig.json` as needed.
|
|
33
|
-
|
|
34
|
-
## Example
|
|
35
|
-
|
|
36
|
-
```jsonc
|
|
37
|
-
{
|
|
38
|
-
"extends": "../tooling/typescript/tsconfig.react.json",
|
|
39
|
-
// `~/*` and `@/*` → `./src/*` are inherited from the preset, anchored to this
|
|
40
|
-
// project via ${configDir} — no `baseUrl`/`paths` needed (baseUrl is deprecated
|
|
41
|
-
// in TS 5.9, removed in TS 7.0).
|
|
42
|
-
"include": ["src"]
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Notes
|
|
47
|
-
- These configs are meant to be shared and extended, not used directly.
|
|
48
|
-
- Pick the config that matches your project type for best results.
|
|
49
|
-
|