-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from ciatph/dev
v1.0.9
- Loading branch information
Showing
15 changed files
with
6,043 additions
and
554 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
es6: true | ||
}, | ||
extends: [ | ||
'standard', | ||
'eslint:recommended' | ||
], | ||
globals: { | ||
Atomics: 'readonly', | ||
SharedArrayBuffer: 'readonly' | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2022 | ||
}, | ||
rules: { | ||
'indent': ['error', 2], | ||
'linebreak-style': ['error', 'unix'], | ||
'quotes': ['error', 'single'], | ||
'semi': ['error', 'never'] | ||
// 'no-console': ['error', { 'allow': ['error'] }] | ||
// 'no-unused-vars': 'off', | ||
// 'no-undef': 'off' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Lint Files | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
lint-server: | ||
name: Lint App | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v1 | ||
- name: Use NodeJS ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Install Dependencies and lint | ||
run: | | ||
npm install | ||
npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules/ | |
.env | ||
.vscode | ||
*.csv | ||
*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules/ | |
.env | ||
.vscode | ||
*.csv | ||
*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const { FirestoreData } = require('../index') | ||
|
||
// Demonstrates custom Firestore queries | ||
// with direct usage of firebase-admin's firestore and admin objects | ||
const main = async () => { | ||
const Firestore = new FirestoreData() | ||
|
||
try { | ||
const firestoreCollection = 'my_books_collection' | ||
const id = Firestore.db.collection(firestoreCollection).doc().id | ||
|
||
const logs = await Firestore.db | ||
.collection(firestoreCollection) | ||
.doc(id) | ||
.set({ | ||
id, | ||
title: 'My Favorite Book', | ||
date_created: Firestore.admin.firestore.Timestamp.now() | ||
}) | ||
console.log(logs) | ||
} catch (err) { | ||
console.log(err.message) | ||
} | ||
} | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.