Skip to content
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

Bump eslint-plugin-sonarjs from 1.0.4 to 3.0.1 #974

Merged
merged 2 commits into from
Jan 4, 2025

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 1, 2025

Bumps eslint-plugin-sonarjs from 1.0.4 to 3.0.1.

Release notes

Sourced from eslint-plugin-sonarjs's releases.

SonarJS 3.0 "Kill The Noise" RC1

Hi,

We are glad to finally go for the release of the new major version of SonarJS: 3.0.

The main goal of this version was to increase the value of the analyzer by reducing the noise it makes, so in release notes you can see plenty of false-positives fixed as well as rule and engine improvements.

Moreover the default rule profile "Sonar way" was changed to retain only those rules that are useful for the largest possible number of JS developers. To complement the now minimalist "Sonar way" profile we created a new predefined profile "Sonar way Recommended" which will help you to maintain your JavaScript projects on the long term.

Finally, we took the opportunity of releasing a major version to update the custom rules API (see docs).

Release notes: https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10933&version=13050

Release Candidate: https://github.com/SonarSource/sonar-javascript/releases/tag/3.0-RC1

Any feedback is highly welcome as usual!

Feedback period is open until Wednesday April 26.

P.S. FYI since next version we will start tracking issues on GitHub, so don't hesitate if you find some bug or have a good idea for a new feature!

SonarJS 2.21 RC1

SNAPSHOT version of the plugin to allow users to test SonarJS during the request for feedback for the release 2.21.

We took the first steps in cross-procedural data flow analysis (also known as symbolic execution) and improved it to reduce false positives and false negatives.

Release notes: https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10933&version=13693

SonarJS 2.20 RC2

RC2 fixes bug SONARJS-900


SNAPSHOT version of the plugin to allow users to test SonarJS during the request for feedback for the release 2.20.

We introduced 8 new rules, among them we have :

  • Cognitive Complexity of functions should not be too high
  • Non-existent variables should not be referenced (requires configuration at project level)

Release notes: http://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10933&version=13651

SonarJS 2.20 RC1

SNAPSHOT version of the plugin to allow users to test SonarJS during the request for feedback for the release 2.20.

We introduced 8 new rules, among them we have :

  • Cognitive Complexity of functions should not be too high
  • Non-existent variables should not be referenced (requires configuration at project level)

Release notes: http://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10933&version=13651

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Summary by CodeRabbit

Release Notes

  • Chores

    • Updated ESLint configuration to adjust linting rules
    • Upgraded eslint-plugin-sonarjs dependency to version 3.0.1
  • Refactor

    • Improved code iteration in basic_sensors.ts by replacing forEach with for...of loop
    • Enhanced device availability handling in platform.ts with more robust payload parsing
  • Documentation

    • Minor adjustments to documentation generation logic in docgen.ts

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jan 1, 2025
Copy link

coderabbitai bot commented Jan 1, 2025

Walkthrough

This pull request introduces several modifications across different files in the Homebridge Zigbee2MQTT project. The changes include updating the ESLint configuration to disable specific SonarJS rules, upgrading the eslint-plugin-sonarjs dependency, refactoring iteration methods in sensor converters, adjusting error handling in documentation generation, and enhancing device availability detection logic in the platform implementation.

Changes

File Change Summary
eslint.config.mjs - Added 'sonarjs/todo-tag': ['off'] rule
- Added 'sonarjs/no-nested-functions': ['off'] rule for test files
package.json - Updated eslint-plugin-sonarjs from ^1.0.4 to ^3.0.1
src/converters/basic_sensors.ts - Replaced forEach loop with for...of loop in createServicesFromExposes method
src/docgen/docgen.ts - Updated error handling to catch generic error object
- Modified regular expression in generateZigbee2MqttLink
- Added ESLint directives
src/platform.ts - Enhanced handleDeviceAvailability method logic
- Improved payload parsing and availability detection

Sequence Diagram

sequenceDiagram
    participant Platform as Zigbee2mqttPlatform
    participant Payload as Device Payload
    
    Platform->>Payload: Receive device state
    alt JSON Payload
        Platform->>Payload: Parse availability state
    else String Payload
        Platform->>Payload: Check if 'online'
    end
    Platform->>Platform: Update device availability
Loading

Possibly related PRs

Poem

🐰 Linting rules dance, a playful tune,
Sensors hop, code leaps to the moon!
Configs tweaked with rabbit's delight,
Zigbee magic takes its flight! 🌟
Refactored paths, smooth and bright! 🚀


📜 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 9c8e84f and 190fc98.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • eslint.config.mjs (1 hunks)
  • package.json (1 hunks)
  • src/converters/basic_sensors.ts (1 hunks)
  • src/docgen/docgen.ts (3 hunks)
  • src/platform.ts (1 hunks)

🪧 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.

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/eslint-plugin-sonarjs-3.0.1 branch 2 times, most recently from 179cf03 to 970dc72 Compare January 1, 2025 06:40
@itavero
Copy link
Owner

itavero commented Jan 4, 2025

@dependabot rebase

Bumps [eslint-plugin-sonarjs](https://github.com/SonarSource/SonarJS) from 1.0.4 to 3.0.1.
- [Release notes](https://github.com/SonarSource/SonarJS/releases)
- [Commits](https://github.com/SonarSource/SonarJS/commits)

---
updated-dependencies:
- dependency-name: eslint-plugin-sonarjs
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/eslint-plugin-sonarjs-3.0.1 branch from 970dc72 to f318e83 Compare January 4, 2025 20:46
@itavero
Copy link
Owner

itavero commented Jan 4, 2025

@coderabbitai review

Copy link

coderabbitai bot commented Jan 4, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

github-actions bot commented Jan 4, 2025

🆗 Published SonarCloud and code coverage data.

@itavero itavero merged commit 662a6e9 into master Jan 4, 2025
4 checks passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/eslint-plugin-sonarjs-3.0.1 branch January 4, 2025 21:05
@itavero
Copy link
Owner

itavero commented Jan 4, 2025

🚀 This pull request is included in v1.11.0-beta.7. See Release 1.11.0-beta.7 for release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant