Skip to content

Commit 02a9b25

Browse files
justin808claude
andcommitted
Move RBS documentation to contributor docs
Based on PR feedback, move detailed RBS documentation from main README to contributor-specific documentation where it's more appropriate. Changes: - Removed RBS section from README.md - Created docs/contributor-info/rbs-type-signatures.md with comprehensive documentation - Added link to RBS docs in CONTRIBUTING.md - Documentation includes benefits, IDE support, usage, location info, and contributing guidelines The RBS documentation is now properly positioned as contributor documentation rather than top-level user documentation. Fixes #1953 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 7f330e4 commit 02a9b25

File tree

3 files changed

+84
-55
lines changed

3 files changed

+84
-55
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ During this transition:
1414

1515
- [docs/contributor-info/Releasing](./docs/contributor-info/releasing.md) for instructions on releasing.
1616
- [docs/contributor-info/pull-requests](./docs/contributor-info/pull-requests.md)
17+
- [docs/contributor-info/rbs-type-signatures](./docs/contributor-info/rbs-type-signatures.md) for information on RBS type signatures
1718
- See other docs in [docs/contributor-info](./docs/contributor-info)
1819

1920
## Prerequisites

README.md

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -148,61 +148,6 @@ _Requires creating a free account._
148148
- Node.js >= 20 (CI tested: 20 - 22)
149149
- A JavaScript package manager (npm, yarn, pnpm, or bun)
150150

151-
# 🔍 Type Safety (RBS)
152-
153-
React on Rails includes [RBS](https://github.com/ruby/rbs) type signatures for improved type safety and IDE support.
154-
155-
## Benefits
156-
157-
- Better autocomplete in supported IDEs
158-
- Early detection of type errors
159-
- Improved code documentation through types
160-
- Enhanced refactoring safety
161-
162-
## IDE Support
163-
164-
RBS signatures work with:
165-
166-
- [Steep](https://github.com/soutaro/steep) - Static type checker for Ruby
167-
- [Solargraph](https://solargraph.org/) - Ruby language server with RBS support
168-
- RubyMine - Built-in RBS support
169-
- VS Code - Via Ruby LSP extensions
170-
171-
## Usage
172-
173-
### Validation
174-
175-
To validate type signatures:
176-
177-
```bash
178-
bundle exec rake rbs:validate
179-
```
180-
181-
Or directly using the RBS CLI:
182-
183-
```bash
184-
bundle exec rbs -I sig validate
185-
```
186-
187-
### Listing Type Files
188-
189-
To see all available RBS type signature files:
190-
191-
```bash
192-
bundle exec rake rbs:list
193-
```
194-
195-
## Location
196-
197-
Type signatures are located in the `sig/` directory, organized to mirror the `lib/` directory structure. For more details, see [sig/README.md](sig/README.md).
198-
199-
## Compatibility
200-
201-
- Ruby >= 3.0 (RBS is included in Ruby 3.0+)
202-
- RBS gem >= 2.0
203-
204-
For more information about RBS, visit the [official RBS documentation](https://github.com/ruby/rbs).
205-
206151
# 🆘 Get Help & Support
207152

208153
**Need immediate help?** Here are your options, ordered by response time:
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# RBS Type Signatures
2+
3+
React on Rails includes [RBS](https://github.com/ruby/rbs) type signatures for improved type safety and IDE support.
4+
5+
## Benefits
6+
7+
- **Better autocomplete** in supported IDEs
8+
- **Early detection of type errors** during development
9+
- **Improved code documentation** through types
10+
- **Enhanced refactoring safety** with type-aware tools
11+
12+
## IDE Support
13+
14+
RBS signatures work with:
15+
16+
- [Steep](https://github.com/soutaro/steep) - Static type checker for Ruby
17+
- [Solargraph](https://solargraph.org/) - Ruby language server with RBS support
18+
- RubyMine - Built-in RBS support
19+
- VS Code - Via Ruby LSP extensions
20+
21+
## Usage
22+
23+
### Validation
24+
25+
To validate type signatures:
26+
27+
```bash
28+
bundle exec rake rbs:validate
29+
```
30+
31+
Or directly using the RBS CLI:
32+
33+
```bash
34+
bundle exec rbs -I sig validate
35+
```
36+
37+
### Listing Type Files
38+
39+
To see all available RBS type signature files:
40+
41+
```bash
42+
bundle exec rake rbs:list
43+
```
44+
45+
## Location
46+
47+
Type signatures are located in the `sig/` directory, organized to mirror the `lib/` directory structure:
48+
49+
```
50+
sig/
51+
├── react_on_rails.rbs # Main module and core classes
52+
├── react_on_rails/
53+
│ ├── configuration.rbs # Configuration class types
54+
│ ├── helper.rbs # View helper method signatures
55+
│ ├── server_rendering_pool.rbs # Server rendering types
56+
│ ├── utils.rbs # Utility method signatures
57+
│ └── ... # And more
58+
```
59+
60+
For more details, see [sig/README.md](../../sig/README.md).
61+
62+
## Contributing
63+
64+
When adding new public methods or classes to the gem, please also add corresponding RBS signatures. This helps maintain type safety and improves the development experience for all users.
65+
66+
### Adding New Signatures
67+
68+
1. Create or update the appropriate `.rbs` file in the `sig/` directory
69+
2. Follow the existing structure and naming conventions
70+
3. Run `bundle exec rake rbs:validate` to verify your changes
71+
4. Include the RBS updates in your pull request
72+
73+
## Compatibility
74+
75+
- Ruby >= 3.0 (RBS is included in Ruby 3.0+)
76+
- RBS gem >= 2.0
77+
78+
## Resources
79+
80+
- [RBS Documentation](https://github.com/ruby/rbs)
81+
- [RBS Syntax Guide](https://github.com/ruby/rbs/blob/master/docs/syntax.md)
82+
- [Steep Type Checker](https://github.com/soutaro/steep)
83+
- [Solargraph Language Server](https://solargraph.org/)

0 commit comments

Comments
 (0)