diff --git a/.eslintrc.js b/.eslintrc.json similarity index 81% rename from .eslintrc.js rename to .eslintrc.json index 0db5b24..62fd271 100644 --- a/.eslintrc.js +++ b/.eslintrc.json @@ -1,4 +1,4 @@ -module.exports = { +{ "env": { "browser": true, "commonjs": true, @@ -8,6 +8,5 @@ module.exports = { "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..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.js + - run: npx eslint --config .eslintrc.json - run: npm run build 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/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(); diff --git a/tsconfig.json b/tsconfig.json index 4660236..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": "commonjs", /* 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. */