diff --git a/v2/functions/.eslintrc.js b/v2/functions/.eslintrc.js index 9bc4f3b..a79cb56 100644 --- a/v2/functions/.eslintrc.js +++ b/v2/functions/.eslintrc.js @@ -5,12 +5,17 @@ module.exports = { node: true, }, extends: [ + // "eslint:recommended", + // "plugin:import/errors", + // "plugin:import/warnings", + // "plugin:import/typescript", + // "google", + // "plugin:@typescript-eslint/recommended", + "eslint:recommended", "plugin:import/errors", "plugin:import/warnings", "plugin:import/typescript", - "google", - "plugin:@typescript-eslint/recommended", ], parser: "@typescript-eslint/parser", parserOptions: { @@ -23,7 +28,7 @@ module.exports = { ], plugins: ["@typescript-eslint", "import"], rules: { - "quotes": ["error", "double"], - "import/no-unresolved": 0, + quotes: ["error", "double"], + // "import/no-unresolved": 0, }, }; diff --git a/v2/functions/src/agora.ts b/v2/functions/src/agora.ts new file mode 100644 index 0000000..e6568ab --- /dev/null +++ b/v2/functions/src/agora.ts @@ -0,0 +1,13 @@ +import * as functions from "firebase-functions"; +import * as admin from "firebase-admin"; + +// exports.agoraToken = functions.https.onCall((data, context) => { +// console.log(data); + +// console.log("user's id: " + context.auth?.uid); +// const channelName = data.channelName; + +// const token = agora.getAgoraToken(channelName); + +// return {token}; +// }); diff --git a/v2/functions/src/index.ts b/v2/functions/src/index.ts index 2e82c74..299fb37 100644 --- a/v2/functions/src/index.ts +++ b/v2/functions/src/index.ts @@ -11,13 +11,3 @@ export const helloWorld = functions.https.onRequest((request, response) => { response.send("Hello from woahhhhhh!"); }); -// exports.agoraToken = functions.https.onCall((data, context) => { -// console.log(data); - -// console.log("user's id: " + context.auth?.uid); -// const channelName = data.channelName; - -// let token = agora.getAgoraToken(channelName); - -// return { token }; -// }); diff --git a/v2/functions/tsconfig.json b/v2/functions/tsconfig.json index 7ce05d0..66c4fba 100644 --- a/v2/functions/tsconfig.json +++ b/v2/functions/tsconfig.json @@ -6,10 +6,9 @@ "outDir": "lib", "sourceMap": true, "strict": true, - "target": "es2017" + "target": "es2017", + "strictNullChecks": true }, "compileOnSave": true, - "include": [ - "src" - ] + "include": ["src"] }