Socket
Socket
Sign inDemoInstall

solhint

Package Overview
Dependencies
Maintainers
0
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solhint - npm Package Compare versions

Comparing version 5.0.2 to 5.0.3

18

lib/rules/naming/imports-order.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc