{"_id":"@134dd3v/prettier-plugin-solidity","_rev":"3-b6f0928fee83cab54438aeb3f1298770","name":"@134dd3v/prettier-plugin-solidity","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0-beta.18":{"name":"@134dd3v/prettier-plugin-solidity","version":"1.0.0-beta.18","description":"A Prettier Plugin for automatically formatting your Solidity code.","main":"src","private":false,"scripts":{"eslint":"eslint 'scripts/**' 'src/**' 'tests/**'","generateindexes":"cross-env SCRIPT=true node scripts/generateIndexes.js","lint":"npm run eslint && npm run prettier -- --list-different","lint:fix":"npm run eslint -- --fix && npm run prettier -- --write","prettier":"prettier './*.{js,json,md,yml}' '{scripts,src,tests}/**/*.js'","test":"jest","test:all":"cross-env FULL_TEST=1 jest"},"repository":{"type":"git","url":"git+https://github.com/prettier-solidity/prettier-plugin-solidity.git"},"keywords":["ethereum","plugin","prettier","solidity"],"author":{"name":"Mattia Richetto","email":"mattia.richetto@gmail.com"},"contributors":[{"name":"Jack Bates","email":"jack@nottheoilrig.com"},{"name":"Federico Bond","email":"federico.bond@gmail.com"},{"name":"Jed Fox","email":"git@twopointzero.us"},{"name":"Mudit Gupta","email":"hi@mudit.blog"},{"name":"Franco Victorio","email":"victorio.franco@gmail.com"},{"name":"Klaus Hott Vidal","email":"klahott@gmail.com"},{"name":"Soham Zemse","email":"soham@zemse.in"}],"license":"MIT","bugs":{"url":"https://github.com/prettier-solidity/prettier-plugin-solidity/issues"},"homepage":"https://github.com/prettier-solidity/prettier-plugin-solidity#readme","engines":{"node":">=12"},"devDependencies":{"@babel/code-frame":"^7.14.5","cross-env":"^7.0.3","dir-to-object":"^2.0.0","eslint":"^7.32.0","eslint-config-airbnb-base":"^14.2.1","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.24.2","jest":"^27.1.0","jest-mock-now":"^1.3.0","jest-snapshot-serializer-ansi":"^1.0.0","jest-snapshot-serializer-raw":"^1.2.0","jest-watch-typeahead":"^1.0.0","lines-and-columns":"^1.1.6","outdent":"^0.8.0","prettier":"^2.3.2","solc":"^0.8.7-fixed"},"dependencies":{"@solidity-parser/parser":"^0.14.0","emoji-regex":"^10.0.0","escape-string-regexp":"^4.0.0","semver":"^7.3.5","solidity-comments-extractor":"^0.0.7","string-width":"^4.2.2"},"peerDependencies":{"prettier":"^2.3.0"},"gitHead":"17ce1f0eb62e3d01d4464233fbd57a32dcf5d74b","_id":"@134dd3v/prettier-plugin-solidity@1.0.0-beta.18","_nodeVersion":"16.6.2","_npmVersion":"7.20.3","dist":{"integrity":"sha512-Nqqm8sXgekLUlpLtlgy4ldj+qIHLZ/8H4dhTNWOh9AlrNKf6ZZFR1ZkirHwLmb/8wio5yPQBgZIZebARkNaXsw==","shasum":"9669d4c6aa88f0a0b12d9668bad8bb07be188cc2","tarball":"https://registry.npmjs.org/@134dd3v/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.18.tgz","fileCount":315,"unpackedSize":695846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhufZOCRA9TVsSAnZWagAAnJgQAJsqv643wP7izGC26nUJ\n4XygdxTA53oZm8Ro0K7iHR8822GcMbprzSIk2WfgGEKE8tnd3gFP/bmlCVah\nJ+/M3M5Nz77epfag7RNL4IQOZfxYlcAur9XI5tH985K9KTKuRgcqoT7RAxzG\nxM30rb0CHp/cAYpcC40E4//vNYr9/BrZEZmk+POUKLKEBcOIuXKOUeYPuxCZ\n9TyYKqfS4LTEDpbV4FEnYWj/8xEGb1+FlijM7glm2OPkGls3aUumJyTN7o5W\ninAw+Wy1XLf2mt/Ry7UY4w9XYi2rqXh6Glcjw6F8Nirs7+Va2h1uKShaSD1v\nShpmUlxbREAIiWBsRwtjdCcECNOYm4HridQ+1Pr8WoFRSrpFkrfcDFFs6EZv\nwYTZXBoWXJuoB7WAh64EPO/Msdp7PJTp2J9WgClDqQgYrlrgsu/zFlt9PxBZ\naxjAE89clAuRl751Y7bvjK3Gapr0uz9mKLjMi5SybyYzy4v43N23uXigS8z4\n4HoCiirbmBDUccNT3ArKFO2pLgnIO5TdJUhkzGfNdjTlR7NJ5HxpnkTMPAoU\njVDbg11iFgHMD4Pa4kEZ2xF3clt1yy9Tw8i66FvwX3m88TE30zveaD3wCzjR\nVQyA4luPvvkl7IT1k53Laxjk+O1vA3C8fj/zoKL5Db9NvdJfud38Parq5v6X\nTeMi\r\n=BFqE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeUj+mybP6f8ht4xcN+G0zj/i075rot6TpicjHgNpHKQIgcagXEaqmCaBzqA8dS2eWIyThF9wNqM2kd2AsQH+8WYo="}]},"_npmUser":{"name":"134dd3v","email":"leaddev@anon.farm"},"directories":{},"maintainers":[{"name":"134dd3v","email":"leaddev@anon.farm"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prettier-plugin-solidity_1.0.0-beta.18_1635430335701_0.5340669089316181"},"_hasShrinkwrap":false},"1.1.1":{"name":"@134dd3v/prettier-plugin-solidity","version":"1.1.1","description":"A Prettier Plugin for automatically formatting your Solidity code.","main":"./src/index.js","private":false,"browser":"./dist/standalone.js","unpkg":"./dist/standalone.js","scripts":{"build":"webpack --env production","build:dev":"webpack --env development","eslint":"eslint 'scripts/**' 'src/**' 'tests/**'","generateindexes":"cross-env SCRIPT=true node scripts/generateIndexes.js","lint":"npm run eslint && npm run prettier -- --list-different","lint:fix":"npm run eslint -- --fix && npm run prettier -- --write","prepublishOnly":"npm run build","prettier":"prettier './*.{js,json,md,yml}' '{scripts,src,tests}/**/*.js'","test":"jest","test:all":"cross-env FULL_TEST=1 c8 jest","test:standalone":"cross-env TEST_STANDALONE=1 FULL_TEST=1 jest"},"repository":{"type":"git","url":"git+https://github.com/prettier-solidity/prettier-plugin-solidity.git"},"keywords":["ethereum","plugin","prettier","solidity"],"author":{"name":"Mattia Richetto","email":"mattia.richetto@gmail.com"},"contributors":[{"name":"Jack Bates","email":"jack@nottheoilrig.com"},{"name":"Federico Bond","email":"federico.bond@gmail.com"},{"name":"Jed Fox","email":"git@twopointzero.us"},{"name":"Mudit Gupta","email":"hi@mudit.blog"},{"name":"Franco Victorio","email":"victorio.franco@gmail.com"},{"name":"Klaus Hott Vidal","email":"klahott@gmail.com"},{"name":"Soham Zemse","email":"soham@zemse.in"}],"license":"MIT","bugs":{"url":"https://github.com/prettier-solidity/prettier-plugin-solidity/issues"},"homepage":"https://github.com/prettier-solidity/prettier-plugin-solidity#readme","engines":{"node":">=12"},"devDependencies":{"@babel/code-frame":"^7.18.6","c8":"^7.12.0","cross-env":"^7.0.3","dir-to-object":"^2.0.0","eslint":"^8.31.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^8.5.0","eslint-plugin-import":"^2.26.0","exports-loader":"^4.0.0","jest":"^29.3.1","jest-light-runner":"^0.4.1","jest-mock-now":"^1.3.0","jest-snapshot-serializer-ansi":"^1.0.0","jest-snapshot-serializer-raw":"^1.2.0","jest-watch-typeahead":"^2.2.1","lines-and-columns":"^2.0.3","prettier":"^2.8.1","proxyquire":"^2.1.3","solc":"^0.8.17","webpack":"^5.75.0","webpack-cli":"^5.0.1"},"dependencies":{"@solidity-parser/parser":"^0.15.0","semver":"^7.3.8","solidity-comments-extractor":"^0.0.7"},"peerDependencies":{"prettier":">=2.3.0 || >=3.0.0-alpha.0"},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"licenseText":"MIT License\n\nCopyright (c) 2021 prettier-solidity\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@134dd3v/prettier-plugin-solidity@1.1.1","dist":{"shasum":"d03c9560968c48c28bd6ba719eccdb7b963174ef","integrity":"sha512-vLJsC0eD6qfjDCHrk27uZL/abRZ2P+EZ0Uzpp7eBNtHDT/UubhGg0R1t5rRBJ3LlLhf6LDq74ve//HKslzkgpg==","tarball":"https://registry.npmjs.org/@134dd3v/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.1.tgz","fileCount":114,"unpackedSize":3721206,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICX4jY5b5EvZUlzoul+AB7CDCDNnnE1uV5dmAb/px1DRAiEA0kD2wQyG9DvzJr5L0fms+L7EzbbUpqWfZRaXoaKwfn8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3SnjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrdphAAog8K4u+QvZ8XBokGktvGmnYYljOyrEHnlsMW8ZACvogd2W69\r\nUB71TOe0+Og0DjPWZwmjmX5roJmQURhzO6f1WDXh7OwGyXHgjll+AunP+H2e\r\n2ru8x5qDB00xHVjMGrQz4AJPzBFZnEQ/7zLcV1VqerVt0cv01WmI+B9PEdPk\r\n/KAUbIJHRQZyiGfHw2RM7CkOF+1+B607NFBt08NrKAcATvm5INN7au34lI5A\r\nBJXAJywYBlR5DZUxw9EpRL+33dc7UPGJUdYGKZW3BZsy5++5CQ+h+OZ/73pj\r\npBs5VRQPa6iDbtpkaplRO3ZBQthRiif6CDiBIVaNIFqLI7v8eIMg19VG5fgI\r\nb2nIHMir7cfL+es2GgH9a6Hd+VZJO8CHfSLrn8JNA4Ach+ZnN/YcXgGahZpM\r\n7LJdqcd4OVzqaXRRen9ywr67rUQRSnw2CJgkCiaPsVKnkQlpdfCctyDiOWp+\r\n24cRbeh5GmYsGCgYvH9Kau9tGIhMGxZ2fWNw1gDEI29vt8GY18tSkrPKZEOM\r\nfZ7Mrn2GnH+rYFEJFXeYBU3Rath85dudVDk8d+AeRCtZO6upuaPGK7/h/A+r\r\nXg/hm33wvv9EJQfZlOzS0YSlkCmKZbs3dZonZeguEVhqHLZL/oB17vPlMYHb\r\np3mC8QxzKFmbPzt6q00tHvHege4XwqpAY2Q=\r\n=cKSw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"134dd3v","email":"leaddev@rage.trade"},"directories":{},"maintainers":[{"name":"134dd3v","email":"leaddev@rage.trade"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prettier-plugin-solidity_1.1.1_1675438562956_0.891211347048775"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-28T14:12:15.627Z","1.0.0-beta.18":"2021-10-28T14:12:15.849Z","modified":"2023-02-03T15:36:03.209Z","1.1.1":"2023-02-03T15:36:03.111Z"},"maintainers":[{"name":"134dd3v","email":"leaddev@rage.trade"}],"description":"A Prettier Plugin for automatically formatting your Solidity code.","homepage":"https://github.com/prettier-solidity/prettier-plugin-solidity#readme","keywords":["ethereum","plugin","prettier","solidity"],"repository":{"type":"git","url":"git+https://github.com/prettier-solidity/prettier-plugin-solidity.git"},"contributors":[{"name":"Jack Bates","email":"jack@nottheoilrig.com"},{"name":"Federico Bond","email":"federico.bond@gmail.com"},{"name":"Jed Fox","email":"git@twopointzero.us"},{"name":"Mudit Gupta","email":"hi@mudit.blog"},{"name":"Franco Victorio","email":"victorio.franco@gmail.com"},{"name":"Klaus Hott Vidal","email":"klahott@gmail.com"},{"name":"Soham Zemse","email":"soham@zemse.in"}],"author":{"name":"Mattia Richetto","email":"mattia.richetto@gmail.com"},"bugs":{"url":"https://github.com/prettier-solidity/prettier-plugin-solidity/issues"},"license":"MIT","readme":"# prettier-plugin-solidity\n\n[![Telegram](/assets/telegram-badge.svg)](https://t.me/+kgTgkFgIwJkwMjcx)\n[![Twitter Follow](https://img.shields.io/twitter/follow/PrettierSol.svg?style=social)](https://twitter.com/PrettierSol)\n[![GitPOAP Badge](https://public-api.gitpoap.io/v1/repo/prettier-solidity/prettier-plugin-solidity/badge)](https://www.gitpoap.io/gh/prettier-solidity/prettier-plugin-solidity)\n\n<p align=\"center\">\n  <img width=\"375\" height=\"375\" src=\"https://user-images.githubusercontent.com/1022054/59317198-f1149b80-8d15-11e9-9b0f-0c5e7d4b8b81.png\">\n</p>\n\nA [Prettier plugin](https://prettier.io/docs/en/plugins.html) for automatically formatting your [Solidity](https://github.com/ethereum/solidity) code.\n\nIf you like this project, please consider contributing to our [Gitcoin grant](https://gitcoin.co/grants/1534/prettier-solidity)!\n\n## Installation and usage\n\n### Using in NodeJS\n\nInstall both `prettier` and `prettier-plugin-solidity`:\n\n```Bash\nnpm install --save-dev prettier prettier-plugin-solidity\n```\n\nRun prettier in your contracts:\n\n```Bash\nnpx prettier --write 'contracts/**/*.sol'\n```\n\nYou can add a script for running prettier on all your contracts:\n\n```\n\"prettier\": \"prettier --write 'contracts/**/*.sol'\"\n```\n\nOr you can use it as part of your linting to check that all your code is prettified:\n\n```\n\"lint\": \"prettier --list-different 'contracts/**/*.sol'\"\n```\n\n> Prettier Solidity only works with valid code. If there is a syntax error, nothing will be done and a parser error will be thrown.\n\n### Using in the Browser\n\n_Added in v1.1.0_\n\nTo use this package in the browser, you need to load Prettier's standalone bundle before loading the build provided in this package.\n\n```html\n<script src=\"https://unpkg.com/prettier@latest\"></script>\n<script src=\"https://unpkg.com/prettier-plugin-solidity@latest\"></script>\n```\n\nPrettier'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`.\n\nOnce the scripts are loaded you will have access the globals `prettier` and `prettierPlugins`.\n\nWe 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.\n\n```html\n<script>\n  const originalCode = 'contract Foo {}';\n  const formattedCode = prettier.format(originalCode, {\n    parser: 'solidity-parse',\n    plugins: prettierPlugins\n  });\n</script>\n```\n\nFor more details and please have a look at [Prettier's documentation](https://prettier.io/docs/en/browser.html).\n\n## Configuration File\n\nPrettier provides a flexible system to configure the formatting rules of a project. For more information please refer to the [documentation](https://prettier.io/docs/en/configuration.html).\nThe following is the default configuration internally used by this plugin.\n\n```JSON\n{\n  \"overrides\": [\n    {\n      \"files\": \"*.sol\",\n      \"options\": {\n        \"printWidth\": 80,\n        \"tabWidth\": 4,\n        \"useTabs\": false,\n        \"singleQuote\": false,\n        \"bracketSpacing\": false,\n      }\n    }\n  ]\n}\n```\n\nNote the use of the [overrides property](https://prettier.io/docs/en/configuration.html#configuration-overrides) which allows for multiple configurations in case there are other languages in the project (i.e. JavaScript, JSON, Markdown).\n\nMost options are described in Prettier's [documentation](https://prettier.io/docs/en/options.html).\n\n### Compiler\n\nMany versions of the Solidity compiler have changes that affect how the code should be formatted. This plugin, by default, tries to format the code in the most compatible way that it's possible, but you can use the `compiler` option to nudge it in the right direction.\n\nOne example of this is import directives. Before `0.7.4`, the compiler didn't accept multi-line import statements, so we always format them in a single line. But if you use the `compiler` option to indicate that you are using a version greater or equal than `0.7.4`, the plugin will use multi-line imports when it makes sense.\n\nThe Solidity versions taken into consideration during formatting are:\n\n- `v0.7.4`: Versions prior `0.7.4` had a bug that would not interpret correctly imports unless they are formatted in a single line.\n\n  ```Solidity\n  // Input\n  import { Foo as Bar } from \"/an/extremely/long/location\";\n\n  // \"compiler\": undefined\n  import { Foo as Bar } from \"/an/extremely/long/location\";\n\n  // \"compiler\": \"0.7.3\" (or lesser)\n  import { Foo as Bar } from \"/an/extremely/long/location\";\n\n  // \"compiler\": \"0.7.4\" (or greater)\n  import {\n      Foo as Bar\n  } from \"/an/extremely/long/location\";\n  ```\n\n- `v0.8.0`: Introduced these [changes](https://docs.soliditylang.org/en/v0.8.0/080-breaking-changes.html)\n\n  - The type `byte` has been removed. It was an alias of `bytes1`.\n  - Exponentiation is right associative, i.e., the expression `a**b**c` is parsed as `a**(b**c)`. Before 0.8.0, it was parsed as `(a**b)**c`.\n\n  ```Solidity\n  // Input\n  bytes1 public a;\n  byte public b;\n\n  uint public c = 1 ** 2 ** 3;\n\n  // \"compiler\": undefined\n  bytes1 public a;\n  byte public b;\n\n  uint public c = 1**2**3;\n\n  // \"compiler\": \"0.7.6\" (or lesser)\n  bytes1 public a;\n  byte public b;\n\n  uint public c = (1**2)**3;\n\n  // \"compiler\": \"0.8.0\" (or greater)\n  bytes1 public a;\n  bytes1 public b;\n\n  uint public c = 1**(2**3);\n  ```\n\nYou might have a multi-version project, where different files are compiled with different compilers. If that's the case, you can use [overrides](https://prettier.io/docs/en/configuration.html#configuration-overrides) to have a more granular configuration:\n\n```JSON\n{\n  \"overrides\": [\n    {\n      \"files\": \"contracts/v1/**/*.sol\",\n      \"options\": {\n        \"compiler\": \"0.6.3\"\n      }\n    },\n    {\n      \"files\": \"contracts/v2/**/*.sol\",\n      \"options\": {\n        \"compiler\": \"0.8.4\"\n      }\n    }\n  ]\n}\n```\n\n| Default | CLI Override          | API Override           |\n| ------- | --------------------- | ---------------------- |\n| None    | `--compiler <string>` | `compiler: \"<string>\"` |\n\n## Integrations\n\n### Vim\n\nTo integrate this plugin with vim, first install [`vim-prettier`](https://github.com/prettier/vim-prettier). These\ninstructions assume you are using [`vim-plug`](https://github.com/junegunn/vim-plug). Add this to your configuration:\n\n```vim\nPlug 'prettier/vim-prettier', {\n  \\ 'do': 'yarn install && yarn add prettier-plugin-solidity',\n  \\ 'for': [\n    \\ 'javascript',\n    \\ 'typescript',\n    \\ 'css',\n    \\ 'less',\n    \\ 'scss',\n    \\ 'json',\n    \\ 'graphql',\n    \\ 'markdown',\n    \\ 'vue',\n    \\ 'lua',\n    \\ 'php',\n    \\ 'python',\n    \\ 'ruby',\n    \\ 'html',\n    \\ 'swift',\n    \\ 'solidity'] }\n```\n\nWe modified the `do` instruction to also install this plugin. Then you'll have to configure the plugin to always use the\nversion installed in the vim plugin's directory. The vim-plug directory depends on value you use in `call plug#begin('~/.vim/<dir>')`:\n\n```vim\nlet g:prettier#exec_cmd_path = '~/.vim/plugged/vim-prettier/node_modules/.bin/prettier'\n```\n\nTo check that everything is working, open a Solidity file and run `:Prettier`.\n\nIf you also want to autoformat every time you write the buffer, add these lines:\n\n```vim\nlet g:prettier#autoformat = 0\nautocmd BufWritePre *.sol Prettier\n```\n\nNow Prettier will be run every time the file is saved.\n\n### VSCode\n\nVSCode is not familiar with the Solidity language.\nThere are 2 extensions that you can install to provide support for Solidity:\n\n- [`solidity`](https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity)\n- [`hardhat-solidity`](https://marketplace.visualstudio.com/items?itemName=NomicFoundation.hardhat-solidity)\n\n```Bash\ncode --install-extension JuanBlanco.solidity\n# or\ncode --install-extension NomicFoundation.hardhat-solidity\n```\n\n> :warning: **These 2 extensions offer similar functionality and will clash with each other**: Please choose which one matches your projects better.\n\nThese extensions provide basic integration with Prettier; in most cases, no further action is needed.\n\nMake sure your editor has format on save set to true.\nWhen you save VSCode will ask you what formatter would you like to use for the Solidity language, you can choose `JuanBlanco.solidity` or `NomicFoundation.hardhat-solidity`.\n\nAt this point VSCode's `settings.json` should have a configuration similar to this:\n\n```JSON\n{\n  \"editor.formatOnSave\": true,\n  \"solidity.formatter\": \"prettier\", // This is the default so it might be missing.\n  \"[solidity]\": {\n    // \"editor.defaultFormatter\": \"JuanBlanco.solidity\"\n    // \"editor.defaultFormatter\": \"NomicFoundation.hardhat-solidity\"\n  }\n}\n```\n\nIf you want more control over other details, you should proceed to install [`prettier-vscode`](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode).\n\n```Bash\ncode --install-extension esbenp.prettier-vscode\n```\n\nTo interact with 3rd party plugins, `prettier-vscode` will look in the project's npm modules, so you'll need to have `prettier` and `prettier-plugin-solidity` in your `package.json`\n\n```Bash\nnpm install --save-dev prettier prettier-plugin-solidity\n```\n\nThis will allow you to specify the version of the plugin in case you want to use the latest version of the plugin or need to freeze the formatting since new versions of this plugin will implement tweaks on the possible formats.\n\nYou'll have to let VSCode what formatter you prefer.\nThis can be done by opening the command palette and executing:\n\n```\n>Preferences: Configure Language Specific Settings...\n\n# Select Language\nsolidity\n```\n\nNow VSCode's `settings.json` should have this:\n\n```JSON\n{\n  \"editor.formatOnSave\": true,\n  \"[solidity]\": {\n    \"editor.defaultFormatter\": \"esbenp.prettier-vscode\"\n  }\n}\n```\n\nNote: By design, Prettier prioritizes a local over a global configuration. If you have a `.prettierrc` file in your project, your VSCode's default settings or rules in `settings.json` are ignored ([prettier/prettier-vscode#1079](https://github.com/prettier/prettier-vscode/issues/1079)).\n\n## Edge cases\n\nPrettier Solidity does its best to be pretty and consistent, but in some cases it falls back to doing things that are less than ideal.\n\n### Modifiers in constructors\n\nModifiers with no arguments are formatted with their parentheses removed, except for constructors. The reason for this is that Prettier Solidity cannot always tell apart a modifier from a base constructor. So modifiers in constructors are not modified. For example, this:\n\n```Solidity\ncontract Foo is Bar {\n  constructor() Bar() modifier1 modifier2() modifier3(42) {}\n\n  function f() modifier1 modifier2() modifier3(42) {}\n}\n```\n\nwill be formatted as\n\n```Solidity\ncontract Foo is Bar {\n  constructor() Bar() modifier1 modifier2() modifier3(42) {}\n\n  function f() modifier1 modifier2 modifier3(42) {}\n}\n```\n\nNotice that the unnecessary parentheses in `modifier2` were removed in the function but not in the constructor.\n\n## Contributing\n\n1. [Fork it](https://github.com/prettier-solidity/prettier-plugin-solidity/fork)\n2. Create your feature branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. All existing tests and coverage must pass (`npm run test:all`), if coverage drops below 100% add missing tests.\n5. Push to the branch (`git push origin feature/fooBar`)\n6. Create a new Pull Request\n\n## Who's using it?\n\nThese are some of the projects using Prettier Solidity:\n\n- [Bancor](https://app.bancor.network)\n- [Gelato](https://gelato.network/)\n- [Gnosis Protocol](https://docs.gnosis.io/protocol/)\n- [PieDAO](https://www.piedao.org/)\n- [Sablier](https://sablier.finance/)\n- [Synthetix](https://www.synthetix.io)\n- [The Sandbox](https://www.sandbox.game/en/)\n- [UMA](https://umaproject.org/)\n- [Uniswap](https://uniswap.org)\n\n## License\n\nDistributed under the MIT license. See [LICENSE](LICENSE) for more information.\n","readmeFilename":"README.md"}