Socket
Socket
Sign inDemoInstall

solhint

Package Overview
Dependencies
Maintainers
4
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 2.0.0-alpha.1 to 2.0.0-alpha.2

4

lib/rules/index.js

@@ -42,6 +42,6 @@ const _ = require('lodash')

function loadPlugin(pluginName, { reporter, config }) {
function loadPlugin(pluginName, { reporter, config, inputSrc, fileName }) {
const plugins = require(`solhint-plugin-${pluginName}`)
return plugins.map(Plugin => new Plugin(reporter, config)).map(plugin => {
return plugins.map(Plugin => new Plugin(reporter, config, inputSrc, fileName)).map(plugin => {
plugin.ruleId = `${pluginName}/${plugin.ruleId}`

@@ -48,0 +48,0 @@ return plugin

@@ -1,6 +0,5 @@

const Prettier = require('./prettier')
const QuotesChecker = require('./quotes')
module.exports = function checkers(reporter, config, inputSrc, fileName) {
return [new QuotesChecker(reporter, config), new Prettier(reporter, config, inputSrc, fileName)]
return [new QuotesChecker(reporter, config)]
}
{
"name": "solhint",
"version": "2.0.0-alpha.1",
"version": "2.0.0-alpha.2",
"description": "Solidity Code Linter",

@@ -40,4 +40,3 @@ "main": "solhint.js",

"js-yaml": "^3.12.0",
"lodash": "^4.17.11",
"prettier-linter-helpers": "^1.0.0"
"lodash": "^4.17.11"
},

@@ -56,5 +55,4 @@ "devDependencies": {

"optionalDependencies": {
"prettier": "^1.14.3",
"prettier-plugin-solidity": "^1.0.0-alpha.4"
"prettier": "^1.14.3"
}
}

@@ -150,4 +150,2 @@ # Solhint Project

[Full list with all supported Best Practices Rules](https://github.com/protofire/solhint/blob/master/docs/rules.md#best-practise-rules)
### Prettier (experimental)
If you have [prettier-plugin-solidity](https://github.com/prettier-solidity/prettier-plugin-solidity) installed, you can use the `prettier/prettier` rule for reporting differences between your code and how prettier would format it. If you enable this rule, you should disable some of the style guides rules (mainly `quotes`, `indent` and `two-lines-top-level-separator`).

@@ -154,0 +152,0 @@ ## Documentation

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