Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
siarheidudko committed Aug 21, 2024
1 parent 33d8dfc commit 80a9f04
Show file tree
Hide file tree
Showing 30 changed files with 2,027 additions and 4,232 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

168 changes: 0 additions & 168 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.prettierrc
.eslintrc
.eslintignore
eslint.config.mjs
.envkey
.editorconfig
.env.local
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-and-deploy-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ concurrency:
group: '${{ github.workflow }} @ ${{ github.ref }}'
cancel-in-progress: true
env:
NODE_VERSION: 20
NODE_VERSION: 22
TOKEN_FOR_WORKFLOW: ${{ secrets.TOKEN_FOR_WORKFLOW }}
FIREBASE_PROJECT: 'development'
GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/firebase/functions/accounts/development.json
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-and-deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ concurrency:
group: '${{ github.workflow }} @ ${{ github.ref }}'
cancel-in-progress: true
env:
NODE_VERSION: 20
NODE_VERSION: 22
TOKEN_FOR_WORKFLOW: ${{ secrets.TOKEN_FOR_WORKFLOW }}
FIREBASE_PROJECT: 'production'
GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/firebase/functions/accounts/production.json
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -56,7 +56,7 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install test & build dependencies
run: sudo npm install firebase-tools -g
run: sudo npm install firebase-tools@13.15.2 -g
working-directory: ${{ github.workspace }}/firebase/functions
- name: Install dependencies
run: npm ci
Expand Down
158 changes: 158 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import globals from 'globals';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.node,
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
ecmaVersion: 'latest',
},
},
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': [
'off',
{
ignoreRestArgs: true,
},
],
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-unused-vars': [
'warn',
{
vars: 'all',
args: 'none',
},
],
'@typescript-eslint/prefer-for-of': 'warn',
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/unified-signatures': 'warn',
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
},
],
'constructor-super': 'error',
eqeqeq: ['warn', 'always'],
'for-direction': 'error',
'getter-return': 'error',
'max-len': [
'warn',
{
code: 120,
tabWidth: 2,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreComments: true,
},
],
'no-await-in-loop': 'off',
'no-continue': 'off',
'no-async-promise-executor': 'error',
'no-case-declarations': 'error',
'no-class-assign': 'error',
'no-compare-neg-zero': 'error',
'no-cond-assign': 'error',
'no-const-assign': 'error',
'no-constant-condition': 'error',
'no-control-regex': 'error',
'no-debugger': 'error',
'no-delete-var': 'error',
'no-dupe-args': 'error',
'no-dupe-class-members': 'error',
'no-dupe-else-if': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-duplicate-imports': 'error',
'no-empty': [
'error',
{
allowEmptyCatch: true,
},
],
'no-empty-character-class': 'error',
'no-empty-pattern': 'error',
'no-ex-assign': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-semi': 'error',
'no-fallthrough': 'error',
'no-func-assign': 'error',
'no-global-assign': 'error',
'no-import-assign': 'error',
'no-inner-declarations': 'error',
'no-invalid-regexp': 'error',
'no-invalid-this': 'error',
'no-irregular-whitespace': 'error',
'no-misleading-character-class': 'error',
'no-mixed-spaces-and-tabs': 'error',
'no-new-symbol': 'error',
'no-new-wrappers': 'error',
'no-obj-calls': 'error',
'no-octal': 'error',
'no-param-reassign': 'error',
'no-plusplus': [
'error',
{
allowForLoopAfterthoughts: true,
},
],
'no-prototype-builtins': 'error',
'no-redeclare': 'error',
'no-regex-spaces': 'error',
'no-restricted-syntax': ['off', 'ForOfStatement'],
'no-self-assign': 'error',
'no-sequences': 'error',
'no-setter-return': 'error',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'warn',
'no-shadow-restricted-names': 'error',
'no-sparse-arrays': 'error',
'no-this-before-super': 'error',
'no-throw-literal': 'error',
'no-undef': 'error',
'no-underscore-dangle': [
'error',
{
allowAfterThis: true,
},
],
'no-unexpected-multiline': 'error',
'no-unreachable': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-unused-labels': 'error',
'no-unused-vars': 'warn',
'no-useless-catch': 'error',
'no-useless-escape': 'error',
'no-var': 'warn',
'no-void': 'error',
'no-with': 'error',
'object-curly-spacing': ['warn', 'always'],
'prefer-const': 'warn',
'require-yield': 'error',
'use-isnan': 'error',
'valid-typeof': 'error',
'guard-for-in': 'error',
},
}
);
4 changes: 2 additions & 2 deletions ignoreUpdatesModules.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"base": ["node-fetch"],
"dev": ["@types/node", "@types/node-fetch", "eslint"]
"base": [],
"dev": ["@types/node"]
}
Loading

0 comments on commit 80a9f04

Please sign in to comment.