Ver Fonte

Enable more solhint rules (#4836)

Hadrien Croubois há 1 ano atrás
pai
commit
0b343abcb5
3 ficheiros alterados com 14 adições e 8 exclusões
  1. 4 4
      package-lock.json
  2. 1 1
      package.json
  3. 9 3
      solhint.config.js

+ 4 - 4
package-lock.json

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

+ 1 - 1
package.json

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

+ 9 - 3
solhint.config.js

@@ -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}`),
 ];