From 064305250e6b302038e3a7ea781234b5ae1a32db Mon Sep 17 00:00:00 2001 From: sousuke0422 Date: Fri, 3 Sep 2021 21:27:48 +0900 Subject: [PATCH 1/6] ESModule --- package.json | 1 + tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d32cc47..f2ad86e 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ }, "author": "", "license": "MIT", + "type": "module", "dependencies": { "@discordjs/opus": "^0.3.3", "@google-cloud/text-to-speech": "^3.1.3", diff --git a/tsconfig.json b/tsconfig.json index 4660236..8a376b3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ "target": "ESNEXT", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "ESNEXT", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ From 7517d54aba16d7769bcd530fe7af12b96bac52c4 Mon Sep 17 00:00:00 2001 From: sousuke0422 Date: Fri, 3 Sep 2021 21:28:13 +0900 Subject: [PATCH 2/6] add .js --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 2396a0b..871f60d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,7 +4,7 @@ import { readFileSync, writeFile, writeFileSync, statSync } from "fs"; import { promisify } from "util"; import { createHash } from "crypto"; import { Client, TextChannel } from "discord.js"; -import { getConf, updateConf } from "./conf"; +import { getConf, updateConf } from "./conf.js"; // いるやつ初期化 const Gclient = new TextToSpeechClient(); From 8c103815f078164341f9d32a8b7cb3c239feeda0 Mon Sep 17 00:00:00 2001 From: sousuke0422 Date: Fri, 3 Sep 2021 21:58:55 +0900 Subject: [PATCH 3/6] eslint --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0db5b24..50dc8f0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,4 @@ -module.exports = { +export default { "env": { "browser": true, "commonjs": true, From 1c240cdce502bdaffd61f4eb21d4ae89bc82baab Mon Sep 17 00:00:00 2001 From: sousuke0422 Date: Sat, 4 Sep 2021 01:26:16 +0900 Subject: [PATCH 4/6] =?UTF-8?q?json=E4=BD=BF=E3=81=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js => .eslintrc.json | 7 +++---- .github/workflows/buildlint.yml | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) rename .eslintrc.js => .eslintrc.json (82%) diff --git a/.eslintrc.js b/.eslintrc.json similarity index 82% rename from .eslintrc.js rename to .eslintrc.json index 50dc8f0..62fd271 100644 --- a/.eslintrc.js +++ b/.eslintrc.json @@ -1,4 +1,4 @@ -export default { +{ "env": { "browser": true, "commonjs": true, @@ -8,6 +8,5 @@ export default { "parserOptions": { "ecmaVersion": 12 }, - "rules": { - } -}; + "rules": {} +} \ No newline at end of file diff --git a/.github/workflows/buildlint.yml b/.github/workflows/buildlint.yml index 0b9914f..8a4b87b 100644 --- a/.github/workflows/buildlint.yml +++ b/.github/workflows/buildlint.yml @@ -25,5 +25,5 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm i - - run: npx eslint --config .eslintrc.js + - run: npx eslint --config .eslintrc.json - run: npm run build From abefdb452912972f30fbd32f2ac9cb0d25cbf272 Mon Sep 17 00:00:00 2001 From: sousuke0422 Date: Sat, 4 Sep 2021 01:28:34 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=E3=82=AD=E3=83=A3=E3=83=83=E3=82=B7?= =?UTF-8?q?=E3=83=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/buildlint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildlint.yml b/.github/workflows/buildlint.yml index 8a4b87b..9803bc3 100644 --- a/.github/workflows/buildlint.yml +++ b/.github/workflows/buildlint.yml @@ -21,9 +21,10 @@ jobs: steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + cache: 'npm' - run: npm i - run: npx eslint --config .eslintrc.json - run: npm run build From 6125795291993b01b403b540e360c63e7bd064fb Mon Sep 17 00:00:00 2001 From: sousuke0422 Date: Tue, 7 Sep 2021 14:54:15 +0900 Subject: [PATCH 6/6] es2020 --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 8a376b3..8b3160a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ "target": "ESNEXT", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "ESNEXT", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "module": "ES2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */