fossasia / eventyay-video

https://video-dev.eventyay.com
Apache License 2.0
1.49k stars 22 forks source link

Fix code style and linting errors #223

Closed untari closed 3 weeks ago

untari commented 1 month ago

This PR contributes to resolving issues: Tests: Fix isort, flake8 code style, Postgres and Python tests

The changes ensure that the code adheres to the project's style guidelines, improving overall code quality and maintainability.

Testing:

Summary by Sourcery

Fix code style and linting errors across the project to improve code quality and maintainability.

Enhancements:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request focuses on improving code style and fixing linting errors across multiple files in the project. The changes primarily involve formatting adjustments, variable renaming for consistency, and minor syntax improvements to adhere to the project's style guidelines. Key modifications include:

  1. Consistent use of single quotes for strings
  2. Proper indentation and spacing
  3. Renaming variables to follow camelCase convention
  4. Removing unnecessary semicolons
  5. Reorganizing import statements
  6. Fixing minor syntax issues

These changes aim to enhance code readability, maintainability, and consistency throughout the codebase.

File-Level Changes

Files Changes
webapp/src/views/schedule/sessions/index.vue
webapp/src/views/schedule/export-select.vue
webapp/src/lib/quill/mention.js
webapp/src/lib/quill/emoji.js
webapp/config.js
Replaced double quotes with single quotes for string literals
webapp/src/views/schedule/sessions/index.vue
webapp/src/views/schedule/export-select.vue
webapp/src/lib/quill/mention.js
webapp/src/lib/profile.js
webapp/src/views/admin/rooms/types-edit/stage.vue
Adjusted indentation and spacing for improved readability
webapp/src/views/schedule/index.vue
webapp/src/components/MediaSource.vue
Renamed variables to follow camelCase convention (e.g., 'language_track' to 'languageTrack')
webapp/src/views/schedule/index.vue
webapp/src/components/MediaSource.vue
webapp/src/views/schedule/schedule-components/Session.vue
Removed unnecessary semicolons at the end of statements
webapp/src/views/rooms/item.vue
webapp/src/main.js
Reorganized and formatted import statements
webapp/src/theme.js
webapp/src/store/index.js
webapp/vue.config.js
Fixed minor syntax issues and improved code structure
webapp/src/views/schedule/talks/item.vue
server/venueless/importers/conftool.py
Ensured consistent naming of function parameters across files
webapp/src/components/janus/JanusConference.vue
webapp/src/components/janus/JanusVideoroom.vue
webapp/src/locales/index.js
Removed trailing whitespace and added newline at end of file

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
hongquan commented 1 month ago

Please revert all the changes that adds whitespace between function name and (.

untari commented 4 weeks ago

Hi @hongquan, I double-checked the upstream code, and it also uses a space between the function name and the parameters (). According to the ESLint documentation, I could adjust the rules to remove the space, but I want to clarify this with both the upstream code and the ESLint documentation. Currently, if I remove the space, it won't pass the ESLint checks.

untari commented 4 weeks ago

fix tests it's to resolve flake8

hongquan commented 3 weeks ago

@untari Could you help adjust ESLint configuration, removing "space-before-function-paren" rule? Our JS code primarily targets VueJS, and we should follow VueJS style (no space between function name and "(", no semicolon at the end of line etc.).

Later on, I plan to use these tools for linting:

untari commented 3 weeks ago

alright will do! thanks

On Sat, Aug 17, 2024, 11:30 AM Nguyễn Hồng Quân @.***> wrote:

@untari https://github.com/untari Could you help adjust ESLint configuration, removing "space-before-function-paren" rule? Our JS code primarily targets VueJS, and we should follow VueJS style (no space between function name and "(", no semicolon at the end of line etc.).

Later on, I plan to use these tools for linting:

— Reply to this email directly, view it on GitHub https://github.com/fossasia/eventyay-video/pull/223#issuecomment-2294606381, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWSXNFHCPKM335KGKNTA43ZR27T7AVCNFSM6AAAAABMNUU2SSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJUGYYDMMZYGE . You are receiving this because you were mentioned.Message ID: @.***>

untari commented 3 weeks ago

Hi @mariobehling @hongquan could you review the latest changes for flake8, black, isort and lint. These tests are passed. If there is no further feedback, please merge this. So I don't have to keep fixing the new code that's not following the style guide and start to enforcing to use lint, flake8 isort and black tests. Thanks