Braum is a frontend configuration toolkit monorepo designed to collect and organize commonly used frontend development configurations. Through unified repository management, it provides teams with a standardized development experience and consistent, battle-tested configuration files for various development tools.
braum/
βββ packages/ # Core configuration packages
β βββ commitlint/ # @braum/commitlint - Commit message linting
β βββ eslint/ # @braum/eslint - ESLint configuration
β βββ prettier/ # @braum/prettier - Prettier configuration
β βββ stylelint/ # @braum/stylelint - Stylelint configuration
β βββ tsconfig/ # @braum/typescript-config - TypeScript presets
βββ tools/ # Development tools
β βββ cz/ # @braum/cz - Commitizen CLI tool
βββ examples/ # Example projects
β βββ eslint/ # ESLint usage example
β βββ react/ # React project example
β βββ stylelint/ # Stylelint usage example
β βββ typescript/ # TypeScript configuration examples
β βββ vue/ # Vue project example
βββ scripts/ # Build and development scripts
βββ doc/ # Documentation
ESLint configuration supporting JavaScript, TypeScript, React, and Vue.
pnpm add -D @braum/eslintUsage:
// eslint.config.js
import { defineESLintConfig } from '@braum/eslint'
const config = await defineESLintConfig({
enableReact: true, // Enable React support
enableVue: false, // Enable Vue support
enableTypescript: true, // Enable TypeScript support
enableNode: true, // Enable Node.js support
enablePrettier: true, // Enable Prettier integration
})
export default configOptions:
| Option | Type | Default | Description |
|---|---|---|---|
enableVue |
boolean | false | Enable Vue support |
enableReact |
boolean | false | Enable React support |
enableJSX |
boolean | false | Enable JSX support |
enableNode |
boolean | false | Enable Node.js support |
enableTypescript |
boolean | true | Enable TypeScript support |
enablePrettier |
boolean | true | Enable Prettier integration |
enableImports |
boolean | true | Enable import rules |
enablePromise |
boolean | true | Enable promise rules |
enableComments |
boolean | true | Enable ESLint comments rules |
Prettier configuration with XML plugin support.
pnpm add -D @braum/prettierUsage:
// prettier.config.js
import { definePrettierConfig } from '@braum/prettier'
export default definePrettierConfig({
xml: true, // Enable XML plugin
userOverrides: {
// Your custom overrides
printWidth: 100,
},
})Stylelint configuration for CSS, SCSS, Less, and styled-components.
pnpm add -D @braum/stylelintUsage:
// stylelint.config.js
import { defineStylelintConfig } from '@braum/stylelint'
export default defineStylelintConfig({
enableVue: false, // Enable Vue SFC support
enableScss: true, // Enable SCSS support
enableLess: false, // Enable Less support
enableStyledComponents: false, // Enable styled-components support
})Commitlint configuration with conventional commits support.
pnpm add -D @braum/commitlintUsage:
// commitlint.config.js
import { defineCommitlintConfig } from '@braum/commitlint'
export default defineCommitlintConfig({
extendConfig: base => ({
...base,
// Your custom rules
}),
})Default Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
Commitizen CLI tool for interactive commit messages.
pnpm add -D @braum/czUsage:
Add to package.json:
{
"scripts": {
"commit": "cz"
}
}Then run:
pnpm commitTypeScript configuration presets.
pnpm add -D @braum/typescript-configUsage:
// tsconfig.json
{
"extends": "@braum/typescript-config/tsconfig.base.json",
"compilerOptions": {
"outDir": "./dist"
}
}Available Presets:
tsconfig.base.json- Base strict configurationtsconfig.lib.json- Library project configurationtsconfig.node.json- Node.js project configurationtsconfig.web.json- Web project configuration
- Node.js >= 18.0.0
- pnpm >= 8.0.0
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run type checking
pnpm type-check
# Run linting
pnpm lint:check
# Run formatting check
pnpm format:check
# CI check (format + lint + type-check)
pnpm ci-check- Fork the repository and create a new branch
- Install dependencies with
pnpm install - Develop in the corresponding packages directory
- Build with
pnpm build - Commit following conventional commit format
- Create PR for code review
We welcome all forms of contributions:
- π Bug Reports - Help us find configuration issues
- π‘ Configuration Suggestions - Share your configuration improvements
- π§ Code Contributions - Participate directly in development
- π Documentation Improvements - Improve usage documentation
- Modular - Each configuration is an independent package that can be used separately
- Configurable - Provide flexible configuration options to adapt to different project needs
- Battle-tested - All configurations have been tested in real projects
- Framework-agnostic - Applicable to any frontend framework or vanilla JavaScript
- Type-safe - Prioritize TypeScript with complete type definitions
- Backward Compatible - Follow semantic versioning for smooth upgrades
This project is licensed under the Apache License 2.0.
| Tag | Description |
|---|---|
@braum/eslint |
ESLint configuration |
@braum/prettier |
Prettier configuration |
@braum/stylelint |
Stylelint configuration |
@braum/commitlint |
Commitlint configuration |
@braum/cz |
Commitizen CLI tool |
@braum/typescript-config |
TypeScript configuration presets |
Built with β€οΈ by Bowen Tew