Comments (5)
mmmh not sure as the order of import does impact the bytecode generated and could potentially affect the way the state is stored and the amount of gas it uses on different calls.
doesn't feel right with me even as an option
.
@fvictorio any thoughts?
from prettier-plugin-solidity.
@Janther Can you explain to me how import order impacts the bytecode? From my (albeit limited) experimenting, it seems to have no affect. Thanks!
from prettier-plugin-solidity.
I think I was mistaken, I was thinking of the order of inheritance in a contract.
Still would like to hear the community's feedback on this one as it does change the parsed AST.
from prettier-plugin-solidity.
Parking this for now, it seems to add some complexity (specially if we add comments for the imports into the mix).
from prettier-plugin-solidity.
I am of the opinion that this kind of thing belongs in a linter (tagging @juanpcapurro, who is maintaining solhint-community
).
That being said, not everyone agrees with that point of view. For example, rustfmt
does sort imports (and a lot of other things).
from prettier-plugin-solidity.
Related Issues (20)
- Unnecessary blank line added HOT 5
- Add support for user-defined operators
- Function declarations dont follow style guide any longer HOT 2
- Investigate CI false negatives HOT 1
- Problem with formatting when comment before contract HOT 3
- This e-notation broke formatting HOT 2
- Names in mappings (Solidity 0.8.18) gives an error Error: extraneous input 'loanAddress' expecting '=>' HOT 2
- Unwanted line wrap in if/else conditions without curly brackets HOT 4
- Unnecessary grouping of operands HOT 2
- Add support for `prettier` `3.0` HOT 4
- plugin broken with 3.0.0 prettier release HOT 4
- Incompatible with Prettier 3 HOT 3
- Option to disable new line spacing between function in interface
- Error using prettier-plugin-solidity with Vite and Monaco HOT 6
- [BUG] __dirname is not defined HOT 3
- "Format on Save" and "Format Document" are broken with the latest VS Code HOT 9
- Prettier step is ignored for Solidity files on Mac HOT 7
- Donating Funds to prettier-plugin-solidity HOT 1
- Feature request: Enforce all blocks with brackets as optional configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettier-plugin-solidity.