Skip to content

Commit e06930b

Browse files
committed
fix: imports-order for direct paths
1 parent 0f0f313 commit e06930b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/rules/naming/func-named-parameters.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ functionName({ sender: '0xA81705c8C247C413a19A244938ae7f4A0393944e', amount: 1e1
5151
functionName({ sender: _senderAddress, amount: 1e18, token: _tokenAddress, receiver: _receiverAddress })
5252
```
5353

54+
#### abi.encodeX call with four UNNAMED parameters
55+
56+
```solidity
57+
abi.encodePacked(_senderAddress, 1e18, _tokenAddress, _receiverAddress )
58+
```
59+
5460
### 👎 Examples of **incorrect** code for this rule
5561

5662
#### Function call with four UNNAMED parameters (default 4)

docs/rules/naming/imports-order.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ This rule accepts a string option of rule severity. Must be one of "error", "war
2626
### Notes
2727
- Paths starting with "@" like "@openzeppelin/" and urls ("http" and "https") will go first
2828
- Order by hierarchy of directories first, e.g. ./../../ comes before ./../, which comes before ./, which comes before ./foo
29+
- Direct imports come before relative imports
2930
- Order alphabetically for each path at the same level, e.g. ./contract/Zbar.sol comes before ./interface/Ifoo.sol
3031
- Rule does NOT support this kind of import "import * as Alias from "./filename.sol"
3132
- When "--fix", rule will re-write this notation "../folder/file.sol" or this one "../file.sol" to "./../folder/file.sol" or this one "./../file.sol"
@@ -34,7 +35,7 @@ This rule accepts a string option of rule severity. Must be one of "error", "war
3435
This rule does not have examples.
3536

3637
## Version
37-
This rule is introduced in the latest version.
38+
This rule was introduced in [Solhint 5.0.2](https://github.com/protofire/solhint/tree/v5.0.2)
3839

3940
## Resources
4041
- [Rule source](https://github.com/protofire/solhint/tree/master/lib/rules/naming/imports-order.js)

0 commit comments

Comments
 (0)