react-dapp-boilerplate 사용시 formatting 이슈 정리

frenchkebab·2022년 6월 15일
0

졸업프로젝트

목록 보기
1/1

리포지토리 참조 :
https://github.com/Frenchkebab/simple-react-daap-boilerplate

계속 contract 디렉토리의 .sol 파일들의 string이 single quote가 되는 문제가 있었는데...

좀만 구글링 해서 찾아보니 별 것 아니였다.

.prettierrc

.prettierrc 파일을 생성하여 아래와 같이 override 해준다.

.prettierrc

{
  "overrides": [
    {
      "files": "*.sol",
      "options": {
        "printWidth": 80,
        "tabWidth": 4,
        "useTabs": false,
        "singleQuote": false,
        "bracketSpacing": false,
        "explicitTypes": "always"
      }
    }
  ]
}

.solhint.json

{
  "extends": "solhint:recommended",
  "rules": {
    "quotes": ["warn", "double"],
    "compiler-version": ["error", "^0.8.0"],
    "func-visibility": ["warn", { "ignoreConstructors": true }]
  }
}

아직도 linter가 정확히 뭐하는건지는 좀 헷갈리긴 한다.

그래도 개발자의 편의성을 위해 나온 툴들이니 쫄지 말고 하나씩 학습해나가자...

profile
Solidity에 대해 공부하고 있습니다.

0개의 댓글