config for functions directory
This commit is contained in:
@@ -5,24 +5,23 @@ 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",
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
project: ["./tsconfig.json", "./tsconfig.dev.json"],
|
||||
sourceType: "module",
|
||||
project: ['./tsconfig.json', './tsconfig.dev.json'],
|
||||
sourceType: 'module',
|
||||
},
|
||||
ignorePatterns: [
|
||||
"/lib/**/*", // Ignore built files.
|
||||
'/lib/**/*', // Ignore built files.
|
||||
],
|
||||
plugins: ["@typescript-eslint", "import"],
|
||||
plugins: ['@typescript-eslint', 'import'],
|
||||
rules: {
|
||||
"quotes": ["error", "double"],
|
||||
"import/no-unresolved": 0,
|
||||
'import/no-unresolved': 0,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "functions",
|
||||
"scripts": {
|
||||
"lint": "eslint --ext .js,.ts .",
|
||||
"build": "tsc",
|
||||
"build": "npm run lint && tsc",
|
||||
"serve": "npm run build && firebase emulators:start --only functions",
|
||||
"shell": "npm run build && firebase functions:shell",
|
||||
"start": "npm run shell",
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import * as functions from "firebase-functions";
|
||||
import * as functions from 'firebase-functions';
|
||||
|
||||
// // Start writing Firebase Functions
|
||||
// // https://firebase.google.com/docs/functions/typescript
|
||||
//
|
||||
// export const helloWorld = functions.https.onRequest((request, response) => {
|
||||
// functions.logger.info("Hello logs!", {structuredData: true});
|
||||
// response.send("Hello from Firebase!");
|
||||
// });
|
||||
|
||||
export const helloWorld = functions.https.onRequest((request, response) => {
|
||||
functions.logger.info('Hello logs!', { structuredData: true });
|
||||
response.send('Hello from Firebase!');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user