Skip to content

Commit

Permalink
Merge branch 'develop' into issue-2242
Browse files Browse the repository at this point in the history
  • Loading branch information
syedali237 authored Oct 13, 2024
2 parents c911769 + 2bbde4b commit 3ff511c
Show file tree
Hide file tree
Showing 25 changed files with 679 additions and 68 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
exit 1
Check-Unauthorized-Changes:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Checks if no unauthorized files are changed
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -138,6 +139,7 @@ jobs:
exit 1
File-count-check:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Checks if number of files changed is acceptable
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -288,6 +290,7 @@ jobs:
min_coverage: 95.0

JSDocs:
if: ${{ github.actor != 'dependabot[bot]' }}
name: 'JSDocs comments and pipeline'
runs-on: ubuntu-latest
needs: Test-Application
Expand All @@ -303,6 +306,7 @@ jobs:
run: echo "Run JSdocs :${{ env.RUN_JSDOCS }}"

Branch-check:
if: ${{ github.actor != 'dependabot[bot]' }}
name: "Base branch check"
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
##############################################################################

Push-Workflow:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Testing Application
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -54,8 +55,6 @@ jobs:
MONGO_DB_URL: mongodb://localhost:27017/talawa-test-db
REDIS_HOST: localhost
REDIS_PORT: 6379
# ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
# REFRESH_TOKEN_SECRET: ${{ secrets.REFRESH_TOKEN_SECRET }}

# We checkout the content of the Talawa-API repository in a directory called `api`
steps:
Expand Down Expand Up @@ -95,6 +94,7 @@ jobs:

# You can find the deployment instructions in the scripts/cloud-api-demo/README.md file
Deploy-Workflow:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Deploying Application to Cloud VPS
needs: Push-Workflow
runs-on: ubuntu-latest
Expand Down Expand Up @@ -130,6 +130,7 @@ jobs:
python3 /usr/local/bin/scripts/deploy.py --path ~/develop --branch develop
Check-Schema:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Check Schema
runs-on: ubuntu-latest

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Core features include:

`talawa` is based on the original `quito` code created by the [Palisadoes Foundation](http://www.palisadoes.org) as part of its annual Calico Challenge program. Calico provides paid summer internships for Jamaican university students to work on selected open source projects. They are mentored by software professionals and receive stipends based on the completion of predefined milestones. Calico was started in 2015. Visit [The Palisadoes Foundation's website](http://www.palisadoes.org/) for more details on its origin and activities.

## Table of Contents
## Table of Contents

<!-- toc -->

Expand Down
139 changes: 139 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsdoc from "eslint-plugin-tsdoc";
import _import from "eslint-plugin-import";
import { fixupPluginRules } from "@eslint/compat";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import parser from "@graphql-eslint/eslint-plugin";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import graphqlEslint from "@graphql-eslint/eslint-plugin";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname
});

export default [{
ignores: [
"**/.github",
"**/.vscode",
"**/build",
"**/coverage",
"**/node_modules",
"src/types",
"docs/Schema.md",
],
}, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"), {
plugins: {
"@typescript-eslint": typescriptEslint,
tsdoc,
"import": fixupPluginRules(_import),
},

languageOptions: {
env: {
node: true,
},
parser: tsParser,
}
,

rules: {
"no-restricted-imports": ["error", {
patterns: ["**/src/**"],
}],

"import/no-duplicates": "error",
"tsdoc/syntax": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-var-requires": "error",
},
}, {
files: ["**/*.ts"],

languageOptions: {
parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",

parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: ".",
},
},

rules: {
"@typescript-eslint/array-type": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-function-return-type": "error",

"@typescript-eslint/naming-convention": ["error", {
selector: "interface",
format: ["PascalCase"],
prefix: ["Interface", "TestInterface"],
}, {
selector: ["typeAlias", "typeLike", "enum"],
format: ["PascalCase"],
}, {
selector: "typeParameter",
format: ["PascalCase"],
prefix: ["T"],
}, {
selector: "variable",
format: ["camelCase", "UPPER_CASE"],
leadingUnderscore: "allow",
}, {
selector: "parameter",
format: ["camelCase"],
leadingUnderscore: "allow",
}, {
selector: "function",
format: ["camelCase"],
}, {
selector: "memberLike",
modifiers: ["private"],
format: ["camelCase"],
leadingUnderscore: "require",
}, {
selector: "variable",
modifiers: ["exported"],
format: null,
}],
},
}, {
files: ["./src/typeDefs/**/*.ts"],
processor: "@graphql-eslint/graphql",
}, {
files: ["./src/typeDefs/**/*.graphql"],

plugins: {
"@graphql-eslint": graphqlEslint,
},

languageOptions: {
parser: parser,
},
}, {
files: ["tests/**/*"],

rules: {
"no-restricted-imports": "off",
},
}, {
files: ["./src/index.ts", "./src/utilities/copyToClipboard.ts"],

rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-function": "off",
},
}];
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"invalid.fileType": "Invalid file type",
"invalid.refreshToken": "Invalid refresh token",
"invalid.credentials": "Invalid credentials",
"invalid.timeoutRange": "Invalid timeout range",
"registrant.alreadyExist": "Already registered for the event",
"member.notFound": "Member not found",
"registrant.alreadyUnregistered": "Already unregistered for the event",
Expand Down
1 change: 1 addition & 0 deletions locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"invalid.fileType": "Type de fichier non valide",
"invalid.refreshToken": "Jeton d'actualisation non valide",
"invalid.credentials": "Informations d'identification non valides",
"invalid.timeoutRange": "Plage de temps d'attente non valide",
"registrant.alreadyExist": "Déjà inscrit à l'événement",
"member.notFound": "Membre introuvable",
"registrant.alreadyUnregistered": "Déjà non inscrit à l'événement",
Expand Down
1 change: 1 addition & 0 deletions locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"invalid.fileType": "अमान्य फ़ाइल प्रकार",
"invalid.refreshToken": "अमान्य रीफ़्रेश टोकन",
"invalid.credentials": "अवैध प्रत्यय पत्र",
"invalid.timeoutRange": "अमान्य टाइमआउट रेंज",
"registrant.alreadyExist": "घटना के लिए पहले से पंजीकृत",
"member.notFound": "सदस्य अनुपस्थित",
"registrant.alreadyUnregistered": "घटना के लिए पहले से ही अपंजीकृत",
Expand Down
1 change: 1 addition & 0 deletions locales/sp.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"invalid.fileType": "Tipo de archivo no válido",
"invalid.refreshToken": "Token de actualización no válido",
"invalid.credentials": "Credenciales no válidas",
"invalid.timeoutRange": "Rango de tiempo de espera no válido",
"registrant.alreadyExist": "Ya inscrito para el evento",
"member.notFound": "Miembro no encontrado",
"registrant.alreadyUnregistered": "Ya no está registrado para el evento",
Expand Down
1 change: 1 addition & 0 deletions locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"invalid.fileType": "無效的文件類型",
"invalid.refreshToken": "無效的刷新令牌",
"invalid.credentials": "無效的憑據",
"invalid.timeoutRange": "无效的超时范围",
"registrant.alreadyExist": "已经报名参加活动",
"member.notFound": "未找到成员",
"registrant.alreadyUnregistered": "已取消注册该活动",
Expand Down
Loading

0 comments on commit 3ff511c

Please sign in to comment.