https://github.com/rightcapitalhq/frontend-style-guide
RightCapital's frontend style guide.
https://github.com/rightcapitalhq/frontend-style-guide
eslint eslint-config eslint-rules javascript prettier rightcapital styleguide typescript
Last synced: 3 months ago
JSON representation
RightCapital's frontend style guide.
- Host: GitHub
- URL: https://github.com/rightcapitalhq/frontend-style-guide
- Owner: RightCapitalHQ
- License: mit
- Created: 2023-08-22T01:54:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-02T23:19:49.000Z (about 1 year ago)
- Last Synced: 2025-04-03T01:14:45.235Z (about 1 year ago)
- Topics: eslint, eslint-config, eslint-rules, javascript, prettier, rightcapital, styleguide, typescript
- Language: TypeScript
- Homepage:
- Size: 2.27 MB
- Stars: 9
- Watchers: 6
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RightCapital Frontend Style Guide
[](https://rightcapital.com)

[](https://conventionalcommits.org)
[](https://github.com/RightCapitalHQ/frontend-style-guide)
RightCapital's frontend style guide monorepo — shared configs for ESLint, Prettier, TypeScript, and related tooling.
## Packages
| Package | Version | Description |
| ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| [`@rightcapital/eslint-config`](packages/eslint-config) | [](https://www.npmjs.com/package/@rightcapital/eslint-config) | ESLint flat config with JS, TS, and React support |
| [`@rightcapital/eslint-plugin`](packages/eslint-plugin) | [](https://www.npmjs.com/package/@rightcapital/eslint-plugin) | Custom ESLint rules |
| [`@rightcapital/prettier-config`](packages/prettier-config) | [](https://www.npmjs.com/package/@rightcapital/prettier-config) | Shared Prettier configuration |
| [`@rightcapital/tsconfig`](packages/tsconfig) | [](https://www.npmjs.com/package/@rightcapital/tsconfig) | Shared TypeScript configuration |
| [`@rightcapital/lint-eslint-config-rules`](packages/lint-eslint-config-rules) | [](https://www.npmjs.com/package/@rightcapital/lint-eslint-config-rules) | CLI to check for deprecated/unknown ESLint rules |
## ESLint
### Prerequisites
- `eslint` (>=9)
- `typescript` (optional, for TypeScript support)
### Usage
Install `@rightcapital/eslint-config` to your project.
```sh
pnpm add -D @rightcapital/eslint-config
```
In your `eslint.config.mjs` ([or equivalent](https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file-formats)):
```js
import eslintConfigRightcapital from '@rightcapital/eslint-config';
const { defineConfig } = eslintConfigRightcapital.utils;
export default defineConfig(
...eslintConfigRightcapital.configs.recommended,
// add more configs for specific files or packages if needed
{
files: ['scripts/**/*.{js,cjs,mjs}'],
extends: [
...eslintConfigRightcapital.configs.node,
...eslintConfigRightcapital.configs.script,
],
},
);
```
See [`packages/eslint-config`](packages/eslint-config) for the full list of exported configs and utils.
## Prettier
### Prerequisites
- `prettier`
### Usage
Install config package to your project:
```sh
pnpm add -D @rightcapital/prettier-config
```
In your project's `prettier.config.cjs`:
```js
module.exports = require('@rightcapital/prettier-config');
```
See [`packages/prettier-config`](packages/prettier-config) for details.
## Development
1. Create a `feature/*` branch, make changes, and run `pnpm -w change` to generate a version plan
2. Open a PR to `main` and merge after review
3. Merge the automatically created Release PR to publish packages to npm
## License
[MIT License](LICENSE) © 2023-Present