Skip to content

fix(lint): Lock eslint-config-yscope at 0.0.32 to avoid lint failures caused by newer versions.#661

Merged
junhaoliao merged 5 commits into
y-scope:mainfrom
junhaoliao:fix-lint
Jan 13, 2025
Merged

fix(lint): Lock eslint-config-yscope at 0.0.32 to avoid lint failures caused by newer versions.#661
junhaoliao merged 5 commits into
y-scope:mainfrom
junhaoliao:fix-lint

Conversation

@junhaoliao

@junhaoliao junhaoliao commented Jan 13, 2025

Copy link
Copy Markdown
Member

Description

  1. Lock eslint-config-yscope at 0.0.32 to fix lint failures
    1. components/log-viewer-webui/client/package-lock.json
    2. components/log-viewer-webui/server/package-lock.json
    3. components/webui/linter/package.json
  2. Remove git-ignore for components/webui/linter/package-lock.json and add the file to VCS.
  3. Update sources list in task linter-node-modules.

Validation performed

  1. Ran task lint:check and observed no failure.
  2. Made a violation in components/webui/client/main.jsx, ran task lint:check and observed error
    > lint:check
    > npx eslint --no-eslintrc --config package.json ../client ../imports ../server ../tests ../launcher.js
    
    
    /home/junhao/workspace/clp/components/webui/client/main.jsx
      16:20  error  Multiple spaces found before 'history'  @stylistic/js/no-multi-spaces
    
  3. Ran task lint:fix and observed no failure.
  4. Ran task lint:check and and observed no failure.

Summary by CodeRabbit

Release Notes

  • Chores

    • Updated dependency installation process to use npm clean-install for more consistent package management
    • Updated linting configuration and scripts
    • Modified .gitignore to track package-lock.json for the linter
  • Dependency Updates

    • Updated eslint-config-yscope to version 0.0.32

These changes improve project dependency management and linting consistency across the development environment.

@coderabbitai

coderabbitai Bot commented Jan 13, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

The pull request introduces several changes across different components of a web application. These modifications primarily focus on dependency management, linting processes, and version control configurations. The changes involve updating npm installation methods to use clean-install, adjusting linting scripts, modifying .gitignore settings, and updating dependency versions. The modifications aim to improve consistency in package management and linting procedures across the project's components.

Changes

File Change Summary
components/log-viewer-webui/package.json Replaced npm i with npm clean-install for root, client, and server directories
components/webui/.gitignore Removed ignore rule for linter/package-lock.json
components/webui/linter/package.json - Modified lint:fix script to use lint:check with --fix
- Updated eslint-config-yscope to version 0.0.32
lint-tasks.yml - Changed package.json path from relative to absolute
- Added package-lock.json to sources
- Replaced npm update with npm clean-install

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant NPM as npm
    participant Linter as Project Linter

    Dev->>NPM: npm clean-install
    NPM-->>Dev: Clean dependency installation
    Dev->>Linter: Run lint:check
    Linter-->>Dev: Linting results
    Dev->>Linter: Apply --fix
    Linter-->>Dev: Fixed code
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9408e04 and 2dbf686.

📒 Files selected for processing (1)
  • components/log-viewer-webui/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/log-viewer-webui/package.json
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build (macos-latest)
  • GitHub Check: lint-check (ubuntu-latest)
  • GitHub Check: lint-check (macos-latest)

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.

@junhaoliao junhaoliao changed the title fix(lint): Lock eslint-config-yscope at 0.0.32 to fix lint failures. fix(lint): Lock eslint-config-yscope at 0.0.32 to fix lint failures caused by a newer version of eslint-config-yscope. Jan 13, 2025
@junhaoliao junhaoliao changed the title fix(lint): Lock eslint-config-yscope at 0.0.32 to fix lint failures caused by a newer version of eslint-config-yscope. fix(lint): Lock eslint-config-yscope at 0.0.32 to avoid lint failures caused by newer versions. Jan 13, 2025
"client:lint:fix": "cd client && npm run lint:fix",
"client:start": "cd client && npm start",
"init": "npm i && (cd client && npm i) && (cd server && npm i)",
"init": "npm ci && (cd client && npm ci) && (cd server && npm ci)",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not mandatory, but to follow our conventions, shall we use the long-form command name (clean-install)?

Comment thread Taskfile.yml Outdated
- |-
cd "{{.OUTPUT_DIR}}/var/www/log_viewer_webui/server"
PATH="{{.G_NODEJS_22_BIN_DIR}}":$PATH npm clean-install
PATH="{{.G_NODEJS_22_BIN_DIR}}":$PATH npm install

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not clean-install?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, i meant not to make everything "clean-install" in this PR since not all are directly related to lint, but reverted the wrong line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants