Skip to main content

VS Code Prettier

Which formatting rules prevent the most friction across a mixed Solidity and TypeScript codebase?

tip

Add a .prettierrc file to the project root to enforce consistent formatting.

{
"overrides": [
{
"files": "*.sol",
"options": {
"tabWidth": 2
}
}
]
}

delete cr fix — add this to your ESLint rules to resolve Windows line-ending conflicts:

{
"rules": {
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
]
}
}

Context

Questions

Which formatting decisions have the highest team friction cost when left inconsistent — and what's the minimum config that resolves them?

  • When does enforcing endOfLine: auto create more problems than it solves across OS environments?
  • Which Prettier rule conflicts most often with Solidity linting tools?