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