Skip to content

Commit c0ccb8e

Browse files
committed
chore: use top level solhint config for horizon and add graph rules
Signed-off-by: Tomás Migone <[email protected]>
1 parent fd56cd7 commit c0ccb8e

File tree

6 files changed

+17
-9
lines changed

6 files changed

+17
-9
lines changed

.solhint.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
{
22
"extends": "solhint:recommended",
3+
"plugins": ["graph"],
34
"rules": {
45
"func-visibility": ["warn", { "ignoreConstructors": true }],
56
"compiler-version": ["off"],
67
"constructor-syntax": "warn",
78
"quotes": ["error", "double"],
89
"reason-string": ["off"],
910
"not-rely-on-time": "off",
10-
"no-empty-blocks": "off"
11+
"no-empty-blocks": "off",
12+
"named-parameters-mapping": "warn",
13+
"private-vars-leading-underscore": "off",
14+
"graph/leading-underscore": "warn",
15+
"func-name-mixedcase": "off",
16+
"graph/func-name-mixedcase": "warn",
17+
"var-name-mixedcase": "off",
18+
"graph/var-name-mixedcase": "warn",
19+
"gas-custom-errors": "off"
1120
}
1221
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"prettier-plugin-solidity": "^1.0.0",
5050
"pretty-quick": "^4.1.1",
5151
"solhint": "^5.1.0",
52+
"solhint-plugin-graph": "workspace:*",
5253
"typescript": "^5.8.3",
5354
"typescript-eslint": "^8.33.1",
5455
"yaml-lint": "^1.7.0"

packages/horizon/.solhintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
contracts/mocks/*
1+
lib/*

packages/horizon/contracts/mocks/CurationMock.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
pragma solidity 0.8.27;
44

5-
65
contract CurationMock {
76
mapping(bytes32 => uint256) public curation;
87

packages/horizon/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
"scripts": {
1818
"lint": "pnpm lint:ts && pnpm lint:sol",
1919
"lint:ts": "eslint --fix --cache '**/*.{js,ts,cjs,mjs,jsx,tsx}'; prettier -w --cache --log-level warn '**/*.{js,ts,cjs,mjs,jsx,tsx}'",
20-
"lint:sol": "pnpm lint:sol:prettier && pnpm lint:sol:solhint",
21-
"lint:sol:prettier": "prettier --write \"contracts/**/*.sol\" \"test/**/*.sol\"",
22-
"lint:sol:solhint": "solhint --noPrompt --fix \"contracts/**/*.sol\" --config node_modules/solhint-graph-config/index.js",
20+
"lint:sol": "solhint --config ../../.solhint.json --fix --noPrompt --noPoster 'contracts/**/*.sol'; prettier -w --cache --log-level warn '**/*.sol'",
2321
"lint:sol:natspec": "natspec-smells --config natspec-smells.config.js",
2422
"clean": "rm -rf build dist cache cache_forge typechain-types",
2523
"build": "hardhat compile",
@@ -59,8 +57,7 @@
5957
"lint-staged": "^15.2.2",
6058
"prettier": "^3.2.5",
6159
"prettier-plugin-solidity": "^1.3.1",
62-
"solhint": "^4.5.2",
63-
"solhint-plugin-graph": "workspace:^0.0.1",
60+
"solhint": "^5.1.0",
6461
"solidity-coverage": "^0.8.0",
6562
"ts-node": ">=8.0.0",
6663
"typechain": "^8.3.0",

packages/horizon/test/unit/data-service/implementations/DataServiceImpPausableUpgradeable.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
pragma solidity 0.8.27;
33

44
import { DataService } from "../../../../contracts/data-service/DataService.sol";
5-
import { DataServicePausableUpgradeable } from "../../../../contracts/data-service/extensions/DataServicePausableUpgradeable.sol";
5+
import {
6+
DataServicePausableUpgradeable
7+
} from "../../../../contracts/data-service/extensions/DataServicePausableUpgradeable.sol";
68
import { IGraphPayments } from "./../../../../contracts/interfaces/IGraphPayments.sol";
79

810
contract DataServiceImpPausableUpgradeable is DataServicePausableUpgradeable {

0 commit comments

Comments
 (0)