Vyriy Prettier Config
@vyriy/prettier-config is a shared Prettier configuration package for Vyriy projects.
The goal of this package is to keep code formatting consistent across applications, libraries, examples, and internal packages. Instead of copying the same Prettier rules into every repository, each project can reuse one shared configuration and keep local setup small.
Prettier is responsible for formatting code. It does not replace TypeScript, ESLint, Stylelint, or tests. It works best as one small part of a calm and predictable development workflow.
Installation
Install the shared config together with Prettier:
yarn add @vyriy/prettier-config prettier
Basic usage
Create a prettier.config.mjs file:
export { default } from '@vyriy/prettier-config';
The config file re-exports the shared Vyriy Prettier configuration.
This keeps the project setup minimal while still making formatting rules explicit and reusable.
Example file
Create a small TypeScript file with invalid syntax index.ts:
const a = 1
cons b = 2
The second line contains a typo: cons instead of const.
Run Prettier
Run Prettier against the file:
npx prettier index.ts
Output:
index.ts
[error] index.ts: SyntaxError: Unknown keyword or identifier. Did you mean 'const'? (2:1)
[error] 1 | const a = 1
[error] > 2 | cons b = 2
[error] | ^
[error] 3 |
Prettier cannot format code when the parser cannot understand it. In this case, the file has a syntax error, so Prettier stops and shows the exact location of the problem.
This is useful because formatting becomes an early validation step. Before code can be formatted, it must first be syntactically valid.
Fix the syntax error
Update the file:
const a = 1
const b = 2
Run Prettier again:
npx prettier index.ts
Output:
const a = 1;
const b = 2;
Now Prettier can parse the file and print the formatted result.
Write formatted output
To update the file in place, use --write:
npx prettier index.ts --write
Output:
index.ts 20ms
After that, index.ts contains formatted code according to the shared Vyriy Prettier config.
Why shared Prettier config?
A shared Prettier config helps remove formatting debates from daily development.
Every package can follow the same formatting rules, and every repository can stay focused on code, behavior, and architecture instead of local editor preferences.
For Vyriy projects, this keeps formatting simple, consistent, and reusable.
Documentation
See the Prettier config API documentation.