Skip to content

Commit

Permalink
env: linter / formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
byeongsu-hong committed Mar 7, 2024
1 parent d0b17e5 commit d334e8e
Show file tree
Hide file tree
Showing 4 changed files with 720 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.cargo
.github
contracts/
example/
integration-test/
node_modules/
packages/
target/
22 changes: 22 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
root: true,
// eslint에 어떠한 parser를 사용할지 알려주는 옵션
// eslint가 typescript 문법을 이해할 수 있게 해준다.
parser: "@typescript-eslint/parser",
// typescript-eslint에서 제공하는 규칙들을 사용할 수 있게 해준다.
plugins: ["@typescript-eslint"],
// 어떠한 규칙들과 설정으로 eslint를 사용할지 명시한다.
// 아래와 같이 작성하면 default 값으로 적용이 된다.
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],

rules: {
// 세미콜론이 없으면 에러로 취급한다.
semi: "error",
// 기존 프로젝트에서는 'warn'으로 취급되지만, 'error'로 설정하면 에러로 취급한다.
"@typescript-eslint/no-unused-vars": "error",
},
};
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@
"@types/decompress": "^4.2.7",
"@types/js-yaml": "^4.0.8",
"@types/node": "^20.11.20",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"esbuild": "^0.20.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.2.5",
"ts-node": "^10.9.1",
"ts-yaml": "^1.0.0",
"tsx": "^3.13.0",
Expand Down
Loading

0 comments on commit d334e8e

Please sign in to comment.