Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
{
"parser": "solidity-parse",
"compiler": "0.8.20",
"printWidth": 100
// Optimized Configuration for Solidity Formatting (e.g., in .prettierrc)

// --- Parser Configuration ---
// Specifies the parser to use for the Solidity language.
"parser": "solidity",

// NOTE: The compiler version is often used by the formatter to enforce version-specific rules.
"compiler": "0.8.20",

// --- Code Style Rules ---

// Maximum line length before Prettier wraps the code.
"printWidth": 100,

// Use spaces instead of tabs for indentation.
"useTabs": false,

// Specify the number of spaces per indentation level.
"tabWidth": 4,

// Print semicolons at the ends of statements.
"semi": true,

// Use single quotes instead of double quotes where possible (e.g., strings).
"singleQuote": false,

// How to handle bracket spacing in object literals (e.g., { foo: bar } vs {foo: bar}).
"bracketSpacing": true
}