-
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.
* initial progress migrating to typescript * initial progress migrating to typescript * docs: update return types * infra: remove sourceMaps from built files * docs: update badges
- Loading branch information
Showing
23 changed files
with
4,700 additions
and
2,279 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,52 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
es2022: true, | ||
node: true, | ||
mocha: true, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 13, | ||
project: ['tsconfig.json'], | ||
sourceType: 'module', | ||
tsconfigRootDir: __dirname, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:import/errors', | ||
'plugin:import/warnings', | ||
'plugin:import/typescript', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
ignorePatterns: [ | ||
'/lib/**/*', // Ignore built files. | ||
], | ||
plugins: [ | ||
'@typescript-eslint', | ||
'import', | ||
], | ||
rules: { | ||
// Basic ES6 | ||
indent: [ | ||
'error', 4, { // use 4 spaces for indents | ||
'SwitchCase': 1, // indent case within switch | ||
} | ||
], | ||
'linebreak-style': 0, // mixed environment let git config enforce line endings | ||
quotes: ['error', 'single'], | ||
semi: ['error', 'always'], | ||
'no-var': 'error', | ||
'no-console': 0, // allow use of console.log, | ||
'arrow-body-style': [0, 'always'], | ||
'max-len': 0, | ||
'camelcase': 1, | ||
'import/no-unresolved': [ | ||
'error', { | ||
// https://github.com/firebase/firebase-admin-node/discussions/1359 | ||
ignore: ['^firebase-admin/.+'], | ||
}, | ||
], | ||
'@typescript-eslint/consistent-type-definitions': 'warn' | ||
}, | ||
}; |
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,42 @@ | ||
name: Automated Node Version Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [16, 18, 19] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node ${{ matrix.node }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: Install NPM Modules | ||
run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
- name: Test | ||
run: | | ||
npm run coverage | ||
- name: Coveralls Parallel | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
flag-name: node-${{ runner.os }}-${{ matrix.node }} | ||
parallel: true | ||
|
||
coveralls-finished: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
parallel-finished: true |
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 |
---|---|---|
|
@@ -10,3 +10,6 @@ node_modules | |
|
||
# Debug logs | ||
npm-debug.log | ||
|
||
# Built JavaScript files | ||
lib |
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 |
---|---|---|
@@ -1,11 +1,30 @@ | ||
test/ | ||
.git* | ||
# Debug Logs | ||
npm-debug.log | ||
.travis.yml | ||
.eslintrc | ||
node_modules | ||
coverage | ||
upgrade_guides | ||
_config.yml | ||
.coveralls.yml | ||
|
||
# Uncompiled Source Files | ||
src | ||
test | ||
|
||
# Node Modules | ||
node_modules/ | ||
node_modules/* | ||
|
||
# Configuration Files | ||
.eslintrc* | ||
tsconfig* | ||
|
||
# Test/Coverage Files | ||
coverage/ | ||
coverage/* | ||
.nycrc | ||
.nyc_output | ||
.nyc_output/* | ||
.coveralls.yml | ||
lib/test | ||
|
||
# Github Configuration Files | ||
_config.yml | ||
.git* | ||
|
||
# Extra documentation files | ||
upgrade_guides/* |
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,16 @@ | ||
{ | ||
"check-coverage": true, | ||
"all": true, | ||
"include": [ | ||
"src/**/!(*.test.*).[tj]s?(x)" | ||
], | ||
"exclude": [ | ||
"test/**/*.*" | ||
], | ||
"reporter": [ | ||
"lcov", | ||
"text-summary", | ||
"text" | ||
], | ||
"report-dir": "coverage" | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.