@teo-garcia/prettier-config-shared
v0.2.9
Published
Shared Prettier configuration for fullstack web templates
Downloads
706
Maintainers
Readme
@teo-garcia/prettier-config-shared
Shared Prettier configuration for consistent code formatting
Part of the @teo-garcia/templates ecosystem
Features
| Setting | Value | | ------------------- | -------- | | Semicolons | No | | Quotes | Single | | Tab Width | 2 spaces | | Trailing Commas | ES5 | | JSX Quotes | Single | | Print Width | 80 |
File-specific rules:
- Markdown: Always wrap prose
- Prisma: Proper
.prismafile formatting - YAML: No single quotes, 2-space indent
- JSON: No trailing commas
Requirements
- Node.js 20+
- Prettier 3+
Quick Start
# Install the package
pnpm add -D @teo-garcia/prettier-config-shared prettierPackage.json (Recommended)
{
"prettier": "@teo-garcia/prettier-config-shared"
}Configuration File
// prettier.config.js
import sharedConfig from '@teo-garcia/prettier-config-shared'
export default sharedConfigExtending
Override settings as needed:
// prettier.config.js
import sharedConfig from '@teo-garcia/prettier-config-shared'
export default {
...sharedConfig,
printWidth: 100,
semi: true,
}Related Packages
| Package | Description | | -------------------------------------------------------------------------------------- | ------------------- | | @teo-garcia/eslint-config-shared | ESLint rules | | @teo-garcia/tsconfig-shared | TypeScript settings | | @teo-garcia/vitest-config-shared | Test configuration |
License
MIT
