Rindo Style Guide
This is a component style guide created and enforced internally by the core team of Rindo, for the purpose of standardizing Rindo components. This should only be used as a reference for other teams in creating their own style guides. Feel free to modify to your team's own preference.
note
In order to enforce this (or your team's) style guide, we recommend leveraging a static analysis tool like ESLint.
note
This guide once recommended TSLint as a static analysis tool. TSLint has been deprecated by its maintaining organization in favor of ESLint and is no longer recommended by the Rindo team.
File structure​
- One component per file.
- One component per directory. Though it may make sense to group similar components into the same directory, we've found it's easier to document components when each one has its own directory.
- Implementation (.tsx) and styles of a component should live in the same directory.
Example from family-core:
├── my-card
│ ├── my-card.ios.css
│ ├── my-card.md.css
│ ├── my-card.css
│ ├── my-card.tsx
│ └── test
│ └── basic
│ ├── e2e.js
│ └── index.html
├── my-card-content