This repository is the home of Frontal's style guide, which includes configs for popular linting and styling tools.
The following configs are available, and are designed to be used together.
Please read our contributing guide before creating a pull request.
All of our configs are contained in one package, @frontal/style-guide. To install:
# If you use npm
npm i --save-dev @frontal/style-guide
# If you use pnpm
pnpm i --save-dev @frontal/style-guide
# If you use Yarn
yarn add --dev @frontal/style-guideThis style guide provides a shared Biome configuration for consistent code formatting and linting across the project.
To use the shared Biome config, set the following in biome.jsonc:
{
"extends": ["@frontal/style-guide/biome"]
}The Biome configuration includes:
- Code formatting rules
- Linting rules
- Import sorting
- And other best practices for consistent code style
We ship native configs you can drop directly into your repo:
@frontal/style-guide/rust→rustfmt.toml@frontal/style-guide/rust/Clippy.toml→Clippy.toml
cp node_modules/@frontal/style-guide/config/rust/rustfmt.toml ./rustfmt.toml
cp node_modules/@frontal/style-guide/config/rust/Clippy.toml ./Clippy.tomlThese files lock in edition 2021, grouped imports, doc formatting, and strict Clippy lint levels (warn: pedantic, nursery; deny: unwrap/expect/todo).
Use the Ruff-native config exposed at @frontal/style-guide/python:
cp node_modules/@frontal/style-guide/config/python/ruff.toml ./ruff.tomlIt targets Python 3.12, enforces a 100-character line length, enables Ruff formatting, and selects the E, F, I, UP, B, DTZ, PL, and RUF rule groups (with E203/E501 ignored for Black compatibility). Tests relax S101.
The Go lint profile lives at @frontal/style-guide/go/golangci.yml:
cp node_modules/@frontal/style-guide/config/go/golangci.yml ./.golangci.ymlIt enables govet, staticcheck, errcheck, gosimple, unused, goconst, gocyclo, and revive with tuned thresholds. Run gofmt with the stock command to enforce canonical formatting:
gofmt -s -w .pnpm buildpnpm type-checkpnpm lint
pnpm lint:fixpnpm formatThis package uses Changesets for versioning. The workflow is:
- Run
pnpm changesetto document each change (one changeset file per change). - Open a pull request with the new changeset(s).
- When the automated Release PR is merged into
main, theReleaseGitHub Action:- runs
pnpm changeset versionto bump package versions and changelogs, - creates a git tag via
pnpm run release(which runschangeset tag) and automatically opens a GitHub Release entry (no npm publish).
- runs
ℹ️ We do not publish to npm; releases are tracked via git tags and GitHub Releases only.
This package is private and proprietary to Frontal Labs. See LICENSE.md for details.
Please read CONTRIBUTING.md for guidelines on contributing to this package.
- Fork and clone the repository
- Install dependencies:
pnpm install - Make changes to configuration files
- Run tests:
pnpm lint && pnpm type-check && pnpm build - Create a pull request with a clear description
internals/style-guide/
├── biome.jsonc # Biome configuration
├── package.json # Package configuration
├── README.md # This file
├── CONTRIBUTING.md # Contributing guidelines
└── .gitignore # Git ignore rules