Skip to content

Commit 1b25530

Browse files
authored
Merge pull request #168 from firebase/mc/functions-v2
Migrate to functions v2
2 parents bb7126d + 155d43f commit 1b25530

File tree

15 files changed

+1630
-680
lines changed

15 files changed

+1630
-680
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@ jobs:
2626
path: ~/.npm
2727
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
2828

29+
- name: Copy mock config
30+
run: mkdir functions/config && cp functions/src/test/mock_data/config.json functions/config/config.json
31+
2932
- name: Run tests
3033
run: make test-functions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ functions/dist
44
functions/config/*
55
.firebaserc
66
.firebase
7+
.env
8+
.env.*
79
*.log
810
functions/config/config.json
911
/**/.runtimeconfig.json
12+
.DS_Store

firebase.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,17 @@
2828
"ui": {
2929
"enabled": true
3030
}
31-
}
31+
},
32+
"functions": [
33+
{
34+
"source": "functions",
35+
"codebase": "default",
36+
"ignore": [
37+
"node_modules",
38+
".git",
39+
"firebase-debug.log",
40+
"firebase-debug.*.log"
41+
]
42+
}
43+
]
3244
}

functions/eslint.config.mjs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
import { globalIgnores } from "eslint/config";
6+
7+
export default tseslint.config(
8+
eslint.configs.recommended,
9+
tseslint.configs.recommended,
10+
{
11+
"rules": {
12+
"@typescript-eslint/no-explicit-any": "off",
13+
"@typescript-eslint/no-namespace": "off",
14+
"@typescript-eslint/no-require-imports": "off",
15+
"@typescript-eslint/no-unused-vars": "off",
16+
"@typescript-eslint/prefer-as-const": "off",
17+
"no-prototype-builtins": "off",
18+
"no-case-declarations": "off",
19+
"no-undef": "off"
20+
}
21+
},
22+
globalIgnores(["dist/"])
23+
);

0 commit comments

Comments
 (0)