Skip to content

Commit

Permalink
chore: add prettier solidity
Browse files Browse the repository at this point in the history
  • Loading branch information
itsacoyote committed Oct 4, 2024
1 parent 8ebe3f9 commit f53fb5e
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ typechain-types
**/*.ts
**/*.jsx
**/*.tsx
**/*.mjs
**/*.cjs
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"plugins": ["prettier-plugin-solidity"],
"bracketSameLine": false,
"printWidth": 120,
"useTabs": false,
Expand All @@ -17,6 +18,12 @@
"proseWrap": "always",
"tabWidth": 2
}
},
{
"files": "*.sol",
"options": {
"parser": "solidity-parse"
}
}
]
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@
"source.fixAll.eslint": "explicit"
}
},
"prettier.documentSelectors": ["**/*.sol"],
"[solidity]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"vue.server.hybridMode": "auto"
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,8 @@
"nx": {
"includedScripts": []
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"dependencies": {
"prettier-plugin-solidity": "^1.4.1"
}
}
Loading

0 comments on commit f53fb5e

Please sign in to comment.