-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93b02f4
commit 6fc5b55
Showing
3 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "imports-order | Solhint" | ||
--- | ||
|
||
# imports-order | ||
![Category Badge](https://img.shields.io/badge/-Style%20Guide%20Rules-informational) | ||
![Default Severity Badge warn](https://img.shields.io/badge/Default%20Severity-warn-yellow) | ||
|
||
## Description | ||
Order the imports of the contract to follow a certain hierarchy | ||
|
||
## Options | ||
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn. | ||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"imports-order": "warn" | ||
} | ||
} | ||
``` | ||
|
||
### Notes | ||
- Order by hierarchy of directories first, e.g. ../../ comes before ../, which comes before ./, which comes before ./foo | ||
- Order alphabetically for each file at the same level, e.g. ./bar comes before ./foo | ||
- Rule support up to 10 folder levels "../../../../../../../../../../" | ||
|
||
## Examples | ||
This rule does not have examples. | ||
|
||
## Version | ||
This rule is introduced in the latest version. | ||
|
||
## Resources | ||
- [Rule source](https://github.com/protofire/solhint/tree/master/lib/rules/naming/imports-order.js) | ||
- [Document source](https://github.com/protofire/solhint/tree/master/docs/rules/naming/imports-order.md) | ||
- [Test cases](https://github.com/protofire/solhint/tree/master/test/rules/naming/imports-order.js) |