From 2063d8b78e9d39363487d65ef9aa34d64c09abbc Mon Sep 17 00:00:00 2001 From: Natalie Bunduwongse Date: Tue, 28 May 2024 17:58:56 +1200 Subject: [PATCH] style: add eslintrc --- .eslintrc | 7 +++++++ .github/workflows/linter.yml | 1 + contracts/.eslintrc | 9 +++++++++ contracts/tsconfig.json | 7 +++++-- json-server/tsconfig.json | 7 +++++-- mint-backend/tsconfig.json | 5 ++++- tsconfig.json | 10 ++++++++++ 7 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 .eslintrc create mode 100644 contracts/.eslintrc create mode 100644 tsconfig.json diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000..9e0782c4 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,7 @@ +{ + "root": true, + "parserOptions": { + "project": "./tsconfig.json", + "tsconfigRootDir": "." + } +} \ No newline at end of file diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index af4a5e84..2736dece 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -61,3 +61,4 @@ jobs: VALIDATE_MARKDOWN: false VALIDATE_GITLEAKS: false VALIDATE_JSCPD: false + TYPESCRIPT_ES_CONFIG_FILE: .eslintrc diff --git a/contracts/.eslintrc b/contracts/.eslintrc new file mode 100644 index 00000000..f912b29d --- /dev/null +++ b/contracts/.eslintrc @@ -0,0 +1,9 @@ +{ + "extends": [ + "../.eslintrc" + ], + "parserOptions": { + "project": "./tsconfig.json", + "tsconfigRootDir": "." + } +} \ No newline at end of file diff --git a/contracts/tsconfig.json b/contracts/tsconfig.json index 09873633..63f4d8ac 100644 --- a/contracts/tsconfig.json +++ b/contracts/tsconfig.json @@ -7,5 +7,8 @@ "strict": true, "skipLibCheck": true }, - "include": ["./scripts"] -} + "include": [ + "./scripts", + "./test" + ] +} \ No newline at end of file diff --git a/json-server/tsconfig.json b/json-server/tsconfig.json index 694d16e0..de44f605 100644 --- a/json-server/tsconfig.json +++ b/json-server/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES2020", + "target": "es2020", "module": "Node16", "esModuleInterop": true, "outDir": "./dest", @@ -12,5 +12,8 @@ "./src/*" ] } - } + }, + "include": [ + "./src" + ] } \ No newline at end of file diff --git a/mint-backend/tsconfig.json b/mint-backend/tsconfig.json index 694d16e0..2325ee45 100644 --- a/mint-backend/tsconfig.json +++ b/mint-backend/tsconfig.json @@ -12,5 +12,8 @@ "./src/*" ] } - } + }, + "include": [ + "./src" + ] } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..3ef3667b --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + } +} \ No newline at end of file