{"repo":"prettier-solidity/prettier-plugin-solidity","free":true,"listed":false,"github":"https://github.com/prettier-solidity/prettier-plugin-solidity","clone":"git clone https://github.com/prettier-solidity/prettier-plugin-solidity.git","description":"A Prettier plugin for automatically formatting your Solidity code.","language":"TypeScript","stars":751,"topics":["ethereum","solidity","prettier-plugin","prettier"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"prettier-plugin-solidity ℹ️ This README is for the new major version of Prettier Plugin Solidity. The differences from v1 are minimal, but there are some breaking changes. To migrate from v1, follow the migration guide. If you're looking for the previous version, check out the v1 branch. A Prettier plugin for automatically formatting your Solidity code. Installation and usage Using in NodeJS Install both prettier and prettier-plugin-solidity : Run prettier on your contracts: You can add an npm script to run prettier on all your contracts: Or you can use it as part of your linting to check that all your code is prettified: Prettier Solidity only works with valid code. If there is a syntax error, nothing will be done and a parser error will be thrown. Using in the Browser To use this package in the browser, you need to load Prettier's standalone bundle before loading the build provided in this package. Prettier's unpkg field points to https://unpkg.com/prettier/standalone.js , in a similar way this plugin points to https://unpkg.com/prettier-plugin-solidity/dist/standalone.js . Once the scripts are loaded you will have access to the globals prettier and prettierPlugins . We follow Prettier's strategy for populating their plugins in the object prettierPlugins , you can load other plugins like https://unpkg.com/prettier@2.8.0/parser-markdown.js and Prettier will have access to multiple parsers. For more details, have a look at Prettier's documentation. Creating a package for the ","default_branch":null,"files":null,"tree":[],"storefront":"/r/prettier-solidity","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/prettier-solidity/prettier-plugin-solidity/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}