-
-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor/test jest to vitest 2486 #2689
Refactor/test jest to vitest 2486 #2689
Conversation
…dation#1966) Bumps [sanitize-html](https://github.com/apostrophecms/sanitize-html) from 2.12.1 to 2.13.0. - [Changelog](https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md) - [Commits](apostrophecms/sanitize-html@2.12.1...2.13.0) --- updated-dependencies: - dependency-name: sanitize-html dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ion#1965) Bumps [graphql-ws](https://github.com/enisdenjo/graphql-ws) from 5.14.0 to 5.16.0. - [Release notes](https://github.com/enisdenjo/graphql-ws/releases) - [Changelog](https://github.com/enisdenjo/graphql-ws/blob/master/CHANGELOG.md) - [Commits](enisdenjo/graphql-ws@v5.14.0...v5.16.0) --- updated-dependencies: - dependency-name: graphql-ws dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…on#1972) * Fix routing issue for EventManagement * Update tests * Remove unnecessary change in INSTALLATION.md * Remove changes
* fix Requests to Membership Requests * Update Requests tests --------- Co-authored-by: Vamshi Maskuri <[email protected]>
…n#1896) * Removed `jest-enzyme` package * Adding check for * Added CommunityProfile page * Added tests for CommunityProfile page * Fixed formatting errors * Format fix * Merge branch 'develop' of https://github.com/git-init-priyanshu/talawa-admin-clone into priyanshu * Fixed merge conflicts * Format fix * Fix typecheck error * Added language support * Lint error fix * Integrated APIs * Revert changes * Fixed Failing Test * FIxed failing test * Fixed LoginPage failing tests * Full code coverage * Redesigned the Donations page * Added Tests * Fixed formatting errors * 100% code coverage for OrgListCard.tsx * Redesign of Post screen * View Post * Changed start post UI * Added Tests * Fixed failing tests * Added Edit Post & Delete Post Functionality * 100% code coverage
…ion#1981) Bumps [react-icons](https://github.com/react-icons/react-icons) from 4.12.0 to 5.2.1. - [Release notes](https://github.com/react-icons/react-icons/releases) - [Commits](react-icons/react-icons@v4.12.0...v5.2.1) --- updated-dependencies: - dependency-name: react-icons dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…oesFoundation#1982) Bumps [@mui/x-charts](https://github.com/mui/mui-x/tree/HEAD/packages/x-charts) from 6.0.0-alpha.13 to 7.4.0. - [Release notes](https://github.com/mui/mui-x/releases) - [Changelog](https://github.com/mui/mui-x/blob/master/CHANGELOG.md) - [Commits](https://github.com/mui/mui-x/commits/v7.4.0/packages/x-charts) --- updated-dependencies: - dependency-name: "@mui/x-charts" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ation#1983) Bumps [@dicebear/core](https://github.com/dicebear/dicebear) from 7.0.4 to 7.1.2. - [Release notes](https://github.com/dicebear/dicebear/releases) - [Changelog](https://github.com/dicebear/dicebear/blob/8.x/CHANGELOG.md) - [Commits](dicebear/dicebear@v7.0.4...v7.1.2) --- updated-dependencies: - dependency-name: "@dicebear/core" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#1984) Bumps [graphql](https://github.com/graphql/graphql-js) from 15.8.0 to 16.8.1. - [Release notes](https://github.com/graphql/graphql-js/releases) - [Commits](graphql/graphql-js@v15.8.0...v16.8.1) --- updated-dependencies: - dependency-name: graphql dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…Foundation#1985) Bumps [@emotion/styled](https://github.com/emotion-js/emotion) from 11.11.0 to 11.11.5. - [Release notes](https://github.com/emotion-js/emotion/releases) - [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md) - [Commits](https://github.com/emotion-js/emotion/compare/@emotion/[email protected]...@emotion/[email protected]) --- updated-dependencies: - dependency-name: "@emotion/styled" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…adoesFoundation#1994) Bumps [typedoc-plugin-markdown](https://github.com/typedoc2md/typedoc-plugin-markdown/tree/HEAD/packages/typedoc-plugin-markdown) from 3.17.1 to 4.0.2. - [Release notes](https://github.com/typedoc2md/typedoc-plugin-markdown/releases) - [Changelog](https://github.com/typedoc2md/typedoc-plugin-markdown/blob/main/packages/typedoc-plugin-markdown/CHANGELOG.md) - [Commits](https://github.com/typedoc2md/typedoc-plugin-markdown/commits/[email protected]/packages/typedoc-plugin-markdown) --- updated-dependencies: - dependency-name: typedoc-plugin-markdown dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…Foundation#1996) Bumps [@dicebear/core](https://github.com/dicebear/dicebear) and [@dicebear/collection](https://github.com/dicebear/dicebear). These dependencies needed to be updated together. Updates `@dicebear/core` from 7.1.2 to 8.0.1 - [Release notes](https://github.com/dicebear/dicebear/releases) - [Changelog](https://github.com/dicebear/dicebear/blob/8.x/CHANGELOG.md) - [Commits](dicebear/dicebear@v7.1.2...v8.0.1) Updates `@dicebear/collection` from 7.1.2 to 8.0.1 - [Release notes](https://github.com/dicebear/dicebear/releases) - [Changelog](https://github.com/dicebear/dicebear/blob/8.x/CHANGELOG.md) - [Commits](dicebear/dicebear@v7.1.2...v8.0.1) --- updated-dependencies: - dependency-name: "@dicebear/core" dependency-type: direct:production update-type: version-update:semver-major - dependency-name: "@dicebear/collection" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…Foundation#2002) * folder restructure * namespace added * fix for 'register' common * feat: Update screens to use tCommon for localization * feat: Update screens to use tCommon for localization * feat: Update screens to use tCommon for localization * feat: Update screens to use tCommon for localization - yes no * feat: Update screens to use tCommon for localization - saveChanges * feat: Update screens to use tCommon for localization - email, name, pass * feat: Update screens to use tCommon for localization * remove pass * Update localization for first name and last name fields * tCommon fixes * Update localization * Update UsersTableItem component to remove unnecessary code and improve performance * Update common.json with startTime and endTime translations * Update localization for name field in screens * Update localization for enterLocation field * translations in test * chore: Update OrgPostCard.test.tsx with language detector mock * error translation fix * Refactor UsersTableItem component to optimize performance and remove unnecessary code * Update common.json with startTime and endTime translations * Update error translations in French, Hindi, Spanish, and Chinese locales * fix variable * fix tests usertableitem
…oundation#2010) Bumps [@mui/x-data-grid](https://github.com/mui/mui-x/tree/HEAD/packages/grid/x-data-grid) from 6.10.0 to 6.20.0. - [Release notes](https://github.com/mui/mui-x/releases) - [Changelog](https://github.com/mui/mui-x/blob/v6.20.0/CHANGELOG.md) - [Commits](https://github.com/mui/mui-x/commits/v6.20.0/packages/grid/x-data-grid) --- updated-dependencies: - dependency-name: "@mui/x-data-grid" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…2011) Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.11.9 to 1.11.11. - [Release notes](https://github.com/iamkun/dayjs/releases) - [Changelog](https://github.com/iamkun/dayjs/blob/dev/CHANGELOG.md) - [Commits](iamkun/dayjs@v1.11.9...v1.11.11) --- updated-dependencies: - dependency-name: dayjs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ndation#2013) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.7 to 20.12.12. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: Update common translations for multiple locales * chore: Update CollapsibleDropdown component with Redux and i18next providers
PalisadoesFoundation#2021) * add translations * feat: Add "viewProfile" translation for common.json * feat: Add i18n support for ProfileDropdown component
…oundation#2022) Bumps [@emotion/react](https://github.com/emotion-js/emotion) from 11.11.1 to 11.11.4. - [Release notes](https://github.com/emotion-js/emotion/releases) - [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md) - [Commits](https://github.com/emotion-js/emotion/compare/@emotion/[email protected]...@emotion/[email protected]) --- updated-dependencies: - dependency-name: "@emotion/react" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…sFoundation#2023) Bumps [@mui/x-date-pickers](https://github.com/mui/mui-x/tree/HEAD/packages/x-date-pickers) from 6.10.0 to 7.6.1. - [Release notes](https://github.com/mui/mui-x/releases) - [Changelog](https://github.com/mui/mui-x/blob/master/CHANGELOG.md) - [Commits](https://github.com/mui/mui-x/commits/v7.6.1/packages/x-date-pickers) --- updated-dependencies: - dependency-name: "@mui/x-date-pickers" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…undation#2025) Bumps [@mui/material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-material) from 5.15.15 to 5.15.19. - [Release notes](https://github.com/mui/material-ui/releases) - [Changelog](https://github.com/mui/material-ui/blob/v5.15.19/CHANGELOG.md) - [Commits](https://github.com/mui/material-ui/commits/v5.15.19/packages/mui-material) --- updated-dependencies: - dependency-name: "@mui/material" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [sass](https://github.com/sass/dart-sass) from 1.71.1 to 1.77.4. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](sass/dart-sass@1.71.1...1.77.4) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* OrgPeople screen translations * venues screen fix * Action Itme screen fix * Action Itme screen fix * . * fix screens * chore: Update EditCustomFieldDropDown test to use i18nForTest provider
…doesFoundation#2036) Bumps [typedoc-plugin-markdown](https://github.com/typedoc2md/typedoc-plugin-markdown/tree/HEAD/packages/typedoc-plugin-markdown) from 4.0.2 to 4.0.3. - [Release notes](https://github.com/typedoc2md/typedoc-plugin-markdown/releases) - [Changelog](https://github.com/typedoc2md/typedoc-plugin-markdown/blob/main/packages/typedoc-plugin-markdown/CHANGELOG.md) - [Commits](https://github.com/typedoc2md/typedoc-plugin-markdown/commits/[email protected]/packages/typedoc-plugin-markdown) --- updated-dependencies: - dependency-name: typedoc-plugin-markdown dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…oundation#2033) Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.22.2 to 6.23.1. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/[email protected]/packages/react-router-dom) --- updated-dependencies: - dependency-name: react-router-dom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…sFoundation#2034) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 25.7.0 to 28.6.0. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](jest-community/eslint-plugin-jest@v25.7.0...v28.6.0) --- updated-dependencies: - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump sass from 1.80.6 to 1.80.7 (PalisadoesFoundation#2433) Bumps [sass](https://github.com/sass/dart-sass) from 1.80.6 to 1.80.7. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](sass/dart-sass@1.80.6...1.80.7) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump eslint-plugin-import from 2.30.0 to 2.31.0 (PalisadoesFoundation#2434) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.30.0 to 2.31.0. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](import-js/eslint-plugin-import@v2.30.0...v2.31.0) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump @mui/x-charts from 7.22.1 to 7.22.2 (PalisadoesFoundation#2435) Bumps [@mui/x-charts](https://github.com/mui/mui-x/tree/HEAD/packages/x-charts) from 7.22.1 to 7.22.2. - [Release notes](https://github.com/mui/mui-x/releases) - [Changelog](https://github.com/mui/mui-x/blob/v7.22.2/CHANGELOG.md) - [Commits](https://github.com/mui/mui-x/commits/v7.22.2/packages/x-charts) --- updated-dependencies: - dependency-name: "@mui/x-charts" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump @types/react from 18.3.3 to 18.3.12 (PalisadoesFoundation#2436) Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.12. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update pull-request.yml * css for color blinds * fix * lint fix * lint fix * fix failing test * fix * fix * fix * fix * fix * fix * fix * lock file changes * fix type * fix type * Update tagTemplate.ts * Update tagTemplate.ts * Update tagTemplate.ts * Update tagTemplate.ts * Update tagTemplate.ts * Update tagTemplate.ts * Update TableRow.tsx * Update tsconfig.json --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Peter Harrison <[email protected]>
* reverting workflow changes * changes 1 * identation fix
….tsx from Jest to Vitest (PalisadoesFoundation#2482) * Migrated to vitest * Added ts-doc comment --------- Co-authored-by: Vamshi Maskuri <[email protected]>
* advertisement and plugin screen * added revamped design * fixes added * fixed testcases * chore(deps): bump sass from 1.80.6 to 1.80.7 (PalisadoesFoundation#2433) Bumps [sass](https://github.com/sass/dart-sass) from 1.80.6 to 1.80.7. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](sass/dart-sass@1.80.6...1.80.7) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump eslint-plugin-import from 2.30.0 to 2.31.0 (PalisadoesFoundation#2434) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.30.0 to 2.31.0. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](import-js/eslint-plugin-import@v2.30.0...v2.31.0) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump @mui/x-charts from 7.22.1 to 7.22.2 (PalisadoesFoundation#2435) Bumps [@mui/x-charts](https://github.com/mui/mui-x/tree/HEAD/packages/x-charts) from 7.22.1 to 7.22.2. - [Release notes](https://github.com/mui/mui-x/releases) - [Changelog](https://github.com/mui/mui-x/blob/v7.22.2/CHANGELOG.md) - [Commits](https://github.com/mui/mui-x/commits/v7.22.2/packages/x-charts) --- updated-dependencies: - dependency-name: "@mui/x-charts" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump @types/react from 18.3.3 to 18.3.12 (PalisadoesFoundation#2436) Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.12. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update pull-request.yml * Update dependabot.yaml * added docker check to workflow (PalisadoesFoundation#2414) * added docker check to workflow * made recommended changes to docker check in workflow * added changes to docker check inn workflow as recommended * added changes * updated indentation in pull-request.yml file * updated indentation in pull-request.yml file * added Dockerfile and Docker-compose.yml file * added Dockerfile and Docker-compose.yml file * updated .docker-ignore file * added recommended changes by code rabbit * added recommended changes by code rabbit * added recommended changes by code rabbit * added recommended changes by code rabbit * added recommended changes by code rabbit * added recommended changes by code rabbit * properly formatted code * trying to make docker check pass * trying to make docker check pass * updated INSTALLATION.md * updated INSTALLATION.md * added recommended changes to INSTALLATION.md * added recommended changes to INSTALLATION.md * added recommended changes to INSTALLATION.md * updated docker workflow * updated INSTALLATION.md * eslint-rule-no_unused_vars (PalisadoesFoundation#2428) * Updated pr template with checklist (PalisadoesFoundation#2454) * Updated pr template with checklist * Additional changes for the PR template * Changed the url for the PR template * refactored addOnStore * refactored addOnEntry v1 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Peter Harrison <[email protected]> Co-authored-by: Vanshika Sabharwal <[email protected]> Co-authored-by: prayansh_chhablani <[email protected]> Co-authored-by: Dhiraj Udhani <[email protected]>
…ndation#2523) (PalisadoesFoundation#2610) * refactored: CSS files in src/screens/OrgSettings(fixes: PalisadoesFoundation#2523) * refactored: CSS files in src/screens/OrgSettings(fixes: PalisadoesFoundation#2523) * refactored: CSS files in src/screens/OrgSettings(fixes: PalisadoesFoundation#2523) * refactored: CSS files in src/screens/OrgSettings(fixes: PalisadoesFoundation#2523)
…sFoundation#2641) * Refactor: jest to vitest : Fixes PalisadoesFoundation#2547 * Refactor: jest to vitest : Fixes PalisadoesFoundation#2547 * updated src/screens/EventVolunteers/Requests.spec.tsx --------- Co-authored-by: bandhan-majumder <[email protected]> Co-authored-by: Bandhan Majumder <[email protected]>
…t to Vitest (PalisadoesFoundation#2636) Co-authored-by: im-vedant <[email protected]>
…isadoesFoundation#2640) * Refactored: src/screens/UserPortal/Campaigns from Jest to Vitest * Refactored: src/screens/UserPortal/Campaigns from Jest to Vitest * Refactored: src/screens/UserPortal/Campaigns from Jest to Vitest
…doesFoundation#2567) (PalisadoesFoundation#2625) * refactored: src/screens/OrgSettings from Jest to Vitest(fixes: PalisadoesFoundation#2567) * refactored: src/screens/OrgSettings from Jest to Vitest(fixes: PalisadoesFoundation#2567) * refactored: src/screens/OrgSettings from Jest to Vitest(fixes: PalisadoesFoundation#2567) * refactored: src/screens/OrgSettings from Jest to Vitest(fixes: PalisadoesFoundation#2567) * refactored: src/screens/OrgSettings from Jest to Vitest(fixes: PalisadoesFoundation#2567) * refactored: src/screens/OrgSettings from Jest to Vitest(fixes: PalisadoesFoundation#2567) * refactored: src/screens/OrgSettings from Jest to Vitest(fixes: PalisadoesFoundation#2567) * updated check-tsdoc to ignore .spec.tsx
* refactor:request screen to vitest * refactor:vitest to Requests Screen * implement codreabbit suggestions
* refactor: Users-css * Update Users.tsx * Update app.module.css * Updated app.module.css * Fixed formatting isuess * Fixed formatting isuess * fixed issues * Fix linting issues
PalisadoesFoundation#2593) * refactored OrganizationDashboard css/ closes PalisadoesFoundation#2513 * refactor:OrganizationDashboard_css(fixes PalisadoesFoundation#2513) * Plugin and advertisement screen revamp (PalisadoesFoundation#2006) * advertisement and plugin screen * added revamped design * fixes added * fixed testcases * chore(deps): bump sass from 1.80.6 to 1.80.7 (PalisadoesFoundation#2433) Bumps [sass](https://github.com/sass/dart-sass) from 1.80.6 to 1.80.7. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](sass/dart-sass@1.80.6...1.80.7) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump eslint-plugin-import from 2.30.0 to 2.31.0 (PalisadoesFoundation#2434) Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.30.0 to 2.31.0. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](import-js/eslint-plugin-import@v2.30.0...v2.31.0) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump @mui/x-charts from 7.22.1 to 7.22.2 (PalisadoesFoundation#2435) Bumps [@mui/x-charts](https://github.com/mui/mui-x/tree/HEAD/packages/x-charts) from 7.22.1 to 7.22.2. - [Release notes](https://github.com/mui/mui-x/releases) - [Changelog](https://github.com/mui/mui-x/blob/v7.22.2/CHANGELOG.md) - [Commits](https://github.com/mui/mui-x/commits/v7.22.2/packages/x-charts) --- updated-dependencies: - dependency-name: "@mui/x-charts" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump @types/react from 18.3.3 to 18.3.12 (PalisadoesFoundation#2436) Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.3 to 18.3.12. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update pull-request.yml * Update dependabot.yaml * added docker check to workflow (PalisadoesFoundation#2414) * added docker check to workflow * made recommended changes to docker check in workflow * added changes to docker check inn workflow as recommended * added changes * updated indentation in pull-request.yml file * updated indentation in pull-request.yml file * added Dockerfile and Docker-compose.yml file * added Dockerfile and Docker-compose.yml file * updated .docker-ignore file * added recommended changes by code rabbit * added recommended changes by code rabbit * added recommended changes by code rabbit * added recommended changes by code rabbit * added recommended changes by code rabbit * added recommended changes by code rabbit * properly formatted code * trying to make docker check pass * trying to make docker check pass * updated INSTALLATION.md * updated INSTALLATION.md * added recommended changes to INSTALLATION.md * added recommended changes to INSTALLATION.md * added recommended changes to INSTALLATION.md * updated docker workflow * updated INSTALLATION.md * eslint-rule-no_unused_vars (PalisadoesFoundation#2428) * Updated pr template with checklist (PalisadoesFoundation#2454) * Updated pr template with checklist * Additional changes for the PR template * Changed the url for the PR template * refactored addOnStore * refactored addOnEntry v1 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Peter Harrison <[email protected]> Co-authored-by: Vanshika Sabharwal <[email protected]> Co-authored-by: prayansh_chhablani <[email protected]> Co-authored-by: Dhiraj Udhani <[email protected]> * refactored: CSS files in src/screens/OrgSettings(fixes: PalisadoesFoundation#2523) (PalisadoesFoundation#2610) * refactored: CSS files in src/screens/OrgSettings(fixes: PalisadoesFoundation#2523) * refactored: CSS files in src/screens/OrgSettings(fixes: PalisadoesFoundation#2523) * refactored: CSS files in src/screens/OrgSettings(fixes: PalisadoesFoundation#2523) * refactored: CSS files in src/screens/OrgSettings(fixes: PalisadoesFoundation#2523) * Update pull-request.yml * refactored: CSS files in src/screens/OrganizationDashboard(fixes: PalisadoesFoundation#2513) * refactored: CSS files in src/screens/OrganizationDashboard(fixes: PalisadoesFoundation#2513) * improve import for global css --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Shekhar Patel <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Peter Harrison <[email protected]> Co-authored-by: Vanshika Sabharwal <[email protected]> Co-authored-by: prayansh_chhablani <[email protected]> Co-authored-by: Dhiraj Udhani <[email protected]>
…o Vitest (PalisadoesFoundation#2623) * migrated UpcomingEvents tests from Jest to Vitest * Rename UpcomingEvents.test.tsx to UpcomingEvents.spec.tsx * add header comments for UpcomingEvents component tests
WalkthroughThis pull request introduces a comprehensive set of configuration files, workflow updates, and project structure modifications for the Talawa Admin project. The changes span multiple areas including development tooling, testing frameworks, localization, continuous integration, and code quality processes. Key additions include new configuration files like Changes
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant Repo as Repository
participant CI as GitHub Actions
participant CodeRabbit as CodeRabbit AI
participant Vitest as Vitest
participant Codecov as Codecov
Dev->>Repo: Commits code
Repo->>CI: Triggers workflows
CI->>Vitest: Runs tests
Vitest-->>CI: Test results
CI->>Codecov: Uploads coverage
CI->>CodeRabbit: Triggers AI review
CodeRabbit-->>Dev: Provides review comments
Possibly related issues
Possibly related PRs
Suggested reviewersPoem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 30
🔭 Outside diff range comments (1)
.eslintrc.json (1)
Jest configurations and dependencies found while transitioning to Vitest
The codebase still contains significant Jest-related configurations and dependencies that should be removed for a complete transition to Vitest:
- Active Jest configuration files:
jest.config.js
with full test configurationjest-preview.config.ts
for UI testing setup- Multiple Jest-related dependencies in
package.json
:
- Core:
jest
,babel-jest
- Types:
@types/jest
- Testing utilities:
@testing-library/jest-dom
,jest-preview
,jest-localstorage-mock
- ESLint plugin:
eslint-plugin-jest
- The
.eslintrc.json
still includes Jest-specific configurations:
"plugin:jest/recommended"
in extends"jest"
in plugins"jest/expect-expect": 0
in rules🔗 Analysis chain
Line range hint
1-146
: Verify complete removal of Jest referencesTo ensure a complete transition to Vitest, we should verify that all Jest-related configurations and references have been removed from the codebase.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for Jest-related references in the codebase echo "Searching for Jest references in configuration files..." rg -l "jest" --type=json --type=yaml --type=ts --type=tsx echo "Searching for Jest import statements..." ast-grep --pattern 'import $_ from "jest"' echo "Searching for Jest configuration files..." fd -e config.js -e config.ts | grep -i jestLength of output: 517
Script:
#!/bin/bash # Let's check the content of these Jest configuration files echo "=== Content of jest.config.js ===" cat jest.config.js echo -e "\n=== Content of jest-preview.config.ts ===" cat jest-preview.config.ts # Let's also check for Jest-related dependencies in package.json echo -e "\n=== Checking package.json for Jest dependencies ===" cat package.json | grep -i "jest"Length of output: 3351
🧹 Nitpick comments (43)
.github/workflows/compare_translations.py (1)
117-136
: Enhance exception-raising for clearer traceback.
According to static analysis hint (B904), you can link the original exception when raising a new error.Below is a suggested diff to update line 135:
-except json.JSONDecodeError as e: - raise ValueError(f"Error decoding JSON from file {filepath}: {e}") +except json.JSONDecodeError as e: + raise ValueError(f"Error decoding JSON from file {filepath}: {e}") from e🧰 Tools
🪛 Ruff (0.8.2)
135-135: Within an
except
clause, raise exceptions withraise ... from err
orraise ... from None
to distinguish them from errors in exception handling(B904)
schema.graphql (1)
1-1537
: Consider splitting schema into multiple SDL files.
Having a single large schema file can become unwieldy and difficult to maintain. Splitting it into domain-specific modules (e.g., "Event.graphql", "User.graphql") can enhance organization and readability..husky/post-merge (1)
4-4
: Add a newline at the end of file for consistency.
Having a trailing newline in shell scripts is a common best practice that some linters and editors expect.Below is a suggested diff:
#!/bin/sh . "$(dirname "$0")/_/husky.sh" git diff HEAD^ HEAD --exit-code -- ./package.json || npm install +
Dockerfile (1)
1-15
: Optimize Dockerfile using multi-stage buildThe current Dockerfile can be optimized for production using a multi-stage build approach.
Consider this optimization:
-FROM node:20.10.0 AS build +FROM node:20.10.0-alpine AS builder WORKDIR /usr/src/app COPY package*.json ./ RUN npm install +RUN npm run test COPY . . RUN npm run build +FROM node:20.10.0-alpine +WORKDIR /usr/src/app +COPY --from=builder /usr/src/app/dist ./dist +COPY package*.json ./ +RUN npm install --production + EXPOSE 4321 CMD ["npm", "run", "serve"].idea/inspectionProfiles/Project_Default.xml (1)
1-6
: Consider adding test-related inspectionsSince we're transitioning to Vitest, consider adding test-related inspections to help maintain test quality.
Add these inspection tools:
<component name="InspectionProjectProfileManager"> <profile version="1.0"> <option name="myName" value="Project Default" /> <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="JsTestFailedLine" enabled="true" level="WARNING" enabled_by_default="true" /> + <inspection_tool class="ViTestCaseEmpty" enabled="true" level="WARNING" enabled_by_default="true" /> </profile> </component>.github/ISSUE_TEMPLATE/bug-report.md (1)
35-36
: Format URL as a proper markdown linkThe bare URL should be formatted as a proper markdown link for better readability and maintainability.
-Please read this if you are planning to apply for a Palisadoes Foundation internship -- https://github.com/PalisadoesFoundation/talawa/issues/359 +Please read this if you are planning to apply for a Palisadoes Foundation internship: +[Internship Information](https://github.com/PalisadoesFoundation/talawa/issues/359)🧰 Tools
🪛 Markdownlint (0.37.0)
36-36: null
Bare URL used(MD034, no-bare-urls)
.github/workflows/codeql-codescan.yml (1)
31-32
: Fix YAML indentation and trailing spacesThere are inconsistencies in indentation and trailing spaces throughout the file.
- - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - languages: ${{ matrix.language }} + languages: ${{ matrix.language }}Also applies to: 37-37
🧰 Tools
🪛 yamllint (1.35.1)
[warning] 31-31: wrong indentation: expected 6 but found 7
(indentation)
DOCUMENTATION.md (2)
24-25
: Fix grammar and formatting in Docusaurus instructionsThere are several issues in the instructions:
- Grammar error in "should automatically launched"
- Bare URL usage
-1. Launch docusaurus on your system according to the `talawa-docs`documentation. - - A local version of `docs.talawa.io` should automatically launched in your browser at http://localhost:3000/ +1. Launch Docusaurus on your system according to the `talawa-docs` documentation. + - A local version of `docs.talawa.io` should automatically launch in your browser at [http://localhost:3000](http://localhost:3000)🧰 Tools
🪛 LanguageTool
[grammar] ~25-~25: The modal verb ‘should’ requires the verb’s base form.
Context: ...fdocs.talawa.io
should automatically launched in your browser at http://localhost:300...(MD_BASEFORM)
🪛 Markdownlint (0.37.0)
25-25: null
Bare URL used(MD034, no-bare-urls)
23-27
: Enhance Docusaurus setup instructionsThe setup instructions could be more detailed to help users get started quickly.
-1. Install `talawa-docs` on your system -1. Launch docusaurus on your system according to the `talawa-docs`documentation. +1. Clone the `talawa-docs` repository: + ```bash + git clone https://github.com/PalisadoesFoundation/talawa-docs.git + cd talawa-docs + ``` +1. Install dependencies: + ```bash + npm install + ``` +1. Launch Docusaurus development server: + ```bash + npm start + ```🧰 Tools
🪛 LanguageTool
[grammar] ~25-~25: The modal verb ‘should’ requires the verb’s base form.
Context: ...fdocs.talawa.io
should automatically launched in your browser at http://localhost:300...(MD_BASEFORM)
[grammar] ~26-~26: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...ttp://localhost:3000/ 1. Add/modify the markdown documents to thedocs/
directory of t...(MARKDOWN_NNP)
🪛 Markdownlint (0.37.0)
25-25: null
Bare URL used(MD034, no-bare-urls)
.github/workflows/stale.yml (2)
6-6
: Fix formatting issuesRemove trailing spaces from lines 6, 20, and 21 to maintain consistent formatting.
Also applies to: 20-21
🧰 Tools
🪛 yamllint (1.35.1)
[error] 6-6: trailing spaces
(trailing-spaces)
31-34
: Consider customizing stale messages for test-related issuesSince the repository is undergoing a test framework migration, consider adding specific guidance in the stale messages for test-related issues and PRs. This could help contributors understand how to handle test updates during this transition period.
Example addition to stale-pr-message:
- stale-pr-message: 'This pull request did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please verify it has no conflicts with the develop branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.' + stale-pr-message: 'This pull request did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please verify it has no conflicts with the develop branch and rebase if needed. If this PR contains tests, ensure they are updated to use Vitest instead of Jest. Mention it now if you need help or give permission to other people to finish your work.'.github/workflows/check-tsdoc.js (2)
55-59
: Optimize file processing with Promise.allProcess files concurrently to improve performance, especially for large codebases.
- for (const file of files) { - if (!await containsTsDocComment(file)) { - filesWithoutTsDoc.push(file); - } - } + const results = await Promise.all( + files.map(async file => ({ + file, + hasTsDoc: await containsTsDocComment(file) + })) + ); + filesWithoutTsDoc.push(...results + .filter(result => !result.hasTsDoc) + .map(result => result.file) + );
32-34
: Improve error handling with specific error typesConsider providing more detailed error information and handling specific error types differently.
- } catch (err) { - console.error(`Error reading directory ${dir}: ${err.message}`); - } + } catch (err) { + if (err.code === 'ENOENT') { + console.error(`Directory not found: ${dir}`); + } else if (err.code === 'EACCES') { + console.error(`Permission denied accessing directory: ${dir}`); + } else { + console.error(`Error reading directory ${dir}: ${err.message}`); + } + }.github/workflows/push.yml (1)
17-18
: Fix formatting issuesAddress the following formatting issues:
- Remove trailing spaces from lines 17, 18, 21, and 50
- Fix indentation in env section (line 20)
- Remove extra blank line at the end of file
Also applies to: 20-21, 50-50, 62-62
🧰 Tools
🪛 yamllint (1.35.1)
[error] 17-17: trailing spaces
(trailing-spaces)
[error] 18-18: trailing spaces
(trailing-spaces)
.github/workflows/issue.yml (1)
6-6
: Fix YAML formatting issues.There are several formatting issues in the workflow file:
- Line 6: Remove trailing spaces
- Line 15: Fix indentation (should be 4 spaces)
- Line 66: Remove extra blank lines at the end
Also applies to: 15-15, 66-66
🧰 Tools
🪛 yamllint (1.35.1)
[error] 6-6: trailing spaces
(trailing-spaces)
.github/workflows/talawa_admin_md_mdx_format_adjuster.py (2)
55-64
: Consider adding error handling for file operations.The file operations could benefit from proper error handling to manage potential IOError exceptions.
def process_file(filepath): """Process a single Markdown file for MDX compatibility.""" - with open(filepath, 'r', encoding='utf-8') as file: - content = file.read() + try: + with open(filepath, 'r', encoding='utf-8') as file: + content = file.read() + except IOError as e: + print(f"Error reading file {filepath}: {e}") + return # Escape MDX characters new_content = escape_mdx_characters(content) # Write the processed content back to the file only if there is a change if new_content != content: - with open(filepath, 'w', encoding='utf-8') as file: - file.write(new_content) + try: + with open(filepath, 'w', encoding='utf-8') as file: + file.write(new_content) + except IOError as e: + print(f"Error writing file {filepath}: {e}")
90-93
: Consider adding progress feedback for large directories.When processing multiple files, it would be helpful to show progress to the user.
# Process each Markdown file in the directory + processed_count = 0 for root, _, files in os.walk(args.directory): for file in files: if file.lower().endswith(".md"): + print(f"Processing: {os.path.join(root, file)}") process_file(os.path.join(root, file)) + processed_count += 1 + print(f"Completed processing {processed_count} files")ISSUE_GUIDELINES.md (3)
5-5
: Fix grammatical error in the introduction.Change "a issues reports" to "issue reports".
-In order to give everyone a chance to submit a issues reports and contribute to the Talawa project +In order to give everyone a chance to submit issue reports and contribute to the Talawa project🧰 Tools
🪛 LanguageTool
[misspelling] ~5-~5: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...der to give everyone a chance to submit a issues reports and contribute to the Ta...(EN_A_VS_AN)
29-29
: Fix duplicate text in the sentence.The sentence contains repeated text and a typo.
-Your issue may have already been created. Search for duplicate open issues before submitting yours.for similar deficiencies in the code.duplicate issues are created. +Your issue may have already been created. Search for duplicate open issues before submitting yours to avoid similar deficiencies in the code.
44-44
: Capitalize "Slack" as it's a proper noun.The word "slack" should be capitalized when referring to the communication platform.
-Ask our contributors to assign it to you in `#talawa` slack channel. +Ask our contributors to assign it to you in `#talawa` Slack channel. -Join our `#talawa-github` slack channel for automatic issue and pull request updates. +Join our `#talawa-github` Slack channel for automatic issue and pull request updates. -Discuss issues in our various slack channels when necessary +Discuss issues in our various Slack channels when necessaryAlso applies to: 53-53, 57-57
🧰 Tools
🪛 LanguageTool
[grammar] ~44-~44: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...butors to assign it to you in#talawa
slack channel. Working on these types of exi...(ON_SKYPE)
README.md (2)
53-53
: Fix heading formatting.Remove extra space after the hash symbol.
-# Videos +# Videos🧰 Tools
🪛 Markdownlint (0.37.0)
53-53: null
Multiple spaces after hash on atx style heading(MD019, no-multiple-space-atx)
56-56
: Add hyphen to compound adjective.The term "open source" should be hyphenated when used as a compound adjective.
-The "Getting Started - Developers" videos are extremely helpful for new open source contributors. +The "Getting Started - Developers" videos are extremely helpful for new open-source contributors.🧰 Tools
🪛 LanguageTool
[uncategorized] ~56-~56: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...)" videos are extremely helpful for new open source contributors.(EN_COMPOUND_ADJECTIVE_INTERNAL)
.github/workflows/pull-request-target.yml (1)
6-6
: Fix trailing whitespace in YAML fileThere are multiple instances of trailing whitespace in the file. While this doesn't affect functionality, it's flagged by the linter.
Apply this diff to remove trailing spaces:
- name: PR Target Workflow + name: PR Target Workflow(Apply similar fixes to other lines with trailing spaces)
Also applies to: 13-13, 15-15, 27-27, 28-28, 29-29, 33-33, 35-35, 40-40, 45-45, 70-70
🧰 Tools
🪛 yamllint (1.35.1)
[error] 6-6: trailing spaces
(trailing-spaces)
.github/workflows/eslint_disable_check.py (1)
61-61
: Fix unused loop variableThe
dirs
variable in theos.walk
loop is unused.- for root, dirs, files in os.walk(os.path.join(directory, 'src')): + for root, _dirs, files in os.walk(os.path.join(directory, 'src')):🧰 Tools
🪛 Ruff (0.8.2)
61-61: Loop control variable
dirs
not used within loop bodyRename unused
dirs
to_dirs
(B007)
.eslintrc.json (1)
13-15
: Verify necessity of multiple Prettier configurationsThe configuration includes multiple Prettier-related extends:
"plugin:prettier/recommended"
"eslint-config-prettier"
"prettier"
This might lead to redundancy.
Consider keeping only
"plugin:prettier/recommended"
as it already sets up Prettier and ESLint integration.PR_GUIDELINES.md (3)
31-34
: Add language specifiers to code blocksThe code blocks should specify the language for better syntax highlighting and documentation clarity.
-``` +```bash npm run lint:fix npm run format:fix-
+
bash
npm run lint:check
npm run format:checkAlso applies to: 39-42
🧰 Tools
🪛 Markdownlint (0.37.0)
31-31: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
46-47
: Consider rephrasing the test requirementsThe current wording about manual testing could be clearer. Consider restructuring to emphasize the importance of automated testing while acknowledging exceptions.
-1. All pull requests must have test units. If, for some reason, it is not possible to add tests, please let us know and explain why. In that case, you'll need to tell us what steps you followed to manually test your changes. +1. All pull requests must include unit tests. In cases where automated testing is not feasible: + - Provide a detailed explanation of why testing cannot be implemented + - Document the manual testing steps you performed to validate the changes🧰 Tools
🪛 LanguageTool
[style] ~46-~46: Style-wise, it’s not ideal to insert an adverb (‘manually’) in the middle of an infinitive construction (‘to test’). Try moving the adverb to avoid split infinitives.
Context: ..., you'll need to tell us what steps you followed to manually test your changes. 1. Please read our [CONTRIBUTING.md](C...(SPLIT_INFINITIVE)
54-56
: Improve clarity of PR submission rulesThe rules about draft PRs and reviewers could be more explicit about the rationale.
-1. Only submit PRs against our `develop` branch. The default is `main`, so you will have to modify this before submitting your PR for review. PRs made against `main` will be closed. -1. We do not accept draft Pull Requests. They will be closed if submitted. We focus on work that is ready for immediate review. -1. Removing assigned reviewers from your Pull Request will cause it to be closed. The quality of our code is very important to us. Therefore we make experienced maintainers of our code base review your code. Removing these assigned persons is not in the best interest of this goal. +1. Pull Request Branch Requirements: + - Submit PRs only against the `develop` branch + - PRs targeting the `main` branch will be automatically closed + - You must manually change the target from `main` to `develop` before submission + +2. Pull Request State: + - Submit only complete, ready-for-review PRs + - Draft PRs will be closed as we prioritize immediate review of completed work + +3. Code Review Process: + - Experienced maintainers are assigned to ensure code quality + - Removing assigned reviewers will result in PR closure + - This policy ensures thorough code review and maintains high standards🧰 Tools
🪛 LanguageTool
[style] ~56-~56: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...o be closed. The quality of our code is very important to us. Therefore we make experienced ma...(EN_WEAK_ADJECTIVE)
[uncategorized] ~56-~56: A comma may be missing after the conjunctive/linking adverb ‘Therefore’.
Context: ...ty of our code is very important to us. Therefore we make experienced maintainers of our ...(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
CODE_STYLE.md (2)
58-69
: Add language specifiers to code blocks.For better readability and syntax highlighting, specify the language for code blocks.
-``` +```jsx <div className="myCustomClass">...</div><details> <summary>🧰 Tools</summary> <details> <summary>🪛 Markdownlint (0.37.0)</summary> 58-58: null Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 65-65: null Fenced code blocks should have a language specified (MD040, fenced-code-language) </details> </details> --- `78-115`: **Enhance React-Bootstrap example clarity.** The example is good but could be improved: 1. Add language specifiers to code blocks 2. Make the example more concise ```diff -``` +```jsx // ❌ Wrong way <div class="dropdown"> <button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown"> Dropdown button </button> <ul class="dropdown-menu"> <li><a class="dropdown-item" href="#">Action</a></li> </ul> </div> // ✅ Correct way import { Dropdown } from 'react-bootstrap'; const BasicExample = () => ( <Dropdown> <Dropdown.Toggle variant="success" id="dropdown-basic"> Dropdown Button </Dropdown.Toggle> <Dropdown.Menu> <Dropdown.Item href="#/action-1">Action</Dropdown.Item> </Dropdown.Menu> </Dropdown> );
🧰 Tools
🪛 Markdownlint (0.37.0)
92-92: null
Emphasis used instead of a heading(MD036, no-emphasis-as-heading)
78-78: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
95-95: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
.github/workflows/pull-request.yml (1)
203-215
: Consolidate test runners during migration.Since we're migrating from Jest to Vitest, consider:
- Having a migration plan to gradually move tests
- Adding comments to indicate which parts are temporary during migration
- Setting up proper test coverage thresholds for both runners during transition
INSTALLATION.md (3)
126-128
: Add language specifiers to code blocksSeveral code blocks are missing language specifiers. This affects syntax highlighting and readability.
Add appropriate language specifiers to the code blocks. For example:
-``` +```bash npm installAlso applies to: 184-184, 210-210, 218-218, 226-226, 236-236, 244-244, 252-252, 274-274, 292-292, 302-302, 310-310, 334-334, 345-345, 359-359
🧰 Tools
🪛 Markdownlint (0.37.0)
126-126: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
51-51
: Fix "setup" vs "set up" usageThe word "setup" is a noun, while "set up" is the verb form.
Apply these corrections:
-where you want to setup the repository +where you want to set up the repository -commands to setup your node environment +commands to set up your node environmentAlso applies to: 107-107
🧰 Tools
🪛 LanguageTool
[grammar] ~51-~51: The word “setup” is a noun. The verb is spelled with a space.
Context: ...avigate to the folder where you want to setup the repository. 2. Open acmd
(Window...(NOUN_VERB_CONFUSION)
150-152
: Fix inconsistent code block formatting in Docker setupThe Docker commands have inconsistent formatting with extra backticks.
Apply this correction:
-````bash +```bash docker build -t talawa-admin . -```bashAlso applies to: 159-160
.github/ISSUE_TEMPLATE/feature-request.md (1)
27-28
: Format URL as markdown linkThe bare URL should be formatted as a markdown link for better readability.
-Please read this if you are planning to apply for a Palisadoes Foundation internship -https://github.com/PalisadoesFoundation/talawa/issues/359 +Please read this if you are planning to apply for a Palisadoes Foundation internship: +[Internship Information](https://github.com/PalisadoesFoundation/talawa/issues/359)🧰 Tools
🪛 Markdownlint (0.37.0)
28-28: null
Bare URL used(MD034, no-bare-urls)
.github/workflows/README.md (2)
24-24
: Fix duplicate word "to"There's a duplicate word in the sentence.
-Place all actions related to to this in the `pull-request-target.yml` file. +Place all actions related to this in the `pull-request-target.yml` file.🧰 Tools
🪛 LanguageTool
[duplication] ~24-~24: Possible typo: you repeated a word
Context: ...ors: 1. Place all actions related to to this in thepull-request-target.yml
f...(ENGLISH_WORD_REPEAT_RULE)
35-35
: Fix abbreviation formatThe abbreviation "eg." should be "e.g." with periods.
-Jobs only work correctly if they have a dedicated file (eg. `CodeQL`) +Jobs only work correctly if they have a dedicated file (e.g., `CodeQL`)🧰 Tools
🪛 LanguageTool
[uncategorized] ~35-~35: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...orrectly if they have a dedicated file (eg.CodeQL
) ## Scripts Follow these gui...(E_G)
public/locales/en/errors.json (1)
2-2
: Fix text formatting inconsistenciesThere are several formatting issues in the English error messages:
- Remove the period after exclamation mark in
talawaApiUnavailable
- Fix capitalization in
notAuthorised
("Authorised" -> "authorized" for US English)- Fix typo in
errorLoading
("occured" -> "occurred")- "talawaApiUnavailable": "Talawa-API service is unavailable!. Is it running? Check your network connectivity too.", + "talawaApiUnavailable": "Talawa-API service is unavailable! Is it running? Check your network connectivity too.", - "notAuthorised": "Sorry! you are not Authorised!", + "notAuthorised": "Sorry! You are not authorized!", - "errorLoading": "Error occured while loading {{entity}} data", + "errorLoading": "Error occurred while loading {{entity}} data",Also applies to: 5-5, 10-10
public/locales/hi/errors.json (1)
2-2
: Remove trailing spaces in Hindi translationsThere are unnecessary trailing spaces in several messages:
talawaApiUnavailable
notAuthorised
notFoundMsg
- "talawaApiUnavailable": "तलवा-एपीआई सेवा उपलब्ध नहीं है! ", + "talawaApiUnavailable": "तलवा-एपीआई सेवा उपलब्ध नहीं है!", - "notAuthorised": "क्षमा मांगना! ", + "notAuthorised": "क्षमा मांगना!", - "notFoundMsg": "उफ़! ", + "notFoundMsg": "उफ़!",Also applies to: 5-5, 8-8
.github/workflows/countline.py (4)
1-26
: Enhance documentation with usage examples and return codes.The documentation is well-structured but could be more helpful by including:
- Example CLI usage with common scenarios
- Description of exit codes (0 for success, 1 for violations)
"""Script to encourage more efficient coding practices. Methodology: Analyses the `lib` and `test` directories to find files that exceed a pre-defined number of lines of code. This script was created to help improve code quality by encouraging contributors to create reusable code. NOTE: This script complies with our python3 coding and documentation standards and should be used as a reference guide. It complies with: 1) Pylint 2) Pydocstyle 3) Pycodestyle 4) Flake8 Run these commands from the CLI to ensure the code is compliant for all your pull requests. +USAGE: + # Check files with default 300 lines limit + python3 countline.py + + # Check files with custom line limit + python3 countline.py --lines 200 + + # Exclude specific files or directories + python3 countline.py --exclude_files path/to/file1 path/to/file2 + +EXIT CODES: + 0: Success - no files exceed the line limit + 1: Error - one or more files exceed the line limit """
35-56
: Simplify logic in _valid_filename function.The current implementation uses double negation which makes the logic harder to follow.
def _valid_filename(filepath): """Determine whether filepath has the correct filename. Args: filepath: Filepath to check Returns: result: True if valid """ # Initialize key variables invalid_filenames = [".test.", ".spec."] - result = True - - # Test - for invalid_filename in invalid_filenames: - if invalid_filename.lower() not in filepath.lower(): - continue - result = False - - return result + return not any( + invalid.lower() in filepath.lower() + for invalid in invalid_filenames + )
58-79
: Simplify logic in _valid_extension function.Similar to _valid_filename, the logic can be simplified.
def _valid_extension(filepath): """Determine whether filepath has the correct extension. Args: filepath: Filepath to check Returns: result: True if valid """ # Initialize key variables invalid_extensions = [".css", ".jpg", ".png", ".jpeg"] - result = True - - # Test - for invalid_extension in invalid_extensions: - if filepath.lower().endswith(invalid_extension.lower()) is False: - continue - result = False - - return result + return not any( + filepath.lower().endswith(ext.lower()) + for ext in invalid_extensions + )
81-120
: Enhance path handling in _valid_exclusions function.The function could benefit from using
os.path
functions more consistently.def _valid_exclusions(excludes): # ... docstring ... # Initialize key variables result = [] filenames = [] more_filenames = [] # Create a list of files to ignore if bool(excludes.files): filenames = excludes.files if bool(excludes.directories): more_filenames = _filepaths_in_directories(excludes.directories) filenames.extend(more_filenames) # Remove duplicates filenames = list(set(filenames)) # Process files for filename in filenames: - # Ignore files that appear to be full paths because they start - # with a '/' or whatever the OS uses to distinguish directories - if filename.startswith(os.sep): - continue - - # Create a file path - filepath = "{}{}{}".format(os.getcwd(), os.sep, filename) + # Convert relative paths to absolute + filepath = os.path.abspath(os.path.join(os.getcwd(), filename)) if os.path.isfile(filepath) is True: result.append(filepath) return result
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (75)
package-lock.json
is excluded by!**/package-lock.json
public/favicon.ico
is excluded by!**/*.ico
public/favicon_palisadoes.ico
is excluded by!**/*.ico
public/images/logo512.png
is excluded by!**/*.png
public/images/svg/angleDown.svg
is excluded by!**/*.svg
public/images/svg/arrow-left.svg
is excluded by!**/*.svg
public/images/svg/arrow-right.svg
is excluded by!**/*.svg
public/images/svg/attendees.svg
is excluded by!**/*.svg
public/images/svg/feedback.svg
is excluded by!**/*.svg
public/images/svg/profiledefault.svg
is excluded by!**/*.svg
public/images/svg/up-down.svg
is excluded by!**/*.svg
public/logo192.png
is excluded by!**/*.png
public/markdown/images/install1.png
is excluded by!**/*.png
public/markdown/images/install2.png
is excluded by!**/*.png
src/assets/css/app.css.map
is excluded by!**/*.map
src/assets/images/blank.png
is excluded by!**/*.png
src/assets/images/bronze.png
is excluded by!**/*.png
src/assets/images/defaultImg.png
is excluded by!**/*.png
src/assets/images/gold.png
is excluded by!**/*.png
src/assets/images/palisadoes_logo.png
is excluded by!**/*.png
src/assets/images/silver.png
is excluded by!**/*.png
src/assets/images/talawa-logo-600x600.png
is excluded by!**/*.png
src/assets/images/talawa-logo-dark-200x200.png
is excluded by!**/*.png
src/assets/images/talawa-logo-lite-200x200.png
is excluded by!**/*.png
src/assets/svgs/Attendance.svg
is excluded by!**/*.svg
src/assets/svgs/actionItem.svg
is excluded by!**/*.svg
src/assets/svgs/admin.svg
is excluded by!**/*.svg
src/assets/svgs/agenda-category-icon.svg
is excluded by!**/*.svg
src/assets/svgs/agenda-items.svg
is excluded by!**/*.svg
src/assets/svgs/angleRight.svg
is excluded by!**/*.svg
src/assets/svgs/article.svg
is excluded by!**/*.svg
src/assets/svgs/blockUser.svg
is excluded by!**/*.svg
src/assets/svgs/blockedUser.svg
is excluded by!**/*.svg
src/assets/svgs/cardItemDate.svg
is excluded by!**/*.svg
src/assets/svgs/cardItemEvent.svg
is excluded by!**/*.svg
src/assets/svgs/cardItemLocation.svg
is excluded by!**/*.svg
src/assets/svgs/chat.svg
is excluded by!**/*.svg
src/assets/svgs/checkInRegistrants.svg
is excluded by!**/*.svg
src/assets/svgs/dashboard.svg
is excluded by!**/*.svg
src/assets/svgs/date.svg
is excluded by!**/*.svg
src/assets/svgs/event.svg
is excluded by!**/*.svg
src/assets/svgs/events.svg
is excluded by!**/*.svg
src/assets/svgs/flask.svg
is excluded by!**/*.svg
src/assets/svgs/funds.svg
is excluded by!**/*.svg
src/assets/svgs/key.svg
is excluded by!**/*.svg
src/assets/svgs/listEventRegistrants.svg
is excluded by!**/*.svg
src/assets/svgs/location.svg
is excluded by!**/*.svg
src/assets/svgs/logout.svg
is excluded by!**/*.svg
src/assets/svgs/media.svg
is excluded by!**/*.svg
src/assets/svgs/newChat.svg
is excluded by!**/*.svg
src/assets/svgs/organizations.svg
is excluded by!**/*.svg
src/assets/svgs/palisadoes.svg
is excluded by!**/*.svg
src/assets/svgs/people.svg
is excluded by!**/*.svg
src/assets/svgs/plugins.svg
is excluded by!**/*.svg
src/assets/svgs/post.svg
is excluded by!**/*.svg
src/assets/svgs/posts.svg
is excluded by!**/*.svg
src/assets/svgs/requests.svg
is excluded by!**/*.svg
src/assets/svgs/roles.svg
is excluded by!**/*.svg
src/assets/svgs/settings.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Facebook-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Github-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Instagram-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Linkedin-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Reddit-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Slack-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/X-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/social-icons/Youtube-Logo.svg
is excluded by!**/*.svg
src/assets/svgs/tag.svg
is excluded by!**/*.svg
src/assets/svgs/tags.svg
is excluded by!**/*.svg
src/assets/svgs/talawa.svg
is excluded by!**/*.svg
src/assets/svgs/user.svg
is excluded by!**/*.svg
src/assets/svgs/userEvent.svg
is excluded by!**/*.svg
src/assets/svgs/users.svg
is excluded by!**/*.svg
src/assets/svgs/venues.svg
is excluded by!**/*.svg
src/assets/talawa-logo-lite-200x200.png
is excluded by!**/*.png
📒 Files selected for processing (82)
.coderabbit.yaml
(1 hunks).dockerignore
(1 hunks).env.example
(1 hunks).eslintignore
(1 hunks).eslintrc.json
(2 hunks).github/ISSUE_TEMPLATE/bug-report.md
(2 hunks).github/ISSUE_TEMPLATE/feature-request.md
(2 hunks).github/dependabot.yaml
(1 hunks).github/pull_request_template.md
(2 hunks).github/workflows/README.md
(1 hunks).github/workflows/auto-label.json5
(1 hunks).github/workflows/check-tsdoc.js
(1 hunks).github/workflows/ci.yml
(0 hunks).github/workflows/codeql-analysis.yml
(0 hunks).github/workflows/codeql-codescan.yml
(1 hunks).github/workflows/compare_translations.py
(1 hunks).github/workflows/countline.py
(1 hunks).github/workflows/eslint_disable_check.py
(1 hunks).github/workflows/issue.yml
(1 hunks).github/workflows/linter.yml
(0 hunks).github/workflows/npm-publish.yml
(0 hunks).github/workflows/pull-request-target.yml
(1 hunks).github/workflows/pull-request.yml
(1 hunks).github/workflows/push.yml
(1 hunks).github/workflows/stale.yml
(1 hunks).github/workflows/talawa_admin_md_mdx_format_adjuster.py
(1 hunks).gitignore
(2 hunks).husky/post-merge
(1 hunks).husky/pre-commit
(1 hunks).idea/.gitignore
(1 hunks).idea/inspectionProfiles/Project_Default.xml
(1 hunks).idea/modules.xml
(1 hunks).idea/talawa-admin.iml
(1 hunks).idea/vcs.xml
(1 hunks).lintstagedrc.json
(1 hunks).node-version
(1 hunks).prettierignore
(1 hunks).prettierrc
(1 hunks)CODEOWNERS
(1 hunks)CODE_OF_CONDUCT.md
(1 hunks)CODE_STYLE.md
(1 hunks)CONTRIBUTING.md
(2 hunks)DOCUMENTATION.md
(1 hunks)Docker_Container/.dockerignore
(0 hunks)Docker_Container/README.md
(0 hunks)Docker_Container/docker-compose.yml
(0 hunks)Docker_Container/dockerfile
(0 hunks)Dockerfile
(1 hunks)INSTALLATION.md
(1 hunks)ISSUE_GUIDELINES.md
(1 hunks)ISSUE_TEMPLATE.md
(0 hunks)PR-guidelines.md
(0 hunks)PR_GUIDELINES.md
(1 hunks)PULL_REQUEST_TEMPLATE.md
(0 hunks)README.md
(3 hunks)config/babel.config.cjs
(1 hunks)config/vite.config.ts
(1 hunks)index.html
(1 hunks)issue-guidelines.md
(0 hunks)jest-preview.config.ts
(1 hunks)jest.config.js
(1 hunks)package.json
(2 hunks)public/index.html
(0 hunks)public/locales/en/common.json
(1 hunks)public/locales/en/errors.json
(1 hunks)public/locales/en/translation.json
(1 hunks)public/locales/fr/common.json
(1 hunks)public/locales/fr/errors.json
(1 hunks)public/locales/fr/translation.json
(1 hunks)public/locales/hi/common.json
(1 hunks)public/locales/hi/errors.json
(1 hunks)public/locales/hi/translation.json
(1 hunks)public/locales/sp/common.json
(1 hunks)public/locales/sp/errors.json
(1 hunks)public/locales/sp/translation.json
(1 hunks)public/locales/zh/common.json
(1 hunks)public/locales/zh/errors.json
(1 hunks)public/locales/zh/translation.json
(1 hunks)public/manifest.json
(1 hunks)schema.graphql
(1 hunks)scripts/__mocks__/@dicebear/collection.ts
(1 hunks)scripts/__mocks__/@dicebear/core.ts
(1 hunks)
⛔ Files not processed due to max files limit (35)
- scripts/mocks/@pdfme/generator.test.ts
- scripts/mocks/@pdfme/generator.ts
- scripts/mocks/fileMock.js
- scripts/custom-test-env.js
- scripts/githooks/check-localstorage-usage.js
- scripts/githooks/update-toc.js
- setup.ts
- src/App.test.tsx
- src/App.tsx
- src/Constant/constant.spec.ts
- src/Constant/constant.ts
- src/GraphQl/Mutations/ActionItemCategoryMutations.ts
- src/GraphQl/Mutations/ActionItemMutations.ts
- src/GraphQl/Mutations/AgendaCategoryMutations.ts
- src/GraphQl/Mutations/AgendaItemMutations.ts
- src/GraphQl/Mutations/CampaignMutation.ts
- src/GraphQl/Mutations/CommentMutations.ts
- src/GraphQl/Mutations/EventAttendeeMutations.ts
- src/GraphQl/Mutations/EventVolunteerMutation.ts
- src/GraphQl/Mutations/FundMutation.ts
- src/GraphQl/Mutations/OrganizationMutations.ts
- src/GraphQl/Mutations/PledgeMutation.ts
- src/GraphQl/Mutations/TagMutations.ts
- src/GraphQl/Mutations/VenueMutations.ts
- src/GraphQl/Mutations/mutations.ts
- src/GraphQl/Queries/ActionItemCategoryQueries.ts
- src/GraphQl/Queries/ActionItemQueries.ts
- src/GraphQl/Queries/AgendaCategoryQueries.ts
- src/GraphQl/Queries/AgendaItemQueries.ts
- src/GraphQl/Queries/EventVolunteerQueries.ts
- src/GraphQl/Queries/OrganizationQueries.ts
- src/GraphQl/Queries/PlugInQueries.ts
- src/GraphQl/Queries/Queries.ts
- src/GraphQl/Queries/fundQueries.ts
- src/GraphQl/Queries/userTagQueries.ts
💤 Files with no reviewable changes (13)
- ISSUE_TEMPLATE.md
- Docker_Container/.dockerignore
- .github/workflows/ci.yml
- PULL_REQUEST_TEMPLATE.md
- Docker_Container/dockerfile
- .github/workflows/linter.yml
- Docker_Container/docker-compose.yml
- issue-guidelines.md
- Docker_Container/README.md
- PR-guidelines.md
- .github/workflows/npm-publish.yml
- .github/workflows/codeql-analysis.yml
- public/index.html
✅ Files skipped from review due to trivial changes (31)
- .node-version
- .prettierrc
- CODEOWNERS
- jest-preview.config.ts
- .eslintignore
- public/locales/fr/errors.json
- scripts/mocks/@dicebear/collection.ts
- .github/dependabot.yaml
- .idea/vcs.xml
- .idea/talawa-admin.iml
- index.html
- config/babel.config.cjs
- .idea/.gitignore
- .coderabbit.yaml
- .prettierignore
- .github/workflows/auto-label.json5
- .idea/modules.xml
- config/vite.config.ts
- public/locales/zh/translation.json
- .env.example
- public/locales/hi/translation.json
- public/locales/sp/translation.json
- .gitignore
- .dockerignore
- public/locales/en/translation.json
- public/locales/fr/translation.json
- public/locales/en/common.json
- public/locales/zh/common.json
- public/locales/hi/common.json
- public/locales/fr/common.json
- public/locales/sp/common.json
🧰 Additional context used
🪛 LanguageTool
CODE_OF_CONDUCT.md
[duplication] ~11-~11: Possible typo: you repeated a word
Context: ...-responsibilities) - Scope - Enforcement - Enforcement Guidelines ...
(ENGLISH_WORD_REPEAT_RULE)
DOCUMENTATION.md
[grammar] ~25-~25: The modal verb ‘should’ requires the verb’s base form.
Context: ...f docs.talawa.io
should automatically launched in your browser at http://localhost:300...
(MD_BASEFORM)
[grammar] ~26-~26: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...ttp://localhost:3000/ 1. Add/modify the markdown documents to the docs/
directory of t...
(MARKDOWN_NNP)
[uncategorized] ~32-~32: The preposition “to” seems more likely in this position.
Context: ... PLEASE do not add markdown files in this repository. Add them to `talawa-do...
(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)
CODE_STYLE.md
[style] ~127-~127: Consider removing “of” to be more concise
Context: ...tories of src
assets
- This houses all of the static assets used in the project - `...
(ALL_OF_THE)
[style] ~128-~128: Consider removing “of” to be more concise
Context: ... in the project - css
- This houses all of the css files used in the project - `imag...
(ALL_OF_THE)
[style] ~129-~129: Consider removing “of” to be more concise
Context: ... the project - images
- This houses all of the images used in the project - scss
-...
(ALL_OF_THE)
[style] ~130-~130: Consider removing “of” to be more concise
Context: ...in the project - scss
- This houses all of the scss files used in the project - `c...
(ALL_OF_THE)
[grammar] ~134-~134: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ...rms - _talawa.scss
- Partial Sass file for Talawa - _utilities.scss
- Pa...
(HE_VERB_AGR)
[grammar] ~135-~135: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ... - _utilities.scss
- Partial Sass file for utilities - _variables.scss
-...
(HE_VERB_AGR)
[grammar] ~136-~136: The singular proper name ‘Sass’ must be used with a third-person or a past tense verb.
Context: ... - _variables.scss
- Partial Sass file for variables - app.scss
- Main S...
(HE_VERB_AGR)
[style] ~141-~141: Consider removing “of” to be more concise
Context: ...views/screens Constant
- This houses all of the constants used in the project `GraphQl...
(ALL_OF_THE)
[style] ~143-~143: Consider removing “of” to be more concise
Context: ...in the project GraphQl
- This houses all of the GraphQL queries and mutations used in t...
(ALL_OF_THE)
[style] ~145-~145: Consider removing “of” to be more concise
Context: ...in the project screens
- This houses all of the views/screens to be navigated through i...
(ALL_OF_THE)
[style] ~147-~147: Consider removing “of” to be more concise
Context: ... in Talawa-Admin state
- This houses all of the state management code for the project ...
(ALL_OF_THE)
[uncategorized] ~165-~165: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...following order: - React imports - Third party imports - Local imports If there is...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
INSTALLATION.md
[typographical] ~39-~39: It appears that a comma is missing.
Context: ... that follow. # Prerequisites In this section we'll explain how to set up all the pre...
(DURING_THAT_TIME_COMMA)
[uncategorized] ~45-~45: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: .... Basic git
knowledge is required for open source contribution so make sure you're comfor...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[grammar] ~51-~51: The word “setup” is a noun. The verb is spelled with a space.
Context: ...avigate to the folder where you want to setup the repository. 2. Open a cmd
(Window...
(NOUN_VERB_CONFUSION)
[grammar] ~52-~52: The operating system from Apple is written “macOS”.
Context: ...cmd
(Windows) or terminal
(Linux or MacOS) session in this folder. 1. An easy ...
(MAC_OS)
[uncategorized] ~54-~54: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...e option based on your OS. 3. For Our Open Source Contributor Software Developers: ...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[grammar] ~86-~86: The operating system from Apple is written “macOS”.
Context: ...node.jspackages in Windows, Linux and MacOS. 1. For Windows: 1. first install
...
(MAC_OS)
[duplication] ~100-~100: Possible typo: you repeated a word
Context: ... 5. Save the document. 6. Exit notepad
7. Exit PowerShell 8. This will ensure...
(ENGLISH_WORD_REPEAT_RULE)
[grammar] ~103-~103: The operating system from Apple is written “macOS”.
Context: ...t version of node.js
2. For Linux and MacOS, use the terminal window. 1. install...
(MAC_OS)
[grammar] ~107-~107: The word “setup” is a noun. The verb is spelled with a white space.
Context: ... the respective recommended commands to setup your node environment 3. This wil...
(NOUN_VERB_CONFUSION)
ISSUE_GUIDELINES.md
[uncategorized] ~2-~2: Loose punctuation mark.
Context: # Issue Report Guidelines 👍🎉 First off, thanks for taking t...
(UNLIKELY_OPENING_PUNCTUATION)
[style] ~4-~4: Consider a shorter alternative to avoid wordiness.
Context: ...ing the time to contribute! 🎉👍 In order to give everyone a chance to submit a issu...
(IN_ORDER_TO_PREMIUM)
[misspelling] ~5-~5: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...der to give everyone a chance to submit a issues reports and contribute to the Ta...
(EN_A_VS_AN)
[typographical] ~24-~24: Consider adding a comma here.
Context: ...> ___ ## Issue Management In all cases please use the [GitHub open issue search](http...
(PLEASE_COMMA)
[uncategorized] ~27-~27: Possible missing comma found.
Context: ...reported. ### New Issues To create new issues follow these steps: 1. Your issue may ...
(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~30-~30: Consider using a different verb for a more formal wording.
Context: .... 1. Verify whether the issue has been fixed by trying to reproduce it using the lat...
(FIX_RESOLVE)
[uncategorized] ~32-~32: Possible missing preposition found.
Context: ...lawa-admin/issues/new/choose) button 1. Use the templates to create a standardized ...
(AI_HYDRA_LEO_MISSING_TO)
[style] ~35-~35: The wording of this phrase can be improved.
Context: ...lcome contributors who find new ways to make the code better. ### Existing Issues You can also be ...
(MAKE_STYLE_BETTER)
[grammar] ~44-~44: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...butors to assign it to you in #talawa
slack channel. Working on these types of exi...
(ON_SKYPE)
[grammar] ~53-~53: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...ew Issues 1. Join our #talawa-github
slack channel for automatic issue and pull re...
(ON_SKYPE)
[grammar] ~57-~57: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...lines 1. Discuss issues in our various slack channels when necessary 2. Please do no...
(ON_SKYPE)
[typographical] ~57-~57: Consider adding a comma here.
Context: ...ur various slack channels when necessary 2. Please do not derail or troll issues. 3. Keep...
(PLEASE_COMMA)
CONTRIBUTING.md
[style] ~27-~27: This expression usually appears with a “please” in front of it.
Context: ...DUCT.md) to understand what this means. Let us know immediately if you have unacceptable ex...
(INSERT_PLEASE)
[uncategorized] ~34-~34: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...)" videos are extremely helpful for new open source contributors. ## Ways to Contribute I...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[grammar] ~62-~62: A determiner may be missing.
Context: ...l Request guidelines](PR_GUIDELINES.md) is best resource to follow to start working on ...
(THE_SUPERLATIVE)
[uncategorized] ~68-~68: Loose punctuation mark.
Context: ...ushed to the main
branch: - develop
: For unstable code and bug fixing - `mai...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~69-~69: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...d bug fixing - main
: Where the stable production ready code lies. This is our default branch. ...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
[typographical] ~73-~73: Consider adding a comma.
Context: ...ultiple developers are working on issues there is bound to be a conflict of interest (...
(IF_THERE_COMMA)
[typographical] ~73-~73: Consider adding a comma after ‘Usually’ for more clarity.
Context: ...licts) among issues, PRs or even ideas. Usually these conflicts are resolved in a **Fir...
(RB_LY_COMMA)
[grammar] ~73-~73: Did you mean “served” (as in the idiom ‘first come, first served’)?
Context: ...ts are resolved in a First Come First Serve basis however there are certain excep...
(FIRST_SERVED)
[grammar] ~75-~75: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...tant to ask the author of the PR in the slack channel or in their PRs or issues thems...
(ON_SKYPE)
[style] ~77-~77: ‘Last but not the least’ might be wordy. Consider a shorter alternative.
Context: ...y and test that function when needed. - Last but not the least, communication is important make sure t...
(EN_WORDINESS_PREMIUM_LAST_BUT_NOT_THE_LEAST)
[grammar] ~77-~77: It seems that “to” is missing before the verb.
Context: ...t the least, communication is important make sure to talk to other contributors, in ...
(MISSING_TO_BETWEEN_BE_AND_VB)
[grammar] ~77-~77: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ... other contributors, in these cases, in slack channel or in a issue/PR thread. - As a...
(ON_SKYPE)
[misspelling] ~77-~77: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ... in these cases, in slack channel or in a issue/PR thread. - As a last resort the...
(EN_A_VS_AN)
[typographical] ~78-~78: It appears that a comma is missing.
Context: ...el or in a issue/PR thread. - As a last resort the Admins would be responsible for dec...
(DURING_THAT_TIME_COMMA)
[grammar] ~135-~135: The operating system from Apple is written “macOS”.
Context: ...r packages can be found for Windows and MacOS. 6. The currently acceptable c...
(MAC_OS)
[grammar] ~165-~165: The past participle is required after “must be”.
Context: ...branch_name>`.(Here branch name must be name of the branch you want to push the chan...
(BE_VBP_IN)
[grammar] ~178-~178: Did you mean the communication tool “Slack” (= proper noun, capitalized)?
Context: ...dation/talawa) for the link to join our slack channel. 1. We also have a technical em...
(ON_SKYPE)
README.md
[uncategorized] ~56-~56: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...)" videos are extremely helpful for new open source contributors.
(EN_COMPOUND_ADJECTIVE_INTERNAL)
PR_GUIDELINES.md
[uncategorized] ~2-~2: Loose punctuation mark.
Context: # Pull Request Guidelines 👍🎉 First off, thanks for taking t...
(UNLIKELY_OPENING_PUNCTUATION)
[style] ~4-~4: Consider a shorter alternative to avoid wordiness.
Context: ...ing the time to contribute! 🎉👍 In order to give everyone a chance to submit a pull...
(IN_ORDER_TO_PREMIUM)
[style] ~46-~46: Style-wise, it’s not ideal to insert an adverb (‘manually’) in the middle of an infinitive construction (‘to test’). Try moving the adverb to avoid split infinitives.
Context: ..., you'll need to tell us what steps you followed to manually test your changes. 1. Please read our [CONTRIBUTING.md](C...
(SPLIT_INFINITIVE)
[style] ~56-~56: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...o be closed. The quality of our code is very important to us. Therefore we make experienced ma...
(EN_WEAK_ADJECTIVE)
[uncategorized] ~56-~56: A comma may be missing after the conjunctive/linking adverb ‘Therefore’.
Context: ...ty of our code is very important to us. Therefore we make experienced maintainers of our ...
(SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
[style] ~59-~59: Consider using a different verb for a more formal wording.
Context: ...check if all tests are passing; if not, fix the issues and then create a pull reque...
(FIX_RESOLVE)
[style] ~64-~64: This expression is wordy and overused. Consider replacing it with a more concise and formal alternative.
Context: ...wer your questions, but we'll get to it sooner or later. @mentioning someone just adds to the p...
(SOONER_OR_LATER)
[uncategorized] ~64-~64: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...adds to the pile of notifications we get and it won't make us look at your issue fas...
(COMMA_COMPOUND_SENTENCE)
[style] ~65-~65: Consider shortening or rephrasing this to strengthen your wording.
Context: ...ue faster. 1. Do not force push. If you make changes to your pull request, please simply add a ...
(MAKE_CHANGES)
.github/workflows/README.md
[uncategorized] ~13-~13: Possible missing comma found.
Context: ...ding on the type of workflow. Whenever possible you must ensure that: 1. The file roles...
(AI_HYDRA_LEO_MISSING_COMMA)
[duplication] ~24-~24: Possible typo: you repeated a word
Context: ...ors: 1. Place all actions related to to this in the pull-request-target.yml
f...
(ENGLISH_WORD_REPEAT_RULE)
[uncategorized] ~35-~35: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...orrectly if they have a dedicated file (eg. CodeQL
) ## Scripts Follow these gui...
(E_G)
🪛 eslint
jest.config.js
[error] 13-13: Insert ⏎··
(prettier/prettier)
🪛 Markdownlint (0.37.0)
DOCUMENTATION.md
25-25: null
Bare URL used
(MD034, no-bare-urls)
.github/pull_request_template.md
58-58: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
CODE_STYLE.md
128-128: Expected: 0; Actual: 2
Unordered list indentation
(MD007, ul-indent)
129-129: Expected: 0; Actual: 2
Unordered list indentation
(MD007, ul-indent)
130-130: Expected: 0; Actual: 2
Unordered list indentation
(MD007, ul-indent)
131-131: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
132-132: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
133-133: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
134-134: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
135-135: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
136-136: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
137-137: Expected: 2; Actual: 4
Unordered list indentation
(MD007, ul-indent)
164-164: Expected: 0; Actual: 2
Unordered list indentation
(MD007, ul-indent)
165-165: Expected: 0; Actual: 2
Unordered list indentation
(MD007, ul-indent)
166-166: Expected: 0; Actual: 2
Unordered list indentation
(MD007, ul-indent)
57-57: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
73-73: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
75-75: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
92-92: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
190-190: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
230-230: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
58-58: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
65-65: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
78-78: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
95-95: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
158-158: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
173-173: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
181-181: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
239-239: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
245-245: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
251-251: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
INSTALLATION.md
79-79: null
Dollar signs used before commands without showing output
(MD014, commands-show-output)
89-89: null
Bare URL used
(MD034, no-bare-urls)
208-208: null
Bare URL used
(MD034, no-bare-urls)
216-216: null
Bare URL used
(MD034, no-bare-urls)
224-224: null
Bare URL used
(MD034, no-bare-urls)
300-300: null
Bare URL used
(MD034, no-bare-urls)
308-308: null
Bare URL used
(MD034, no-bare-urls)
126-126: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
184-184: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
210-210: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
218-218: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
226-226: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
236-236: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
244-244: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
252-252: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
274-274: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
292-292: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
302-302: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
310-310: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
334-334: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
345-345: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
359-359: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
.github/ISSUE_TEMPLATE/bug-report.md
36-36: null
Bare URL used
(MD034, no-bare-urls)
33-33: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
CONTRIBUTING.md
104-104: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
113-113: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
128-128: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
139-139: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
143-143: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
158-158: null
No empty links
(MD042, no-empty-links)
159-159: null
No empty links
(MD042, no-empty-links)
161-161: null
No empty links
(MD042, no-empty-links)
README.md
53-53: null
Multiple spaces after hash on atx style heading
(MD019, no-multiple-space-atx)
PR_GUIDELINES.md
31-31: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
39-39: null
Fenced code blocks should have a language specified
(MD040, fenced-code-language)
.github/ISSUE_TEMPLATE/feature-request.md
28-28: null
Bare URL used
(MD034, no-bare-urls)
25-25: null
Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
🪛 yamllint (1.35.1)
.github/workflows/pull-request-target.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[error] 13-13: trailing spaces
(trailing-spaces)
[error] 15-15: trailing spaces
(trailing-spaces)
[error] 27-27: trailing spaces
(trailing-spaces)
[error] 28-28: trailing spaces
(trailing-spaces)
[error] 29-29: trailing spaces
(trailing-spaces)
[error] 33-33: trailing spaces
(trailing-spaces)
[error] 35-35: trailing spaces
(trailing-spaces)
[error] 40-40: trailing spaces
(trailing-spaces)
[error] 45-45: trailing spaces
(trailing-spaces)
[error] 70-70: trailing spaces
(trailing-spaces)
.github/workflows/codeql-codescan.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[error] 17-17: trailing spaces
(trailing-spaces)
[error] 20-20: trailing spaces
(trailing-spaces)
[warning] 31-31: wrong indentation: expected 6 but found 7
(indentation)
[warning] 37-37: wrong indentation: expected 11 but found 10
(indentation)
.github/workflows/issue.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[warning] 15-15: wrong indentation: expected 4 but found 6
(indentation)
[warning] 66-66: too many blank lines
(1 > 0) (empty-lines)
.github/workflows/stale.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[error] 20-20: trailing spaces
(trailing-spaces)
[error] 21-21: trailing spaces
(trailing-spaces)
.github/workflows/push.yml
[error] 6-6: trailing spaces
(trailing-spaces)
[error] 17-17: trailing spaces
(trailing-spaces)
[error] 18-18: trailing spaces
(trailing-spaces)
[warning] 20-20: wrong indentation: expected 2 but found 4
(indentation)
[error] 21-21: trailing spaces
(trailing-spaces)
[error] 50-50: trailing spaces
(trailing-spaces)
[warning] 62-62: too many blank lines
(1 > 0) (empty-lines)
.github/workflows/pull-request.yml
[error] 49-49: trailing spaces
(trailing-spaces)
[error] 60-60: trailing spaces
(trailing-spaces)
[error] 90-90: trailing spaces
(trailing-spaces)
[error] 101-101: trailing spaces
(trailing-spaces)
[error] 126-126: trailing spaces
(trailing-spaces)
[error] 129-129: trailing spaces
(trailing-spaces)
[error] 150-150: trailing spaces
(trailing-spaces)
[error] 157-157: trailing spaces
(trailing-spaces)
[error] 197-197: trailing spaces
(trailing-spaces)
[error] 201-201: trailing spaces
(trailing-spaces)
[error] 202-202: trailing spaces
(trailing-spaces)
[error] 224-224: trailing spaces
(trailing-spaces)
[error] 225-225: trailing spaces
(trailing-spaces)
[error] 239-239: trailing spaces
(trailing-spaces)
[error] 264-264: trailing spaces
(trailing-spaces)
[error] 270-270: trailing spaces
(trailing-spaces)
[error] 235-235: syntax error: mapping values are not allowed here
(syntax)
🪛 Ruff (0.8.2)
.github/workflows/eslint_disable_check.py
61-61: Loop control variable dirs
not used within loop body
Rename unused dirs
to _dirs
(B007)
.github/workflows/compare_translations.py
135-135: Within an except
clause, raise exceptions with raise ... from err
or raise ... from None
to distinguish them from errors in exception handling
(B904)
🪛 actionlint (1.7.4)
.github/workflows/pull-request.yml
235-235: could not parse as YAML: yaml: line 235: mapping values are not allowed in this context
(syntax-check)
🔇 Additional comments (18)
public/manifest.json (1)
16-16
: Verify the new image path exists
The icon path has been updated to "images/logo512.png". Let's verify this path exists to prevent broken icons in the PWA.
✅ Verification successful
Icon path verified successfully
The image file exists at the specified path public/images/logo512.png
, and the only reference to this image in the codebase is in the manifest.json file, which has been correctly updated to use the new path.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the image file exists in the new path
# and if there are any other references to this image that need updating
# Check if the new image path exists
if [ -f "public/images/logo512.png" ]; then
echo "✓ Image exists at public/images/logo512.png"
else
echo "✗ Image not found at public/images/logo512.png"
fi
# Search for any other references to logo512.png that might need updating
rg --type-add 'config:*.{json,js,jsx,ts,tsx}' -t config 'logo512\.png'
Length of output: 264
CODE_OF_CONDUCT.md (2)
3-20
: LGTM! Well-structured table of contents.
The table of contents is properly organized with clear hierarchy and correct markdown linking syntax.
🧰 Tools
🪛 LanguageTool
[duplication] ~11-~11: Possible typo: you repeated a word
Context: ...-responsibilities) - Scope - Enforcement - Enforcement Guidelines ...
(ENGLISH_WORD_REPEAT_RULE)
3-20
: Verify if this change belongs in the Jest-to-Vitest transition PR.
This documentation improvement, while valuable, appears unrelated to the main PR objective of transitioning from Jest to Vitest. Consider submitting it as a separate PR to maintain focused changes.
🧰 Tools
🪛 LanguageTool
[duplication] ~11-~11: Possible typo: you repeated a word
Context: ...-responsibilities) - Scope - Enforcement - Enforcement Guidelines ...
(ENGLISH_WORD_REPEAT_RULE)
.github/workflows/compare_translations.py (5)
1-49
: Docstrings are well-structured and complete.
The top-level docstring and attribute documentation provide a clear overview of the script, describing its purpose, usage, and compliance with code standards (Pylint, Pycodestyle, etc.). This clarity helps maintain consistent coding practices.
63-90
: Comparison logic is straightforward and readable.
The function correctly identifies missing keys between the default and other translations. The docstring and parameter naming are clear.
91-116
: Flattening JSON is efficient and easy to follow.
This utility function properly handles nested objects, avoids recursion pitfalls, and returns a clear, flattened dict.
138-183
: Translation comparison loop looks good.
The logic that iterates through other languages, compares translations, and prints missing keys is clear and consistent. Error handling with a simple boolean flag is sufficient for this script's scope.
185-212
: Validate usage in GitHub Actions or CI pipelines.
If this script is intended to run automatically, confirm that it’s referenced in your workflows (e.g., pull-request.yml).
Below is an example script to check all workflow files for any reference to "compare_translations.py":
✅ Verification successful
The script is properly integrated into the pull request workflow
The script is correctly referenced and executed in the .github/workflows/pull-request.yml
workflow with appropriate permissions (chmod +x
) and the correct directory argument (public/locales
). No issues found with its integration.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Search .github/workflows for usage of compare_translations.py
rg "compare_translations.py" -A 10 .github/workflows
Length of output: 1816
.lintstagedrc.json (1)
1-5
: Ensure the custom script exists before referencing it.
The command "node scripts/githooks/check-localstorage-usage.js" must be valid, or the commit process will fail.
Below is an example script to confirm the presence of the referenced file:
✅ Verification successful
Since the fd
command successfully found the file at the exact path specified in the .lintstagedrc.json
configuration (scripts/githooks/check-localstorage-usage.js
), let me verify its content to ensure it's a valid JavaScript file and not an empty or placeholder file.
The referenced script exists and is properly implemented
The script at scripts/githooks/check-localstorage-usage.js
is present and contains a valid implementation that checks for direct localStorage usage in TypeScript files, encouraging the use of a custom hook instead. The script is executable and will work as intended in the lint-staged configuration.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Looks for the check-localstorage-usage.js script in the repository.
fd check-localstorage-usage.js
Length of output: 77
Script:
#!/bin/bash
# Check the content of the check-localstorage-usage.js script
cat scripts/githooks/check-localstorage-usage.js
Length of output: 2515
.github/workflows/push.yml (1)
55-61
: Configure Codecov for Vitest coverage reports
Ensure Codecov is properly configured to parse Vitest coverage reports. Consider adding coverage thresholds.
✅ Verification successful
Let me check if there are any Vitest configuration files or coverage settings in the repository.
Let me check the Vitest configuration file to see the coverage settings.
Codecov is properly configured for Vitest coverage reports
The Vitest configuration already includes comprehensive coverage settings:
- Coverage is enabled with Istanbul provider
- Reports are generated in HTML, LCOV, text, and text-summary formats
- Reports directory is set to './coverage/vitest'
- Appropriate exclusions are configured
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if codecov.yml exists and contains Vitest configuration
if [ -f "codecov.yml" ]; then
echo "Checking codecov.yml configuration..."
cat codecov.yml
else
echo "codecov.yml not found. Consider adding one with Vitest coverage configuration."
fi
# Check if package.json contains Vitest coverage configuration
echo "Checking package.json for Vitest coverage configuration..."
if [ -f "package.json" ]; then
cat package.json | jq '.vitest'
fi
Length of output: 381
Script:
#!/bin/bash
# Check for Vitest config files
fd -e config.ts -e config.js vitest
# Check for coverage settings in any test configuration files
rg -i "coverage" -A 5 -B 5 "vitest.config"
# Look for coverage settings in package.json scripts
cat package.json | jq '.scripts'
# Check if there are any coverage reports generated
fd coverage
Length of output: 1342
Script:
#!/bin/bash
# Check Vitest configuration file content
cat vitest.config.ts
# Look for any coverage-related settings in the repository
rg -i "coverage: {" -A 10 -B 2
Length of output: 1092
.github/pull_request_template.md (1)
5-12
: LGTM! Clear branching strategy documentation.
The branching strategy is well-documented and clearly emphasizes the importance of submitting PRs against the develop
branch.
.github/workflows/talawa_admin_md_mdx_format_adjuster.py (1)
31-43
: LGTM! Well-implemented character escaping logic.
The regex patterns effectively handle edge cases by avoiding double escaping of characters. The implementation is clean and efficient.
README.md (1)
45-51
: LGTM! Well-structured documentation section.
The documentation section is well-organized with clear links to important resources and guidelines.
package.json (1)
78-80
:
Verify test script configurations
The test scripts show both Vitest and Jest configurations running in parallel. This could lead to confusion and maintenance overhead.
- "test:vitest": "vitest run",
- "test:vitest:watch": "vitest",
- "test:vitest:coverage": "vitest run --coverage",
- "test": "cross-env NODE_ENV=test jest --env=./scripts/custom-test-env.js --watchAll --coverage",
+ "test": "vitest run",
+ "test:watch": "vitest",
+ "test:coverage": "vitest run --coverage"
Likely invalid or redundant comment.
public/locales/zh/errors.json (2)
1-16
: Chinese translations look good!
The Chinese translations are well-formatted and maintain consistent use of placeholders.
1-16
: Verify if localization files belong in this PR
These localization files appear to be unrelated to the Jest to Vitest migration objective of this PR. Consider moving these changes to a separate PR focused on internationalization improvements.
.github/workflows/countline.py (2)
28-32
: LGTM! Clean and well-organized imports.
The imports are appropriately chosen from the standard library and well-organized.
296-297
: LGTM! Proper entry point implementation.
The entry point follows the standard Python pattern.
@@ -10,10 +10,10 @@ | |||
{ | |||
"src": "logo192.png", | |||
"type": "image/png", | |||
"sizes": "192x192" | |||
"sizes": "16x16" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect icon size for logo192.png
The icon size "16x16" is inconsistent with the filename "logo192.png" which suggests a 192x192 pixel image. This mismatch could cause rendering issues and affect the PWA's appearance across different devices.
Apply this diff to fix the size:
- "sizes": "16x16"
+ "sizes": "192x192"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"sizes": "16x16" | |
"sizes": "192x192" |
enum AdvertisementType { | ||
BANNER | ||
MENU | ||
POPUP | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate enum “AdvertisementType”.
This enum is declared twice (lines 67–71 & lines 554–558), which can cause schema conflicts.
Below is a suggested diff to remove the second occurrence (lines 554–558):
- enum AdvertisementType {
- BANNER
- MENU
- POPUP
- }
Also applies to: 554-558
type OrganizationCustomField { | ||
_id: ID! | ||
name: String! | ||
organizationId: String! | ||
type: String! | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate type “OrganizationCustomField”.
The same type is declared twice (lines 776–782 & 783–789). This duplication can lead to compilation or runtime schema conflicts.
Below is a suggested diff to remove the second block (lines 783–789):
- type OrganizationCustomField {
- _id: ID!
- name: String!
- organizationId: String!
- type: String!
- }
Also applies to: 783-789
npm run format:fix | ||
# npm run lint:fix | ||
npm run lint-staged | ||
npm run typecheck | ||
npm run update:toc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add test verification to pre-commit hook
Given that this PR focuses on transitioning from Jest to Vitest, it's important to include test verification in the pre-commit hook to prevent commits with failing tests.
Add the test command before the final formatting steps:
npm run format:fix
# npm run lint:fix
npm run lint-staged
+npm run test
npm run typecheck
npm run update:toc
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
npm run format:fix | |
# npm run lint:fix | |
npm run lint-staged | |
npm run typecheck | |
npm run update:toc | |
npm run format:fix | |
# npm run lint:fix | |
npm run lint-staged | |
npm run test | |
npm run typecheck | |
npm run update:toc |
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run format:fix | ||
# npm run lint:fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Remove commented lint:fix as it's redundant with lint-staged
The commented lint:fix
command should be removed as the pre-commit hook already runs lint-staged
, which is a more efficient approach that runs linting only on staged files. Having both commands would be redundant and potentially slower.
- Remove line 5
# npm run lint:fix
from.husky/pre-commit
🔗 Analysis chain
Verify if lint:fix should remain commented
The commented lint:fix
command needs clarification. If it's intentionally disabled, consider removing it. If it should be enabled, uncomment it.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if lint:fix script exists in package.json
jq '.scripts["lint:fix"]' package.json
Length of output: 73
Script:
#!/bin/bash
# Check if there are other pre-commit hooks that might be handling linting
cat .husky/pre-commit
# Check if there are any other lint-related scripts in package.json
jq '.scripts | with_entries(select(.key | contains("lint")))' package.json
Length of output: 474
{ | ||
"talawaApiUnavailable": "Talawa-API service is unavailable!. Is it running? Check your network connectivity too.", | ||
"notFound": "Not found", | ||
"unknownError": "An unknown error occurred. Please try again later. {{msg}}", | ||
"notAuthorised": "Sorry! you are not Authorised!", | ||
"errorSendingMail": "Error sending mail", | ||
"emailNotRegistered": "Email not registered", | ||
"notFoundMsg": "Oops! The Page you requested was not found!", | ||
"errorOccurredCouldntCreate": "Ocurrió un error. No se pudo crear {{entity}}", | ||
"errorLoading": "Ocurrió un error al cargar los datos de {{entity}}", | ||
"invalidPhoneNumber": "Por favor, introduzca un número de teléfono válido", | ||
"invalidEducationGrade": "Por favor seleccione un grado de educación válido", | ||
"invalidEmploymentStatus": "Por favor seleccione un estado de empleo válido", | ||
"invalidMaritalStatus": "Por favor seleccione un estado civil válido", | ||
"error400": "Respuesta no exitosa. Se recibió el código de estado 400 del servidor" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Rename Spanish locale directory from 'sp' to 'es' to follow ISO 639-1 standards
The verification confirms that while other language codes follow ISO standards ('en' for English, 'fr' for French, 'hi' for Hindi, 'zh' for Chinese), Spanish is incorrectly using 'sp' instead of the standard 'es' code. This should be fixed to maintain consistency with international standards and prevent potential localization issues.
🔗 Analysis chain
Use standard ISO language code for Spanish
The file is named sp/errors.json
but should use the standard ISO 639-1 language code 'es' for Spanish. Rename the directory from 'sp' to 'es'.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if other localization files follow ISO standards
fd -t d "^[a-z]{2}$" public/locales
Length of output: 132
"talawaApiUnavailable": "Talawa-API service is unavailable!. Is it running? Check your network connectivity too.", | ||
"notFound": "Not found", | ||
"unknownError": "An unknown error occurred. Please try again later. {{msg}}", | ||
"notAuthorised": "Sorry! you are not Authorised!", | ||
"errorSendingMail": "Error sending mail", | ||
"emailNotRegistered": "Email not registered", | ||
"notFoundMsg": "Oops! The Page you requested was not found!", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate English messages to Spanish for consistency
The first several messages are in English while the rest are in Spanish. This inconsistency defeats the purpose of localization. Please translate these messages to Spanish:
- "talawaApiUnavailable": "Talawa-API service is unavailable!. Is it running? Check your network connectivity too.",
- "notFound": "Not found",
- "unknownError": "An unknown error occurred. Please try again later. {{msg}}",
- "notAuthorised": "Sorry! you are not Authorised!",
- "errorSendingMail": "Error sending mail",
- "emailNotRegistered": "Email not registered",
- "notFoundMsg": "Oops! The Page you requested was not found!",
+ "talawaApiUnavailable": "¡El servicio Talawa-API no está disponible!",
+ "notFound": "No encontrado",
+ "unknownError": "Ocurrió un error desconocido. Por favor, inténtelo de nuevo más tarde.",
+ "notAuthorised": "¡Lo siento! No está autorizado.",
+ "errorSendingMail": "Error al enviar el correo",
+ "emailNotRegistered": "Correo electrónico no registrado",
+ "notFoundMsg": "¡Ups! ¡La página solicitada no fue encontrada!"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"talawaApiUnavailable": "Talawa-API service is unavailable!. Is it running? Check your network connectivity too.", | |
"notFound": "Not found", | |
"unknownError": "An unknown error occurred. Please try again later. {{msg}}", | |
"notAuthorised": "Sorry! you are not Authorised!", | |
"errorSendingMail": "Error sending mail", | |
"emailNotRegistered": "Email not registered", | |
"notFoundMsg": "Oops! The Page you requested was not found!", | |
"talawaApiUnavailable": "¡El servicio Talawa-API no está disponible!", | |
"notFound": "No encontrado", | |
"unknownError": "Ocurrió un error desconocido. Por favor, inténtelo de nuevo más tarde.", | |
"notAuthorised": "¡Lo siento! No está autorizado.", | |
"errorSendingMail": "Error al enviar el correo", | |
"emailNotRegistered": "Correo electrónico no registrado", | |
"notFoundMsg": "¡Ups! ¡La página solicitada no fue encontrada!" |
def main(): | ||
"""Analyze dart files. | ||
|
||
This function finds, and prints the files that exceed the CLI | ||
defined defaults. | ||
|
||
Args: | ||
None | ||
|
||
Returns: | ||
None | ||
|
||
""" | ||
# Initialize key variables | ||
lookup = {} | ||
errors_found = False | ||
file_count = 0 | ||
Excludes = namedtuple("Excludes", "files directories") | ||
|
||
# Get the CLI arguments | ||
args = _arg_parser_resolver() | ||
|
||
# Define the directories of interest | ||
directories = [ | ||
os.path.expanduser(os.path.join(args.directory, "lib")), | ||
os.path.expanduser(os.path.join(args.directory, "src")), | ||
os.path.expanduser(os.path.join(args.directory, "test")), | ||
] | ||
|
||
# Get a corrected list of filenames to exclude | ||
exclude_list = _valid_exclusions( | ||
Excludes( | ||
files=args.exclude_files, directories=args.exclude_directories | ||
) | ||
) | ||
|
||
# Get interesting filepaths | ||
repo_filepath_list = _filepaths_in_directories(directories) | ||
|
||
# Iterate and analyze each directory | ||
for filepath in repo_filepath_list: | ||
# Skip excluded files | ||
if filepath in exclude_list: | ||
continue | ||
|
||
# Skip /node_modules/ sub directories | ||
if "{0}node_modules{0}".format(os.sep) in filepath: | ||
continue | ||
|
||
# Ignore invalid file extensions | ||
if _valid_extension(filepath) is False: | ||
continue | ||
|
||
# Ignore invalid file filenames | ||
if _valid_filename(filepath) is False: | ||
continue | ||
|
||
# Process the rest | ||
with open(filepath, encoding="latin-1") as code: | ||
line_count = sum( | ||
1 | ||
for line in code | ||
if line.strip() | ||
and not ( | ||
line.strip().startswith("#") | ||
or line.strip().startswith("/") | ||
) | ||
) | ||
lookup[filepath] = line_count | ||
|
||
# If the line rule is voilated then the value is changed to 1 | ||
for filepath, line_count in lookup.items(): | ||
if line_count > args.lines: | ||
errors_found = True | ||
file_count += 1 | ||
if file_count == 1: | ||
print( | ||
""" | ||
LINE COUNT ERROR: Files with excessive lines of code have been found\n""" | ||
) | ||
|
||
print(" Line count: {:>5} File: {}".format(line_count, filepath)) | ||
|
||
# Evaluate and exit | ||
if bool(errors_found) is True: | ||
print( | ||
""" | ||
The {} files listed above have more than {} lines of code. | ||
|
||
Please fix this. It is a pre-requisite for pull request approval. | ||
""".format( | ||
file_count, args.lines | ||
) | ||
) | ||
sys.exit(1) | ||
else: | ||
sys.exit(0) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Address security and maintainability concerns in main function.
Several issues need attention:
-
Potential path traversal vulnerability
-
Hard-coded latin-1 encoding might not work for all files
-
Function is too complex and should be split
-
Fix path traversal vulnerability:
# Define the directories of interest
directories = [
- os.path.expanduser(os.path.join(args.directory, "lib")),
- os.path.expanduser(os.path.join(args.directory, "src")),
- os.path.expanduser(os.path.join(args.directory, "test")),
+ os.path.abspath(os.path.join(args.directory, "lib")),
+ os.path.abspath(os.path.join(args.directory, "src")),
+ os.path.abspath(os.path.join(args.directory, "test")),
]
+ base_dir = os.path.abspath(args.directory)
+ for directory in directories:
+ if not directory.startswith(base_dir):
+ print(f"Error: Directory {directory} is outside base directory")
+ sys.exit(1)
- Handle file encoding properly:
- with open(filepath, encoding="latin-1") as code:
+ try:
+ with open(filepath, encoding="utf-8") as code:
+ line_count = count_lines(code)
+ except UnicodeDecodeError:
+ print(f"Warning: Unable to read {filepath} as UTF-8")
+ try:
+ with open(filepath, encoding="latin-1") as code:
+ line_count = count_lines(code)
+ except UnicodeDecodeError:
+ print(f"Error: Unable to read {filepath}")
+ continue
- Split the function into smaller, focused functions:
def count_lines(file_handle):
"""Count non-empty, non-comment lines in a file."""
return sum(
1
for line in file_handle
if line.strip() and not (
line.strip().startswith("#")
or line.strip().startswith("/")
)
)
def process_file(filepath, args):
"""Process a single file and return its line count."""
try:
with open(filepath, encoding="utf-8") as code:
return count_lines(code)
except UnicodeDecodeError:
print(f"Warning: Unable to read {filepath} as UTF-8")
try:
with open(filepath, encoding="latin-1") as code:
return count_lines(code)
except UnicodeDecodeError:
print(f"Error: Unable to read {filepath}")
return None
def print_errors(errors, args):
"""Print error messages for files exceeding line limit."""
if not errors:
return False
print("\nLINE COUNT ERROR: Files with excessive lines of code have been found\n")
for filepath, line_count in errors.items():
print(f" Line count: {line_count:>5} File: {filepath}")
print(f"\nThe {len(errors)} files listed above have more than {args.lines} lines of code.")
print("\nPlease fix this. It is a pre-requisite for pull request approval.\n")
return True
def _arg_parser_resolver(): | ||
"""Resolve the CLI arguments provided by the user. | ||
|
||
Args: | ||
None | ||
|
||
Returns: | ||
result: Parsed argument object | ||
|
||
""" | ||
# Initialize parser and add the CLI options we should expect | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument( | ||
"--lines", | ||
type=int, | ||
required=False, | ||
default=300, | ||
help="The maximum number of lines of code to accept.", | ||
) | ||
parser.add_argument( | ||
"--directory", | ||
type=str, | ||
required=False, | ||
default=os.getcwd(), | ||
help="The parent directory of files to analyze.", | ||
) | ||
parser.add_argument( | ||
"--exclude_files", | ||
type=str, | ||
required=False, | ||
nargs="*", | ||
default=None, | ||
const=None, | ||
help="""An optional space separated list of \ | ||
files to exclude from the analysis.""", | ||
) | ||
parser.add_argument( | ||
"--exclude_directories", | ||
type=str, | ||
required=False, | ||
nargs="*", | ||
default=None, | ||
const=None, | ||
help="""An optional space separated list of \ | ||
directories to exclude from the analysis.""", | ||
) | ||
|
||
# Return parser | ||
result = parser.parse_args() | ||
return result | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add input validation in _arg_parser_resolver function.
The function should validate that the line count is positive and directories exist.
def _arg_parser_resolver():
# ... docstring ...
parser = argparse.ArgumentParser()
parser.add_argument(
"--lines",
type=int,
required=False,
default=300,
+ help="The maximum number of lines of code to accept (must be positive).",
)
# ... other arguments ...
result = parser.parse_args()
+
+ # Validate arguments
+ if result.lines <= 0:
+ parser.error("--lines must be positive")
+ if not os.path.isdir(result.directory):
+ parser.error(f"Directory not found: {result.directory}")
+
return result
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
def _arg_parser_resolver(): | |
"""Resolve the CLI arguments provided by the user. | |
Args: | |
None | |
Returns: | |
result: Parsed argument object | |
""" | |
# Initialize parser and add the CLI options we should expect | |
parser = argparse.ArgumentParser() | |
parser.add_argument( | |
"--lines", | |
type=int, | |
required=False, | |
default=300, | |
help="The maximum number of lines of code to accept.", | |
) | |
parser.add_argument( | |
"--directory", | |
type=str, | |
required=False, | |
default=os.getcwd(), | |
help="The parent directory of files to analyze.", | |
) | |
parser.add_argument( | |
"--exclude_files", | |
type=str, | |
required=False, | |
nargs="*", | |
default=None, | |
const=None, | |
help="""An optional space separated list of \ | |
files to exclude from the analysis.""", | |
) | |
parser.add_argument( | |
"--exclude_directories", | |
type=str, | |
required=False, | |
nargs="*", | |
default=None, | |
const=None, | |
help="""An optional space separated list of \ | |
directories to exclude from the analysis.""", | |
) | |
# Return parser | |
result = parser.parse_args() | |
return result | |
def _arg_parser_resolver(): | |
"""Resolve the CLI arguments provided by the user. | |
Args: | |
None | |
Returns: | |
result: Parsed argument object | |
""" | |
# Initialize parser and add the CLI options we should expect | |
parser = argparse.ArgumentParser() | |
parser.add_argument( | |
"--lines", | |
type=int, | |
required=False, | |
default=300, | |
help="The maximum number of lines of code to accept (must be positive).", | |
) | |
parser.add_argument( | |
"--directory", | |
type=str, | |
required=False, | |
default=os.getcwd(), | |
help="The parent directory of files to analyze.", | |
) | |
parser.add_argument( | |
"--exclude_files", | |
type=str, | |
required=False, | |
nargs="*", | |
default=None, | |
const=None, | |
help="""An optional space separated list of \ | |
files to exclude from the analysis.""", | |
) | |
parser.add_argument( | |
"--exclude_directories", | |
type=str, | |
required=False, | |
nargs="*", | |
default=None, | |
const=None, | |
help="""An optional space separated list of \ | |
directories to exclude from the analysis.""", | |
) | |
# Return parser | |
result = parser.parse_args() | |
# Validate arguments | |
if result.lines <= 0: | |
parser.error("--lines must be positive") | |
if not os.path.isdir(result.directory): | |
parser.error(f"Directory not found: {result.directory}") | |
return result |
export const createAvatar = jest.fn(() => { | ||
return { | ||
toDataUri: jest.fn(() => 'mocked-data-uri'), | ||
}; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update Jest mocks to Vitest syntax
Since this PR is migrating from Jest to Vitest, we need to update the mocking syntax. While Vitest maintains compatibility with Jest's API, it's recommended to use Vitest's native API for better integration.
Here's how to update the mock implementation:
-export const createAvatar = jest.fn(() => {
+export const createAvatar = vi.fn(() => {
return {
- toDataUri: jest.fn(() => 'mocked-data-uri'),
+ toDataUri: vi.fn(() => 'mocked-data-uri'),
};
});
Also, consider adding type information for better TypeScript support:
import type { Style, Options } from '@dicebear/core';
export const createAvatar = vi.fn(<T extends Style, O extends Options<T>>(
style: T,
options?: O
) => {
return {
toDataUri: vi.fn((): Promise<string> => Promise.resolve('mocked-data-uri')),
};
});
Don't forget to add the following import at the top of the file:
import { vi } from 'vitest';
💡 Codebase verification
Mock implementation needs to be updated to use Vitest
The mock implementation in scripts/__mocks__/@dicebear/core.ts
is still using Jest's jest.fn()
, but the Avatar component's test file (Avatar.spec.tsx
) has been migrated to use Vitest. The mock should be updated to use Vitest's mocking functionality.
- Update
scripts/__mocks__/@dicebear/core.ts
to usevi.fn()
instead ofjest.fn()
🔗 Analysis chain
Verify mock usage in test files
Let's ensure all test files using this mock are updated to use Vitest and the mock is properly configured.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for test files using @dicebear/core and verify Vitest usage
# Find test files that import @dicebear/core
echo "Checking for test files using @dicebear/core..."
rg -l "@dicebear/core" --type ts --type tsx | grep -E "\.test\.|\.spec\."
# Check for any remaining Jest.fn() usage in test files
echo "Checking for remaining Jest.fn() usage..."
rg "jest\.fn\(" --type ts --type tsx
# Verify vitest imports in test files
echo "Checking for proper Vitest imports..."
rg "from ['|\"]vitest['|\"]" --type ts --type tsx
Length of output: 535
Script:
#!/bin/bash
# Let's try without the --type flag since tsx is not recognized
# First, find test files importing @dicebear/core
echo "Test files using @dicebear/core:"
rg -l "@dicebear/core" | grep -E "\.test\.|\.spec\."
# Check for Jest.fn usage
echo -e "\nFiles with Jest.fn usage:"
rg "jest\.fn\("
# Check for vitest imports
echo -e "\nFiles with Vitest imports:"
rg "from ['\"]vitest['\"]"
# List all test files to understand the test setup
echo -e "\nAll test files in the repository:"
fd "\.(test|spec)\.(ts|tsx|js|jsx)$"
Length of output: 56904
Script:
#!/bin/bash
# Let's check for files that import @dicebear/core and their test framework usage
echo "Files importing @dicebear/core:"
rg -l "@dicebear/core"
# Check the content of these files to understand the test framework
echo -e "\nContent of files using @dicebear/core:"
rg -A 5 -B 5 "@dicebear/core"
Length of output: 21704
Script:
#!/bin/bash
# Let's check the test files that might be using the Avatar component
echo "Test files that import Avatar component:"
rg -l "Avatar" | grep -E "\.(test|spec)\.(ts|tsx)$"
# Check content of Avatar test files
echo -e "\nContent of Avatar test files:"
rg -A 10 -B 10 "Avatar" "src/components/Avatar/Avatar.spec.tsx" "src/components/Avatar/Avatar.test.tsx" 2>/dev/null
# Check if there are any other test files using createAvatar
echo -e "\nFiles using createAvatar:"
rg "createAvatar"
Length of output: 6735
This PR has too many submitted files that are out of scope of the original issue. Please ensure the following:
Closing |
What kind of change does this PR introduce?
refactoring
Issue Number: #2484
Fixes ##2484
Did you add tests for your changes?
Vitest test passed 👍:
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
README.md
and addedINSTALLATION.md
for clearer setup instructions.CODE_STYLE.md
andISSUE_GUIDELINES.md
for better contribution guidelines.Chores
.gitignore
to exclude additional files and directories.