Skip to content

Fix ESLint issues#773

Merged
VampireChicken12 merged 2 commits into
YouTube-Enhancer:devfrom
dnicolson:fix-linting
Feb 11, 2025
Merged

Fix ESLint issues#773
VampireChicken12 merged 2 commits into
YouTube-Enhancer:devfrom
dnicolson:fix-linting

Conversation

@dnicolson
Copy link
Copy Markdown
Contributor

@dnicolson dnicolson commented Feb 10, 2025

This changes the Prettier line endings and the prettier commands have also been removed because of ESLint.

Summary by CodeRabbit

  • New Features

    • Introduced new settings options that let users control ambient mode behavior and manage playlist recommendations on the home page.
    • Expanded the settings interface to include options for playlist length display and entering an external API key.
    • Enhanced localization with updated translations and additional language support for key user-facing features.
    • Added visual improvements, such as a new screenshot function and refined playback speed controls.
  • Chores

    • Upgraded dependencies and streamlined build and configuration processes to boost overall stability and performance.
  • Bug Fixes

    • Improved user input handling and UI responsiveness for a smoother interactive experience.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 10, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request spans a wide range of improvements across configuration, localization, types, components, feature modules, and utilities. The updates remove Prettier tasks from build commands and upgrade dependencies in build scripts and ESLint configurations. Numerous localization files now include additional settings (such as automatically disabling ambient mode and hiding playlist recommendations) with updated translations. Several feature modules introduce new asynchronous functions to manage ambient mode, closed captions, and playlist visibility, while various components and utilities have been refactored and reordered for improved clarity and consistency.

Changes

File(s) Change Summary
nodemon.json, package.json Removed Prettier formatting tasks from exec/build commands; simplified build scripts; updated dependency versions (e.g. React, i18next, TypeScript, etc.) and introduced new dependencies.
prettier.config.cjs Changed endOfLine from "crlf" to "lf".
public/locales/* Added new settings (automaticallyDisableAmbientMode, playlistRemover) and updated translations across multiple locale JSON files.
public/locales/en-US.json.d.ts Converted interface to type alias (En-US); reformatted properties and updated export statements.
src/i18n/constants.ts Updated availableLocales formatting and adjusted locale percentage values.
src/types/index.ts Modified union type ordering; added new message types for ambient mode and closed captions; re-added and introduced configuration flags for hiding official artist videos and playlist recommendations.
src/utils/utilities.ts and other utility files Reordered type imports; refined error handling; adjusted import orders across various utility modules.
.all-contributorsrc, README.md Updated contributor list, repository URL, and added new contributor entries.
eslint.config.mjs Restructured ESLint configuration by adding new plugins (React, React Hooks, TailwindCSS) and refining rule settings.
src/components/Inputs/*, src/components/Settings/* Reordered imports, updated event handlers (e.g. direct input change with cursor restoration in TextInput), and restructured settings interface with new sections for playlist length and YouTube API key.
src/features/* Introduced and modified multiple feature modules:
Ambient mode & Closed Captions: New async functions to enable/disable ambient mode and closed captions.
Playlist & Button Features: Added functionality for hiding playlist recommendations, reordering cases in button placement, and enhanced playback speed controls.
Other features: Adjustments for loop buttons, remaining time displays, and on-screen display rendering.
src/global.d.ts, src/hooks/*, src/i18n/index.ts, src/pages/* Minor import reordering and type declaration adjustments for consistency.
src/utils/* (including CSS and plugin utilities) Updated CSS rules (e.g. version bump in deepDarkMaterialCSS.ts to 4.3.4 with new selectors), restructured default configuration schema, and removed unused imports (e.g. statSync).

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant A as AmbientModeFeature
  participant C as Configuration Service
  participant D as DOM

  U->>A: Page loads
  A->>C: Retrieve ambient mode setting
  C-->>A: Return: enabled/disabled
  A->>D: Wait for settings button/menu
  D-->>A: Return settings panel
  alt Ambient mode is enabled
     A->>D: Simulate click to disable ambient mode
     D-->>A: Ambient mode disabled
  else Ambient mode already disabled
     A-->>U: No action needed
  end
Loading
sequenceDiagram
  participant U as User
  participant P as PlaylistRecFeature
  participant C as Configuration
  participant D as DOM

  U->>P: Page loads
  P->>C: Check "hidePlaylistRecommendations" option
  C-->>P: Option enabled/disabled
  alt Option enabled
     P->>D: Observe for recommendation elements
     D-->>P: New recommendation node detected
     P->>D: Hide recommendation element
     D-->>P: Element hidden
  else
     P-->>U: Recommendations remain visible
  end
Loading

Possibly related PRs

  • feat: Hide recommended playlist on homepage. #593 #727: Introduces functionality to hide playlist recommendations on the homepage and updates dependency configurations, which is directly related to the changes in build scripts and new settings for playlist visibility in this PR.

Poem

In a burrow deep beneath the code,
I hop with glee down every new node.
Ambient modes now gently switch,
And playlists vanish without a glitch.
With bugs dispersed and features bright,
I’m a rabbit celebrating code in flight!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot]

This comment was marked as outdated.

@VampireChicken12
Copy link
Copy Markdown
Member

@dnicolson Changes are made to dev then merged to main sorry for not having a contributing guide; I've been busy and haven't been able to work on stuff.

@dnicolson dnicolson closed this Feb 10, 2025
@dnicolson dnicolson reopened this Feb 11, 2025
@dnicolson dnicolson changed the base branch from main to dev February 11, 2025 20:15
@VampireChicken12 VampireChicken12 merged commit 6c96e76 into YouTube-Enhancer:dev Feb 11, 2025
VampireChicken12 added a commit that referenced this pull request Apr 5, 2025
This change conflicts with other branches that are in progress
@coderabbitai coderabbitai Bot mentioned this pull request Sep 25, 2025
Merged
This was referenced Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done - Released

Development

Successfully merging this pull request may close these issues.

2 participants