Comparing version 5.0.2 to 5.0.3
@@ -27,2 +27,5 @@ const BaseChecker = require('../base-checker') | ||
{ | ||
note: 'Direct imports come before relative imports', | ||
}, | ||
{ | ||
note: 'Order alphabetically for each path at the same level, e.g. ./contract/Zbar.sol comes before ./interface/Ifoo.sol', | ||
@@ -139,5 +142,7 @@ }, | ||
const protocolOrder = { | ||
'@': -30000, | ||
'http://': -20000, | ||
'https://': -10000, | ||
'@': -40000, | ||
'http://': -30000, | ||
'https://': -20000, | ||
// eslint-disable-next-line prettier/prettier | ||
folderPath: -10000, | ||
} | ||
@@ -147,3 +152,3 @@ | ||
for (const protocol in protocolOrder) { | ||
if (path.startsWith(protocol)) { | ||
if (protocol !== 'folderPath' && path.startsWith(protocol)) { | ||
return protocolOrder[protocol] | ||
@@ -153,2 +158,7 @@ } | ||
// Handling for paths that are likely folder names without a leading './' | ||
if (!path.startsWith('./') && /^[a-zA-Z0-9]/.test(path)) { | ||
return protocolOrder.folderPath | ||
} | ||
// Relative path handling | ||
@@ -155,0 +165,0 @@ if (path.startsWith('./')) { |
{ | ||
"name": "solhint", | ||
"version": "5.0.2", | ||
"version": "5.0.3", | ||
"description": "Solidity Code Linter", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
466661
13513