Prettier Configuration
Define a consistent code formatting style with a simple .prettierrc file.
Prettier removes the debate over code formatting by automatically enforcing a consistent style across your project. A .prettierrc
file specifies preferences such as line length, indentation, and quote style. This minimal configuration focuses on readability and consistency; adjust values to suit your team’s preferences.
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2
}
Place this file at the root of your repository and run Prettier as part of your development workflow or CI process. You can extend it with overrides for specific file types or integrate with eslint using eslint-plugin-prettier
to enforce formatting on every commit.