Enable more solhint rules (#4836)

pull/4841/head
Hadrien Croubois 1 year ago committed by GitHub
parent 06eb785fcf
commit 0b343abcb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      package-lock.json
  2. 2
      package.json
  3. 12
      solhint.config.js

8
package-lock.json generated

@ -38,7 +38,7 @@
"prettier-plugin-solidity": "^1.1.0",
"rimraf": "^5.0.1",
"semver": "^7.3.5",
"solhint": "^3.3.6",
"solhint": "^3.6.1",
"solhint-plugin-openzeppelin": "file:scripts/solhint-custom",
"solidity-ast": "^0.4.50",
"solidity-coverage": "^0.8.5",
@ -9712,9 +9712,9 @@
}
},
"node_modules/solhint": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/solhint/-/solhint-3.6.2.tgz",
"integrity": "sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ==",
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/solhint/-/solhint-3.6.1.tgz",
"integrity": "sha512-pS7Pl11Ujiew9XWaLDH0U+AFc6iK1RtLV0YETSpjHZXjUaNYi32mY+pi8Ap9vqmNfWodWKtG0bVQpatq84mL4g==",
"dev": true,
"dependencies": {
"@solidity-parser/parser": "^0.16.0",

@ -77,7 +77,7 @@
"prettier-plugin-solidity": "^1.1.0",
"rimraf": "^5.0.1",
"semver": "^7.3.5",
"solhint": "^3.3.6",
"solhint": "^3.6.1",
"solhint-plugin-openzeppelin": "file:scripts/solhint-custom",
"solidity-ast": "^0.4.50",
"solidity-coverage": "^0.8.5",

@ -1,16 +1,22 @@
const customRules = require('./scripts/solhint-custom');
const rules = [
'no-unused-vars',
'avoid-tx-origin',
'const-name-snakecase',
'contract-name-camelcase',
'event-name-camelcase',
'explicit-types',
'func-name-mixedcase',
'func-param-name-mixedcase',
'modifier-name-mixedcase',
'var-name-mixedcase',
'imports-on-top',
'modifier-name-mixedcase',
'no-console',
'no-global-import',
'no-unused-vars',
'quotes',
'use-forbidden-name',
'var-name-mixedcase',
'visibility-modifier-order',
...customRules.map(r => `openzeppelin/${r.ruleId}`),
];

Loading…
Cancel
Save