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

chore(deps): update dependencies #193

Merged
merged 1 commit into from
Aug 4, 2024
Merged

chore(deps): update dependencies #193

merged 1 commit into from
Aug 4, 2024

Conversation

mheob
Copy link
Owner

@mheob mheob commented Aug 4, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a new Markdown document for improved documentation.
    • Added a new ESLint rule to enhance type safety in JavaScript.
    • Enhanced flexibility in ESLint configurations, particularly for React files and Unicorn rules.
  • Bug Fixes

    • Updated various development dependencies to their latest versions for improved stability and features.
  • Documentation

    • Improved comments and descriptions across multiple configurations to enhance clarity for developers.
  • Refactor

    • Streamlined various functions and parameter names for better readability and consistency.
  • Style

    • Adjusted code style for better clarity (e.g., replacing double negation with Boolean for readability).
  • Chores

    • Updated project configuration files to restrict Node.js version and adjust package managers.

@mheob mheob added the dependencies Pull requests that update a dependency file label Aug 4, 2024
Copy link

vercel bot commented Aug 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eslint-config ❌ Failed (Inspect) Aug 4, 2024 5:36pm

Copy link

changeset-bot bot commented Aug 4, 2024

🦋 Changeset detected

Latest commit: 85e78a3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

coderabbitai bot commented Aug 4, 2024

Walkthrough

This update introduces a range of enhancements across various configuration files and scripts. Key changes include newly defined dependencies, refined ESLint configurations, and clearer type definitions. The addition of the five-planets-hope.md file enriches documentation, while updates to package versions ensure compatibility with the latest tools. Overall, the modifications improve maintainability, readability, and functionality within the codebase.

Changes

Files Changes Summary
.five-planets-hope.md New Markdown document created with YAML front matter for documentation purposes.
.husky/post-merge Simplified hasChanged function for improved readability without changing functionality.
.nvmrc Updated Node.js version from lts/* to 20 for specific environment control.
package.json, packages/commitlint-config/package.json, packages/eslint-config/package.json, packages/prettier-config/package.json Version upgrades for multiple development dependencies to enhance functionality and stability.
packages/eslint-config/src/configs/* Various ESLint rule modifications and enhancements to improve coding standards, including new rules and adjustments to existing ones for better clarity and maintainability.
packages/eslint-config/src/factory.ts Enhanced configuration capabilities with added optional parameters and refined logic.
packages/eslint-config/src/utils/* Added utility functions for array handling and improved documentation for existing functions.
turbo.json Renamed the key from "pipeline" to "tasks" for clearer task organization in the Turbo configuration.

Poem

In the garden of code, changes bloom bright,
With each little fix, we take flight.
Dependencies upgrade, rules finely tuned,
A dance of logic, where errors are pruned.
So hop with delight, let’s celebrate this spree,
For a world of clean code, as sweet as can be! 🐇✨


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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.

Copy link
Contributor

github-actions bot commented Aug 4, 2024

Preparing PR description...

Copy link

sonarcloud bot commented Aug 4, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
5.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Copy link
Contributor

github-actions bot commented Aug 4, 2024

Preparing review...

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Outside diff range, codebase verification and nitpick comments (1)
packages/eslint-config/src/configs/imports.ts (1)

24-24: Invalid reason for disabling 'import/order' rule

The 'import/order' rule has been disabled with the comment that it conflicts with 'perfectionist/sort-imports'. However, the 'perfectionist/sort-imports' rule is not found in the repository, making the reason invalid.

  • File: packages/eslint-config/src/configs/imports.ts
  • Line: 24
Analysis chain

Verify the reason for disabling the import order rule.

The rule for 'import/order' has been changed from 'error' to 'off', likely due to a conflict with perfectionist/sort-imports. Ensure that this change does not lead to inconsistencies in the import order.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the reason for disabling the import order rule.

# Test: Check for the presence of `perfectionist/sort-imports` rule.
# Expect: The `perfectionist/sort-imports` rule is present and correctly configured.

# Check for the presence of the `perfectionist/sort-imports` rule in the ESLint config
rg --type js 'perfectionist/sort-imports' packages/eslint-config/src/configs/imports.ts

Length of output: 181


Script:

#!/bin/bash
# Description: Verify the presence and configuration of the `perfectionist/sort-imports` rule.

# Check for the presence and configuration of the `perfectionist/sort-imports` rule in the ESLint config
rg --type js 'perfectionist/sort-imports' packages/eslint-config/src/configs/imports.ts -A 5

Length of output: 293


Script:

#!/bin/bash
# Description: Verify the presence and configuration of the `perfectionist/sort-imports` rule across the entire repository.

# Check for the presence and configuration of the `perfectionist/sort-imports` rule in the ESLint config files
rg --type js 'perfectionist/sort-imports'

Length of output: 41

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 876d93f and 85e78a3.

Files ignored due to path filters (1)
  • bun.lockb is excluded by !**/bun.lockb
Files selected for processing (21)
  • .changeset/five-planets-hope.md (1 hunks)
  • .husky/post-merge (1 hunks)
  • .nvmrc (1 hunks)
  • package.json (1 hunks)
  • packages/commitlint-config/package.json (1 hunks)
  • packages/eslint-config/package.json (1 hunks)
  • packages/eslint-config/src/configs/imports.ts (1 hunks)
  • packages/eslint-config/src/configs/javascript.ts (1 hunks)
  • packages/eslint-config/src/configs/markdown.ts (3 hunks)
  • packages/eslint-config/src/configs/perfectionist.ts (2 hunks)
  • packages/eslint-config/src/configs/react.ts (1 hunks)
  • packages/eslint-config/src/configs/svelte.ts (2 hunks)
  • packages/eslint-config/src/configs/typescript.ts (5 hunks)
  • packages/eslint-config/src/configs/unicorn.ts (1 hunks)
  • packages/eslint-config/src/factory.ts (6 hunks)
  • packages/eslint-config/src/index.ts (1 hunks)
  • packages/eslint-config/src/types.ts (12 hunks)
  • packages/eslint-config/src/utils/array.ts (2 hunks)
  • packages/eslint-config/src/utils/package.ts (3 hunks)
  • packages/prettier-config/package.json (1 hunks)
  • turbo.json (1 hunks)
Files skipped from review due to trivial changes (7)
  • .changeset/five-planets-hope.md
  • .husky/post-merge
  • package.json
  • packages/commitlint-config/package.json
  • packages/eslint-config/src/configs/react.ts
  • packages/eslint-config/src/index.ts
  • packages/prettier-config/package.json
Additional context used
GitHub Check: CodeFactor
packages/eslint-config/src/factory.ts

[warning] 85-85: packages/eslint-config/src/factory.ts#L85
Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)


[warning] 85-85: packages/eslint-config/src/factory.ts#L85
Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)


[warning] 208-208: packages/eslint-config/src/factory.ts#L208
Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)

Additional comments not posted (64)
.nvmrc (1)

1-1: Verify compatibility with Node.js version 20.

The change from lts/* to 20 enforces the use of Node.js version 20. Ensure that the codebase is compatible with this specific version and that all dependencies and features work as expected.

turbo.json (1)

3-3: Verify the new task structure.

The key "pipeline" has been changed to "tasks". Ensure that the new structure is correctly implemented and that all tasks are properly defined and executed.

Verification successful

The new task structure has been correctly implemented. The turbo.json file contains a properly defined "tasks" key with several tasks ("build", "clean", "lint", and "typegen") each having their respective configurations.

  • The key "pipeline" has been successfully changed to "tasks".
  • All tasks are properly defined within the "tasks" key.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new task structure in turbo.json.

# Test: Check for the presence of the new "tasks" key.
# Expect: The "tasks" key is present and correctly defined.

# Check for the new key in turbo.json
rg --type json '"tasks":\s*{' turbo.json

# Check for the presence of tasks within the "tasks" key
rg --type json '"tasks":\s*{\s*".*":\s*{' turbo.json

Length of output: 304


Script:

#!/bin/bash
# Description: Verify the new task structure in turbo.json.

# Test: Check for the presence of the new "tasks" key.
# Expect: The "tasks" key is present and correctly defined.

# Check for the new key in turbo.json
rg --type json '"tasks"\s*:\s*\{' turbo.json

# Check for the presence of tasks within the "tasks" key
rg --type json '"tasks"\s*:\s*\{\s*".*"\s*:\s*\{' turbo.json

Length of output: 121


Script:

#!/bin/bash
# Description: Verify the new task structure in turbo.json.

# Test: Check for the presence of task definitions within the "tasks" key.
# Expect: The "tasks" key contains properly defined tasks.

# Check for the presence of tasks within the "tasks" key
rg --type json '"tasks"\s*:\s*\{\s*".*"\s*:\s*\{' turbo.json -A 5

Length of output: 67


Script:

#!/bin/bash
# Description: Output the contents of turbo.json for direct inspection.

# Output the contents of turbo.json
cat turbo.json

Length of output: 261

packages/eslint-config/src/utils/array.ts (3)

4-11: LGTM! Documentation improvements enhance clarity.

The updated documentation clearly explains the purpose and behavior of the combine function.


20-28: LGTM! New utility function toArray enhances functionality.

The toArray function ensures values are consistently handled as arrays.


Line range hint 12-15:
LGTM! Explicit return type improves type safety.

The function signature now explicitly states the return type as Promise<TypedFlatConfigItem[]>.

Ensure that all function calls to combine match the new signature.

Verification successful

Verified: All function calls to combine match the new signature with the explicit return type Promise<TypedFlatConfigItem[]>.

  • packages/eslint-config/scripts/typegen.ts: The function call to combine is consistent with the expected types.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `combine` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type ts -A 5 $'combine'

Length of output: 1280


Script:

#!/bin/bash
# Extract the full context of the `combine` function call in `packages/eslint-config/scripts/typegen.ts`
rg --type ts -A 10 -B 2 'const configs = await combine(' packages/eslint-config/scripts/typegen.ts

Length of output: 211


Script:

#!/bin/bash
# Extract the full context of the `combine` function call in `packages/eslint-config/scripts/typegen.ts`
rg --type ts -A 15 -B 5 'const configs = await combine\(' packages/eslint-config/scripts/typegen.ts

Length of output: 400

packages/eslint-config/src/configs/unicorn.ts (4)

2-5: LGTM! Updated function signature enhances flexibility.

The unicorn function now accepts an optional options parameter for more flexible configuration.


9-13: LGTM! Dynamic rule configuration improves maintainability.

The function now incorporates rules from pluginUnicorn.configs['flat/recommended'] and allows for overrides.


14-31: LGTM! Specific rule configurations enhance customization.

The specific rules such as disabling unicorn/no-array-reduce, unicorn/no-negated-condition, and unicorn/no-null, and the detailed configuration for prevent-abbreviations enhance customization.


36-48: LGTM! New configuration object for React files improves linting.

The new configuration object for React files specifies different rules for .jsx and .tsx files, improving the overall linting process for React components.

packages/eslint-config/src/configs/perfectionist.ts (2)

22-25: LGTM! Updated rule improves sorting behavior.

The updated rule for perfectionist/sort-array-includes changes the sorting behavior to emphasize the order of literal values.


50-50: LGTM! Refined naming convention enhances consistency.

The key for the internal pattern rule has been changed to internalPattern, enhancing consistency in naming conventions.

packages/eslint-config/src/configs/svelte.ts (2)

52-52: Improved regex handling with String.raw.

The use of String.raw for the varsIgnorePattern improves the readability and correctness of the regex pattern. This ensures that special characters are handled properly.


84-84: Improved regex handling with String.raw.

The use of String.raw for the varsIgnorePattern improves the readability and correctness of the regex pattern. This ensures that special characters are handled properly.

packages/eslint-config/src/configs/markdown.ts (5)

5-5: Improved type naming for clarity.

Renaming OptionsComponentExts to OptionsComponentExtensions improves readability and clarity in the codebase.


13-13: Updated function parameter type.

The function parameter type has been updated to use the new OptionsComponentExtensions type, reflecting the improved naming convention.


16-16: Renamed destructured property for clarity.

The destructured property componentExts has been renamed to componentExtensions, improving clarity and consistency.


48-51: Enhanced file pattern mapping.

The file pattern mapping now uses the renamed componentExtensions variable, improving readability and maintainability.


75-101: Enhanced TypeScript rules configuration.

The added and modified TypeScript rules enhance type safety and control over TypeScript's behavior in the linting process. Flattening the rules provides better visibility and easier management.

packages/eslint-config/src/utils/package.ts (6)

2-2: Streamlined import statement.

Changing the import statement to use a default import of nodePath improves consistency and clarity.


9-11: Added JSDoc comment for paths property.

The JSDoc comment provides clearer documentation for the optional paths property in the PackageResolvingOptions interface.


30-30: Consistent naming for win32.normalize.

Using nodePath.win32.normalize aligns with the updated import statement and maintains consistency.


53-59: Improved documentation for existsPackage function.

The JSDoc comment enhances the documentation for the existsPackage function, making it easier for developers to understand its purpose and usage.


64-72: New interopDefault function with comprehensive documentation.

The interopDefault function handles default exports from modules and includes a detailed JSDoc comment, improving usability and documentation.


80-89: New ensurePackages function with comprehensive documentation.

The ensurePackages function ensures specified packages are installed and includes a detailed JSDoc comment, enhancing functionality and documentation.

packages/eslint-config/package.json (18)

41-42: Verify compatibility with TypeScript ESLint plugins.

Ensure that the updates to @typescript-eslint/eslint-plugin and @typescript-eslint/parser are compatible with your TypeScript version and other ESLint plugins.


69-71: Verify compatibility with svelte, svelte-eslint-parser, and toml-eslint-parser.

Ensure that the updates to svelte, svelte-eslint-parser, and toml-eslint-parser are compatible with your existing ESLint configuration.


44-44: Verify compatibility with eslint-config-next.

Ensure that the update to eslint-config-next is compatible with your Next.js version and other ESLint configurations.


96-105: Ensure compatibility with peer dependencies.

Verify that the updates to peer dependencies do not introduce breaking changes.


48-48: Verify compatibility with eslint-plugin-antfu.

Ensure that the update to eslint-plugin-antfu is compatible with your existing ESLint configuration.


85-87: Verify compatibility with eslint-plugin-svelte, eslint-typegen, and prettier.

Ensure that the updates to eslint-plugin-svelte, eslint-typegen, and prettier are compatible with your existing ESLint configuration.


64-66: Ensure compatibility with globals, jsonc-eslint-parser, and mlly.

Verify that the updates to globals, jsonc-eslint-parser, and mlly do not introduce breaking changes.


88-90: Ensure compatibility with prettier-plugin-astro, rimraf, and svelte-eslint-parser.

Verify that the updates to prettier-plugin-astro, rimraf, and svelte-eslint-parser do not introduce breaking changes.


51-52: Ensure compatibility with eslint-plugin-import-x and eslint-plugin-jsdoc.

Verify that the updates to eslint-plugin-import-x and eslint-plugin-jsdoc do not introduce breaking changes.


76-77: Ensure compatibility with @eslint-react/eslint-plugin and @eslint/config-inspector.

Verify that the updates to @eslint-react/eslint-plugin and @eslint/config-inspector do not introduce breaking changes.


43-43: Ensure compatibility with eslint-config-flat-gitignore.

Verify that the update to eslint-config-flat-gitignore does not introduce breaking changes.


54-55: Verify compatibility with eslint-plugin-markdown and eslint-plugin-n.

Ensure that the updates to eslint-plugin-markdown and eslint-plugin-n are compatible with your existing ESLint configuration.

Verification successful

Compatibility Verified for eslint-plugin-markdown and eslint-plugin-n.

The updates to eslint-plugin-markdown and eslint-plugin-n are compatible with the existing ESLint configuration.

  • eslint-plugin-markdown is correctly configured in packages/eslint-config/src/configs/markdown.ts.
  • eslint-plugin-n is correctly referenced and imported in packages/eslint-config/src/typegen.d.ts and packages/eslint-config/src/plugins.ts.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify compatibility of eslint-plugin-markdown and eslint-plugin-n.

# Test: Check for any compatibility issues. Expect: No issues.
npm ls eslint-plugin-markdown eslint-plugin-n

Length of output: 118


Script:

#!/bin/bash
# Search for configurations related to eslint-plugin-markdown in ESLint configuration files
fd -e json -e js -e yaml -e yml -e cjs -e mjs -e ts -e coffee --exec grep -H "eslint-plugin-markdown" {} \;

Length of output: 433


Script:

#!/bin/bash
# Search for configurations related to eslint-plugin-n in ESLint configuration files
fd -e json -e js -e yaml -e yml -e cjs -e mjs -e ts -e coffee --exec grep -H "eslint-plugin-n" {} \;

Length of output: 6503


Script:

#!/bin/bash
# Extract relevant sections from packages/eslint-config/src/configs/markdown.ts for eslint-plugin-markdown
sed -n '/eslint-plugin-markdown/,+10p' packages/eslint-config/src/configs/markdown.ts

Length of output: 667


Script:

#!/bin/bash
# Extract relevant sections from packages/eslint-config/src/typegen.d.ts for eslint-plugin-n
sed -n '/eslint-plugin-n/,+10p' packages/eslint-config/src/typegen.d.ts

Length of output: 8798


Script:

#!/bin/bash
# Extract relevant sections from packages/eslint-config/src/plugins.ts for eslint-plugin-n
sed -n '/eslint-plugin-n/,+10p' packages/eslint-config/src/plugins.ts

Length of output: 429


82-84: Ensure compatibility with eslint-plugin-astro, eslint-plugin-react-hooks, and eslint-plugin-react-refresh.

Verify that the updates to eslint-plugin-astro, eslint-plugin-react-hooks, and eslint-plugin-react-refresh do not introduce breaking changes.


57-58: Ensure compatibility with eslint-plugin-perfectionist and eslint-plugin-prettier.

Verify that the updates to eslint-plugin-perfectionist and eslint-plugin-prettier do not introduce breaking changes.


81-81: Verify compatibility with eslint.

Ensure that the update to eslint is compatible with your existing ESLint configuration.


46-46: Ensure compatibility with eslint-flat-config-utils.

Verify that the update to eslint-flat-config-utils does not introduce breaking changes.


59-61: Verify compatibility with eslint-plugin-toml, eslint-plugin-unicorn, and eslint-plugin-unused-imports.

Ensure that the updates to eslint-plugin-toml, eslint-plugin-unicorn, and eslint-plugin-unused-imports are compatible with your existing ESLint configuration.

Verification successful

The specified versions of eslint-plugin-toml, eslint-plugin-unicorn, and eslint-plugin-unused-imports are compatible with the existing ESLint configuration.

  • The ESLint configuration files reference rules from these plugins, and there are no indications of deprecated or unsupported rules.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify compatibility of eslint-plugin-toml, eslint-plugin-unicorn, and eslint-plugin-unused-imports.

# Test: Check for any compatibility issues. Expect: No issues.
npm ls eslint-plugin-toml eslint-plugin-unicorn eslint-plugin-unused-imports

Length of output: 149


Script:

#!/bin/bash
# Find ESLint configuration files and check for the usage of eslint-plugin-toml, eslint-plugin-unicorn, and eslint-plugin-unused-imports.

# Locate ESLint configuration files
fd -e js -e json -e yaml -e yml -e cjs -e mjs -e ts -e coffee -e toml -e eslintrc -e eslintrc.js -e eslintrc.json -e eslintrc.yaml -e eslintrc.yml -e eslintrc.cjs -e eslintrc.mjs -e eslintrc.ts -e eslintrc.coffee -e eslintrc.toml

# Check for usage of eslint-plugin-toml
fd -e js -e json -e yaml -e yml -e cjs -e mjs -e ts -e coffee -e toml -e eslintrc -e eslintrc.js -e eslintrc.json -e eslintrc.yaml -e eslintrc.yml -e eslintrc.cjs -e eslintrc.mjs -e eslintrc.ts -e eslintrc.coffee -e eslintrc.toml --exec rg "eslint-plugin-toml"

# Check for usage of eslint-plugin-unicorn
fd -e js -e json -e yaml -e yml -e cjs -e mjs -e ts -e coffee -e toml -e eslintrc -e eslintrc.js -e eslintrc.json -e eslintrc.yaml -e eslintrc.yml -e eslintrc.cjs -e eslintrc.mjs -e eslintrc.ts -e eslintrc.coffee -e eslintrc.toml --exec rg "eslint-plugin-unicorn"

# Check for usage of eslint-plugin-unused-imports
fd -e js -e json -e yaml -e yml -e cjs -e mjs -e ts -e coffee -e toml -e eslintrc -e eslintrc.js -e eslintrc.json -e eslintrc.yaml -e eslintrc.yml -e eslintrc.cjs -e eslintrc.mjs -e eslintrc.ts -e eslintrc.coffee -e eslintrc.toml --exec rg "eslint-plugin-unused-imports"

Length of output: 21353


Script:

#!/bin/bash
# Extract and verify ESLint rules and configurations related to eslint-plugin-toml, eslint-plugin-unicorn, and eslint-plugin-unused-imports.

# Extract rules and configurations for eslint-plugin-toml
fd -e js -e json -e yaml -e yml -e cjs -e mjs -e ts -e coffee -e toml -e eslintrc -e eslintrc.js -e eslintrc.json -e eslintrc.yaml -e eslintrc.yml -e eslintrc.cjs -e eslintrc.mjs -e eslintrc.ts -e eslintrc.coffee -e eslintrc.toml --exec rg -A 5 "eslint-plugin-toml"

# Extract rules and configurations for eslint-plugin-unicorn
fd -e js -e json -e yaml -e yml -e cjs -e mjs -e ts -e coffee -e toml -e eslintrc -e eslintrc.js -e eslintrc.json -e eslintrc.yaml -e eslintrc.yml -e eslintrc.cjs -e eslintrc.mjs -e eslintrc.ts -e eslintrc.coffee -e eslintrc.toml --exec rg -A 5 "eslint-plugin-unicorn"

# Extract rules and configurations for eslint-plugin-unused-imports
fd -e js -e json -e yaml -e yml -e cjs -e mjs -e ts -e coffee -e toml -e eslintrc -e eslintrc.js -e eslintrc.json -e eslintrc.yaml -e eslintrc.yml -e eslintrc.cjs -e eslintrc.mjs -e eslintrc.ts -e eslintrc.coffee -e eslintrc.toml --exec rg -A 5 "eslint-plugin-unused-imports"

Length of output: 41439


91-93: Verify compatibility with tsup, tsx, and typescript.

Ensure that the updates to tsup, tsx, and typescript are compatible with your existing TypeScript configuration.

packages/eslint-config/src/types.ts (14)

6-8: LGTM! Exporting ConfigNames separately improves modularity and clarity.

The change is approved.


67-67: LGTM! Renaming OptionsComponentExts to OptionsComponentExtensions improves semantic clarity.

The change is approved.


77-77: LGTM! Updating OptionsConfig to extend OptionsComponentExtensions improves consistency.

The change is approved.


89-89: LGTM! Adding astro property to OptionsConfig enhances configuration capabilities.

The change is approved.


106-106: LGTM! Adding gitignore property to OptionsConfig enhances configuration capabilities.

The change is approved.


125-125: LGTM! Adding jsonc property to OptionsConfig enhances configuration capabilities.

The change is approved.


134-134: LGTM! Adding markdown property to OptionsConfig enhances configuration capabilities.

The change is approved.


169-169: LGTM! Adding react property to OptionsConfig enhances configuration capabilities.

The change is approved.


179-179: LGTM! Adding solid property to OptionsConfig enhances configuration capabilities.

The change is approved.


196-196: LGTM! Adding test property to OptionsConfig enhances configuration capabilities.

The change is approved.


203-203: LGTM! Adding toml property to OptionsConfig enhances configuration capabilities.

The change is approved.


212-212: LGTM! Updating typescript property in OptionsConfig enhances configuration capabilities.

The change is approved.


222-222: LGTM! Adding unicorn property to OptionsConfig enhances configuration capabilities.

The change is approved.


229-229: LGTM! Adding yaml property to OptionsConfig enhances configuration capabilities.

The change is approved.

packages/eslint-config/src/factory.ts (3)

91-91: LGTM! Renaming componentExts to componentExtensions improves semantic clarity.

The change is approved.


103-103: LGTM! Adding unicorn parameter enhances configuration capabilities.

The change is approved.


142-144: LGTM! Adding Unicorn configuration conditionally improves flexibility.

The change is approved.

packages/eslint-config/src/configs/typescript.ts (4)

7-7: Improved semantic clarity with type renaming.

The type OptionsComponentExts has been renamed to OptionsComponentExtensions, which enhances readability and maintainability.


23-23: Consistent variable renaming.

The variable componentExts has been renamed to componentExtensions, aligning with the updated type name and improving consistency.


27-27: Consistent variable usage in mapping function.

The mapping function now uses componentExtensions, ensuring consistency with the renamed variable.


139-139: Enhanced type checking with new linting rule.

The addition of the rule 'ts/no-restricted-types': 'error' enhances the strictness of type checks, promoting better coding standards.

packages/eslint-config/src/configs/javascript.ts (1)

81-81: Stricter type handling with new linting rule.

The addition of the rule 'no-implicit-coercion': ['error', { allow: ['+', '~'] }] enforces stricter type handling, which can help prevent potential bugs arising from unexpected type coercion.

if (key in options) {
acc[key] = options[key] as any;
accumulator[key] = options[key] as any;
Copy link

Choose a reason for hiding this comment

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

Specify a different type instead of any.

The use of any should be avoided. Specify a more appropriate type.

-			accumulator[key] = options[key] as any;
+			accumulator[key] = options[key] as unknown;
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.

Suggested change
accumulator[key] = options[key] as any;
accumulator[key] = options[key] as unknown;
Tools
GitHub Check: CodeFactor

[warning] 208-208: packages/eslint-config/src/factory.ts#L208
Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)

@@ -81,24 +82,25 @@
export function mheob(
options: OptionsConfig & TypedFlatConfigItem = {},
...userConfigs: Awaitable<
FlatConfigComposer<any, any> | Linter.FlatConfig[] | TypedFlatConfigItem | TypedFlatConfigItem[]
FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]
Copy link

Choose a reason for hiding this comment

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

Specify a different type instead of any.

The use of any should be avoided. Specify a more appropriate type.

-		FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]
+		FlatConfigComposer<unknown, unknown> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]
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.

Suggested change
FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]
FlatConfigComposer<unknown, unknown> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]
Tools
GitHub Check: CodeFactor

[warning] 85-85: packages/eslint-config/src/factory.ts#L85
Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)


[warning] 85-85: packages/eslint-config/src/factory.ts#L85
Unexpected any. Specify a different type. (@typescript-eslint/no-explicit-any)

@mheob mheob merged commit 22a2503 into main Aug 4, 2024
7 of 9 checks passed
@mheob mheob deleted the update-dependencies branch August 4, 2024 17:43
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