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

fix: Upgrade unbuild to resolve console warning issues [deploy] #4009

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

anncwb
Copy link
Collaborator

@anncwb anncwb commented Aug 2, 2024

Description

Fix some column dependencies caused by upgrading unbuild, in order to solve console warnings.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Checklist

ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in CONTRIBUTING.

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs:dev command.
  • Run the tests with pnpm test.
  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • New Features

    • Introduced a new structured format for code ownership assignments across various directories, enhancing clarity on responsibility.
    • Updated the bug report template with new software version options for better alignment with current releases.
    • Enabled Progressive Web App (PWA) features in the application, improving performance and offline capabilities.
  • Bug Fixes

    • Enhanced linting and formatting processes with a new custom configuration for various file types, ensuring better code quality.
  • Chores

    • Cleaned up and updated dependencies in package management, improving overall project efficiency.

Copy link

changeset-bot bot commented Aug 2, 2024

⚠️ No Changeset found

Latest commit: 04f0327

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

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

Click here to learn what changesets are, and how to add one.

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

Copy link
Contributor

coderabbitai bot commented Aug 2, 2024

Walkthrough

The recent updates enhance the repository's organization and clarity in code ownership, refine bug report templates, and improve deployment configurations. Key changes include the restructuring of the .github/CODEOWNERS file for better team assignments, modifications to the bug report options, and a new environment variable setup for Progressive Web Apps. Additionally, linting configurations were customized for various file types, and package dependencies were streamlined to reflect modern practices.

Changes

File(s) Change Summary
.github/CODEOWNERS Updated ownership assignments with a structured format and team designations for directories like apps/ and docs/.
.github/ISSUE_TEMPLATE/bug-report.yml Modified software version options in dropdown to reflect new releases.
.github/workflows/deploy.yml Added command to set VITE_PWA variable for enabling Progressive Web App features.
.lintstagedrc.mjs Overhauled to provide a custom linting configuration for multiple file types.
.npmrc Removed lint-staged from public-hoist-pattern, altering dependency handling.
Dockerfile Updated path for copying application files to reflect new structure.
apps/web-ele/src/views/demos/element/index.vue Changed string delimiters for the success message.
cspell.json Added "antdv" for enhanced spell-checking of Ant Design Vue terminology.
internal/lint-configs/... (multiple files) Updated return types from Promise<Linter.FlatConfig[]> to Promise<Linter.Config[]> for improved type handling.
package.json Removed @vben/lint-staged-config, added lint-staged, and upgraded unbuild version.
scripts/vsh/src/lint/index.ts Commented out ESLint execution in the linting process.
turbo.json Removed entry for @vben/backend#dev, streamlining configuration.
vben-admin.code-workspace Removed lint-staged configuration, indicating a shift in linting strategy.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GitHubActions as "GitHub Actions"
    participant Application
    participant Linter

    User->>GitHubActions: Push code
    GitHubActions->>Application: Deploy with new settings
    Application->>Linter: Run linting checks
    Linter-->>Application: Return lint results
    Application-->>GitHubActions: Deployment complete
    GitHubActions-->>User: Notify of success
Loading

🐰 In the meadow, changes bloom bright,
Code flows like a stream, pure delight.
Teams unite in structured embrace,
Linting, deploying, a joyous race.
With each hop, our project takes flight! 🌼


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

@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: 1

Outside diff range, codebase verification and nitpick comments (2)
internal/lint-configs/eslint-config/src/configs/ignores.ts (1)

3-3: Incompatible return type detected!

The ignores function now returns Promise<Linter.Config[]>, which is not compatible with the expected FlatConfigPromise type in the defineConfig function. This discrepancy needs to be resolved to ensure type compatibility.

  • File: internal/lint-configs/eslint-config/src/index.ts
  • Function: defineConfig
Analysis chain

LGTM! But verify the function usage in the codebase.

The code changes are approved.

However, ensure that all function calls to ignores handle the new return type correctly.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `ignores` handle the new return type correctly.

# Test: Search for the function usage. Expect: Only occurrences of the new return type.
rg --type python -A 5 $'ignores'

Length of output: 62


Script:

#!/bin/bash
# Description: Verify all function calls to `ignores` handle the new return type correctly.

# Test: Search for the function usage in TypeScript files. Expect: Only occurrences of the new return type.
rg --type ts -A 5 'ignores('

Length of output: 97


Script:

#!/bin/bash
# Description: Verify all function calls to `ignores` handle the new return type correctly.

# Test: Search for the function usage in TypeScript files. Expect: Only occurrences of the new return type.
rg --type ts -A 5 'ignores\('

Length of output: 927


Script:

#!/bin/bash
# Description: Verify all function calls to `ignores` handle the new return type correctly.

# Test: Extract more lines around the usage of `ignores` in `internal/lint-configs/eslint-config/src/index.ts` to understand how the return type is handled.
rg --type ts -A 10 -B 10 'ignores\(' internal/lint-configs/eslint-config/src/index.ts

Length of output: 505

internal/tailwind-config/src/plugins/entry.ts (1)

3-3: Add explicit types for the addUtilities parameter.

The TypeScript directive suppresses an error regarding the implicit 'any' type for the addUtilities parameter. To improve type safety, consider adding explicit types for the parameter.

- // @ts-expect-error Parameter 'addUtilities' implicitly has an 'any' type.
- const enterAnimationPlugin = plugin(({ addUtilities }) => {
+ const enterAnimationPlugin = plugin(({ addUtilities }: { addUtilities: (utilities: Record<string, any>) => void }) => {
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e544119 and 04f0327.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (35)
  • .github/CODEOWNERS (1 hunks)
  • .github/ISSUE_TEMPLATE/bug-report.yml (1 hunks)
  • .github/workflows/deploy.yml (1 hunks)
  • .lintstagedrc.mjs (1 hunks)
  • .npmrc (1 hunks)
  • Dockerfile (1 hunks)
  • apps/web-ele/src/views/demos/element/index.vue (1 hunks)
  • cspell.json (1 hunks)
  • internal/lint-configs/commitlint-config/index.mjs (3 hunks)
  • internal/lint-configs/commitlint-config/package.json (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/comments.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/disableds.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/ignores.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/javascript.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/jsdoc.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/jsonc.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/node.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/perfectionist.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/prettier.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/regexp.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/test.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/turbo.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/typescript.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/unicorn.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/configs/vue.ts (1 hunks)
  • internal/lint-configs/eslint-config/src/util.ts (1 hunks)
  • internal/lint-configs/prettier-config/package.json (1 hunks)
  • internal/lint-configs/stylelint-config/package.json (1 hunks)
  • internal/node-utils/src/index.ts (1 hunks)
  • internal/tailwind-config/src/plugins/entry.ts (1 hunks)
  • internal/vite-config/src/utils/env.ts (1 hunks)
  • package.json (2 hunks)
  • scripts/vsh/src/lint/index.ts (1 hunks)
  • turbo.json (1 hunks)
  • vben-admin.code-workspace (1 hunks)
Files skipped from review due to trivial changes (7)
  • .github/CODEOWNERS
  • .github/ISSUE_TEMPLATE/bug-report.yml
  • apps/web-ele/src/views/demos/element/index.vue
  • cspell.json
  • internal/lint-configs/commitlint-config/index.mjs
  • turbo.json
  • vben-admin.code-workspace
Additional comments not posted (53)
internal/lint-configs/eslint-config/src/util.ts (2)

1-1: LGTM!

The type alias Awaitable is correctly defined and useful.


3-8: LGTM!

The function interopDefault is correctly implemented to handle both direct values and promises. The type signature is precise and the implementation is straightforward.

internal/lint-configs/eslint-config/src/configs/turbo.ts (2)

3-3: LGTM!

The import statement for interopDefault is correctly added and necessary for the function implementation.


Line range hint 5-13:
LGTM!

The function turbo is correctly updated to use interopDefault and the return type change indicates a refinement in the configuration type.

.npmrc (1)

3-3: Verify the impact of removing lint-staged from public-hoist-pattern.

The removal of lint-staged from public-hoist-pattern may affect its accessibility or execution context within the project.

internal/lint-configs/eslint-config/src/configs/prettier.ts (2)

3-3: Ensure compatibility with module systems.

The import statement has been updated to use interopDefault, which ensures compatibility with different module systems.


5-5: Update function return type.

The return type of the prettier function has been updated from Promise<Linter.FlatConfig[]> to Promise<Linter.Config[]>. Ensure that all consumers of this function handle the new return type correctly.

internal/lint-configs/eslint-config/src/configs/regexp.ts (2)

3-3: Ensure compatibility with module systems.

The import statement has been updated to use interopDefault, which ensures compatibility with different module systems.


5-5: Update function return type.

The return type of the regexp function has been updated from Promise<Linter.FlatConfig[]> to Promise<Linter.Config[]>. Ensure that all consumers of this function handle the new return type correctly.

Verification successful

Update function return type.

The return type of the regexp function has been updated from Promise<Linter.FlatConfig[]> to Promise<Linter.Config[]>. All consumers of this function handle the new return type correctly.

  • internal/lint-configs/eslint-config/src/index.ts
  • internal/lint-configs/eslint-config/src/configs/index.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all usages of the `regexp` function to ensure they handle the new return type.

# Test: Search for the function usage. Expect: Only occurrences of the new return type.
rg --type typescript -A 5 $'regexp'

Length of output: 69


Script:

#!/bin/bash
# Description: Verify all usages of the `regexp` function to ensure they handle the new return type.

# Find all TypeScript files and search for the `regexp` function usage.
fd --extension ts | xargs rg 'regexp'

Length of output: 759


Script:

#!/bin/bash
# Description: Extract context around the usages of the `regexp` function to ensure they handle the new return type correctly.

# Extract context around the usages of `regexp` in the identified files.
rg 'regexp' -A 10 internal/lint-configs/eslint-config/src/index.ts
rg 'regexp' -A 10 internal/lint-configs/eslint-config/src/configs/index.ts

Length of output: 625

internal/node-utils/src/index.ts (1)

15-15: Enhance flexibility of imports.

The export statement has been updated from a default export to a named export, enhancing the flexibility of importing the fs module.

internal/lint-configs/prettier-config/package.json (3)

18-18: Verify the correctness of the new module path.

Ensure that ./index.mjs exists and is the correct module entry point.

Verification successful

The new module path is correct.

The file internal/lint-configs/prettier-config/index.mjs exists as specified in the module field.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of the new module entry point.

# Test: Check if the file exists. Expect: File should exist.
if [ ! -f "internal/lint-configs/prettier-config/index.mjs" ]; then
  echo "File internal/lint-configs/prettier-config/index.mjs does not exist."
  exit 1
fi
echo "File internal/lint-configs/prettier-config/index.mjs exists."

Length of output: 195


17-17: Verify the correctness of the new main path.

Ensure that ./index.mjs exists and is the correct entry point for the module.

Verification successful

The new main path is correct.

The file internal/lint-configs/prettier-config/index.mjs exists, confirming the correctness of the new main entry point.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of the new main entry point.

# Test: Check if the file exists. Expect: File should exist.
if [ ! -f "internal/lint-configs/prettier-config/index.mjs" ]; then
  echo "File internal/lint-configs/prettier-config/index.mjs does not exist."
  exit 1
fi
echo "File internal/lint-configs/prettier-config/index.mjs exists."

Length of output: 195


21-21: Verify the correctness of the new exports path and the impact of the removal of other fields.

Ensure that ./index.mjs exists and is the correct export entry point. Verify that the removal of types and import fields does not impact the functionality.

Verification successful

The new exports path is correct and the removal of the types and import fields does not impact the functionality.

  • The file internal/lint-configs/prettier-config/index.mjs exists.
  • The types and import fields are not present in internal/lint-configs/prettier-config/package.json.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of the new export entry point and the impact of the removal of other fields.

# Test: Check if the file exists. Expect: File should exist.
if [ ! -f "internal/lint-configs/prettier-config/index.mjs" ]; then
  echo "File internal/lint-configs/prettier-config/index.mjs does not exist."
  exit 1
fi
echo "File internal/lint-configs/prettier-config/index.mjs exists."

# Test: Check for the usage of removed fields.
rg --type json '"types":' internal/lint-configs/prettier-config/package.json
rg --type json '"import":' internal/lint-configs/prettier-config/package.json

Length of output: 354

internal/lint-configs/eslint-config/src/configs/disableds.ts (1)

3-3: Verify the correctness of the new return type.

Ensure that the new return type Promise<Linter.Config[]> is correct and does not impact the functionality.

Verification successful

The new return type Promise<Linter.Config[]> is correctly handled.

  • The disableds function is used within an async function (defineConfig), ensuring proper handling of the promise.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correctness of the new return type.

# Test: Check for the usage of the `disableds` function. Expect: No issues with the new return type.
rg --type ts 'disableds' internal/lint-configs/eslint-config/src/configs/

Length of output: 282


Script:

#!/bin/bash
# Description: Identify where the `disableds` function is used in the codebase.

# Search for instances where the `disableds` function is called or used.
rg --type ts 'disableds' 

Length of output: 361


Script:

#!/bin/bash
# Description: Examine how the `disableds` function is used in `internal/lint-configs/eslint-config/src/index.ts`.

# Search for the usage of `disableds` in `internal/lint-configs/eslint-config/src/index.ts`.
rg 'disableds' internal/lint-configs/eslint-config/src/index.ts -A 5 -B 5

Length of output: 410


Script:

#!/bin/bash
# Description: Examine the context in which `disableds()` is called within `internal/lint-configs/eslint-config/src/index.ts`.

# Search for the function or context in which `disableds()` is called.
rg 'disableds()' internal/lint-configs/eslint-config/src/index.ts -A 10 -B 10

Length of output: 677

internal/lint-configs/eslint-config/src/configs/comments.ts (2)

8-8: Verify the correctness of the new import statement.

Ensure that the new import statement using interopDefault is correct and does not impact the functionality.

Verification successful

The new import statement using interopDefault is correct and does not impact functionality.

The interopDefault function is used consistently across multiple configuration files to import various ESLint plugins and parsers. The specific import statement in question follows the same pattern and is therefore verified to be correct.

  • internal/lint-configs/eslint-config/src/configs/comments.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correctness of the new import statement.

# Test: Check for the usage of the `interopDefault` function. Expect: No issues with the new import statement.
rg --type ts 'interopDefault' internal/lint-configs/eslint-config/src/util.ts

Length of output: 118


Script:

#!/bin/bash
# Search for all instances of `interopDefault` usage in the codebase
rg 'interopDefault' --type ts

Length of output: 3020


5-5: Verify the correctness of the new return type.

Ensure that the new return type Promise<Linter.Config[]> is correct and does not impact the functionality.

Verification successful

The new return type Promise<Linter.Config[]> for the comments function is correct and consistent with the other functions in the list.

  • The comments function's return type aligns with the return types of other asynchronous functions in the same context.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correctness of the new return type.

# Test: Check for the usage of the `comments` function. Expect: No issues with the new return type.
rg --type ts 'comments' internal/lint-configs/eslint-config/src/configs/

Length of output: 967


Script:

#!/bin/bash
# Description: Search for all usages of the `comments` function across the entire codebase to verify the correctness of the new return type.

# Test: Check for the usage of the `comments` function. Expect: No issues with the new return type.
rg --type ts 'comments' 

Length of output: 1044


Script:

#!/bin/bash
# Description: Inspect the usage of the `comments` function in `internal/lint-configs/eslint-config/src/index.ts`.

# Display the relevant lines around the usage of `comments` in `internal/lint-configs/eslint-config/src/index.ts`.
rg --type ts -A 5 -B 5 'comments' internal/lint-configs/eslint-config/src/index.ts

Length of output: 399


Script:

#!/bin/bash
# Description: Inspect the definitions of other functions in the list to check if they are asynchronous.

# Search for the definitions of the functions in the list to determine if they are asynchronous.
functions=("jsonc" "disableds" "importPluginConfig" "node" "perfectionist" "comments" "jsdoc" "unicorn" "test" "regexp" "command")

for func in "${functions[@]}"; do
  echo "Function: $func"
  rg --type ts "function $func" -A 3 -B 3
  echo ""
done

Length of output: 8285

.lintstagedrc.mjs (5)

1-5: Ensure Prettier and ESLint configurations are compatible.

The commands for JavaScript and TypeScript files use both Prettier and ESLint. Ensure that their configurations do not conflict.


6-9: Verify Stylelint configuration for CSS and Vue files.

The commands for CSS and Vue files use Stylelint with --allow-empty-input. Ensure that this flag is necessary and verify the Stylelint configuration.


10-10: LGTM!

The command for Markdown files looks good.


11-15: Ensure Prettier, ESLint, and Stylelint configurations are compatible for Vue files.

The commands for Vue files use Prettier, ESLint, and Stylelint. Ensure that their configurations do not conflict.


19-19: LGTM!

The command for package.json files looks good.

Dockerfile (1)

24-24: Verify the new source path for copying application files.

The source path has been updated to /app/apps/web-antd/dist. Ensure that this path is correct and reflects the intended application being deployed.

internal/lint-configs/commitlint-config/package.json (2)

17-18: Verify the new paths for main and module fields.

The paths for the main and module fields have been updated to ./index.mjs. Ensure that these paths are correct and reflect the intended structure.

Verification successful

Paths for main and module fields are correct.

The index.mjs file exists at the specified path internal/lint-configs/commitlint-config/index.mjs, confirming that the paths for the main and module fields in the package.json file are correct.

  • internal/lint-configs/commitlint-config/index.mjs
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new paths for main and module fields.

# Test: Search for the index.mjs file. Expect: The file should exist at the specified path.
find internal/lint-configs/commitlint-config/index.mjs

Length of output: 106


21-22: Verify the new paths for exports field.

The paths for the exports field have been updated to ./index.mjs. Ensure that these paths are correct and reflect the intended structure.

Verification successful

Paths for the exports field are correct.

The index.mjs file exists at the specified path, confirming that the paths in the exports field are accurate and reflect the intended structure.

  • internal/lint-configs/commitlint-config/package.json: Lines 21-22
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new paths for exports field.

# Test: Search for the index.mjs file. Expect: The file should exist at the specified path.
find internal/lint-configs/commitlint-config/index.mjs

Length of output: 106

internal/lint-configs/eslint-config/src/configs/jsdoc.ts (2)

3-3: LGTM! Import statement update ensures compatibility.

The use of interopDefault for importing eslint-plugin-jsdoc ensures compatibility with default exports.


5-5: LGTM! But verify the function usage in the codebase.

The code changes are approved.

However, ensure that all function calls to jsdoc handle the new return type correctly.

internal/lint-configs/eslint-config/src/configs/unicorn.ts (2)

3-3: LGTM! Import statement update ensures compatibility.

The use of interopDefault for importing eslint-plugin-unicorn ensures compatibility with default exports.


5-5: LGTM! But verify the function usage in the codebase.

The code changes are approved.

However, ensure that all function calls to unicorn handle the new return type correctly.

Verification successful

The codebase correctly handles the new return type of unicorn.

The type FlatConfigPromise in internal/lint-configs/eslint-config/src/index.ts includes Promise<FlatConfig[]>, which aligns with the new return type of unicorn.

  • internal/lint-configs/eslint-config/src/index.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `unicorn` handle the new return type correctly.

# Test: Search for the function usage. Expect: Only occurrences of the new return type.
rg --type python -A 5 $'unicorn'

Length of output: 62


Script:

#!/bin/bash
# Description: Verify all function calls to `unicorn` handle the new return type correctly.

# Test: Search for the function usage. Expect: Only occurrences of the new return type.
rg --type typescript -A 5 'unicorn'

Length of output: 70


Script:

#!/bin/bash
# Description: Verify all function calls to `unicorn` handle the new return type correctly.

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

Length of output: 4445


Script:

#!/bin/bash
# Description: Extract and review the relevant portions of `internal/lint-configs/eslint-config/src/index.ts` to ensure the new return type of `unicorn` is handled correctly.

# Extract lines around the usage of `unicorn` function
rg --type ts -A 10 -B 10 'unicorn()' internal/lint-configs/eslint-config/src/index.ts

Length of output: 732


Script:

#!/bin/bash
# Description: Verify if the type `FlatConfig` has been updated to align with the new return type of `unicorn`.

# Search for the definition and usage of `FlatConfig` in the codebase
rg --type ts 'FlatConfig' 

Length of output: 968

scripts/vsh/src/lint/index.ts (1)

19-21: Verify the reason for commenting out the ESLint command.

Commenting out the ESLint command means that JavaScript/TypeScript files will not be linted when the format option is used. Ensure that this change does not negatively impact the project's code quality.

internal/lint-configs/stylelint-config/package.json (5)

17-17: Verify the new build process and index.mjs file inclusion.

The main field has been changed from "./dist/index.mjs" to "./index.mjs". Ensure that the new build process correctly generates and includes the index.mjs file in the package.


18-18: Verify the new build process and index.mjs file inclusion.

The module field has been changed from "./dist/index.mjs" to "./index.mjs". Ensure that the new build process correctly generates and includes the index.mjs file in the package.


20-20: Verify the impact of removing the types field on TypeScript users.

The types field has been removed. Ensure that this change does not negatively impact TypeScript users who rely on these type definitions. Consider providing alternative type definitions if necessary.


21-21: Verify the new build process and index.mjs file inclusion.

The import field has been changed from "./dist/index.mjs" to "./index.mjs". Ensure that the new build process correctly generates and includes the index.mjs file in the package.


22-22: Verify the new build process and index.mjs file inclusion.

The default field has been changed from "./dist/index.mjs" to "./index.mjs". Ensure that the new build process correctly generates and includes the index.mjs file in the package.

internal/lint-configs/eslint-config/src/configs/test.ts (2)

5-5: Verify alignment with ESLint updates and compatibility.

The return type of the test function has been changed from Promise<Linter.FlatConfig[]> to Promise<Linter.Config[]>. Ensure that this change aligns with updates or improvements in the ESLint library's type definitions and does not introduce any compatibility issues.


3-4: Verify the implementation of the interopDefault function.

The import statements for the ESLint plugins have been updated to use a new utility function, interopDefault. Ensure that this change does not introduce any issues and that the interopDefault function is correctly implemented.

internal/lint-configs/eslint-config/src/configs/node.ts (2)

3-3: Ensure interopDefault handles ES module compatibility correctly.

The change to use interopDefault for importing pluginNode likely aims to handle compatibility with ES modules. Ensure that interopDefault is correctly implemented to avoid runtime issues.

Verification successful

Ensure interopDefault handles ES module compatibility correctly.

The interopDefault function is correctly implemented to handle ES module compatibility. It resolves the module and returns either its default export or the module itself, which should prevent runtime issues related to module imports.

  • Location: internal/lint-configs/eslint-config/src/util.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the implementation of `interopDefault`.

# Test: Search for the definition of `interopDefault`. Expect: Correct implementation handling ES module compatibility.
rg --type js --type ts 'function interopDefault'

Length of output: 139


Script:

#!/bin/bash
# Extract the implementation of `interopDefault` from `internal/lint-configs/eslint-config/src/util.ts`.
rg --type js --type ts -A 20 'export async function interopDefault' internal/lint-configs/eslint-config/src/util.ts

Length of output: 308


5-5: Verify the usage of the node function.

The return type of the node function has been updated to Promise<Linter.Config[]>. Ensure that all consumers of this function correctly handle the new return type.

Verification successful

Verify the usage of the node function.

The return type of the node function has been updated to Promise<Linter.Config[]>. Ensure that all consumers of this function correctly handle the new return type.


Verify the usage of the node function.

The return type of the node function has been updated to Promise<Linter.Config[]>. Ensure that all consumers of this function correctly handle the new return type.


Verify the usage of the node function.

The return type of the node function has been updated to Promise<Linter.Config[]>. Ensure that all consumers of this function correctly handle the new return type.


The usage of the node function is correctly handled.

The return type of the node function has been updated to Promise<Linter.Config[]>, and the consumer function defineConfig correctly handles this promise by using Promise.all to resolve it.

  • internal/lint-configs/eslint-config/src/index.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the `node` function.

# Test: Search for the function usage. Expect: Correct handling of the new return type.
rg --type js --type ts 'node()'

Length of output: 9457


Script:

#!/bin/bash
# Description: Check the context around the usage of the `node` function.

# Test: Show the context of the `node` function usage in the identified files.
rg --type js --type ts 'node()' -A 5 -B 5 internal/lint-configs/eslint-config/src/index.ts
rg --type js --type ts 'node()' -A 5 -B 5 internal/lint-configs/eslint-config/src/configs/node.ts

Length of output: 747


Script:

#!/bin/bash
# Description: Extract more context around the usage of the `node` function in internal/lint-configs/eslint-config/src/index.ts.

# Test: Show the context around the usage of `node()` in internal/lint-configs/eslint-config/src/index.ts.
rg --type js --type ts 'node()' -A 10 -B 10 internal/lint-configs/eslint-config/src/index.ts

Length of output: 771


Script:

#!/bin/bash
# Description: Extract the full implementation of the `defineConfig` function to verify the handling of the `node()` promise.

# Test: Show the full implementation of `defineConfig` in internal/lint-configs/eslint-config/src/index.ts.
rg --type js --type ts 'async function defineConfig' -A 50 internal/lint-configs/eslint-config/src/index.ts

Length of output: 616

internal/tailwind-config/src/plugins/entry.ts (1)

1-1: Ensure namespace import for plugin is correctly used.

The change to use a namespace import for plugin likely aims to handle compatibility with the module. Ensure that the namespace import is correctly used in the code.

Verification successful

Namespace import for plugin is correctly used.

The change to use a namespace import for plugin is correctly implemented in the code. The plugin function is properly utilized to add CSS utilities and keyframes.

  • internal/tailwind-config/src/plugins/entry.ts: Correct usage of the namespace import.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the namespace import for `plugin`.

# Test: Search for the usage of `plugin` in the code. Expect: Correct usage of the namespace import.
rg --type js --type ts 'plugin'

Length of output: 11079


Script:

#!/bin/bash
# Extract the full content of the file to verify the correct usage of the namespace import.
cat internal/tailwind-config/src/plugins/entry.ts

Length of output: 1503

internal/lint-configs/eslint-config/src/configs/typescript.ts (2)

3-3: Ensure interopDefault handles ES module compatibility correctly.

The change to use interopDefault for importing pluginTs and parserTs likely aims to handle compatibility with ES modules. Ensure that interopDefault is correctly implemented to avoid runtime issues.


5-5: Verify the usage of the typescript function.

The return type of the typescript function has been updated to Promise<Linter.Config[]>. Ensure that all consumers of this function correctly handle the new return type.

internal/vite-config/src/utils/env.ts (1)

7-7: LGTM! The namespace import for dotenv is appropriate.

The change from a default import to a namespace import helps avoid potential naming conflicts and improves modularity.

.github/workflows/deploy.yml (1)

27-27: LGTM! The addition of the command to set VITE_PWA to true is correct.

This change aligns with the goal of enabling PWA features in the application and enhances its capabilities.

package.json (3)

79-79: Verify the reason for removing @vben/lint-staged-config.

The removal of this dependency indicates a potential shift in how linting is managed. Ensure that this change is intentional and that the new linting strategy is correctly implemented.


79-79: LGTM! The addition of lint-staged is appropriate.

The specified version aligns with modern practices and suggests an update or change in the linting strategy.


84-84: LGTM! The upgrade of unbuild to ^3.0.0-rc.7 is appropriate.

This upgrade may include new features or improvements over the previous version, aligning with the goal of resolving console warning issues.

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

5-5: LGTM!

The code changes are approved.


5-5: Verify the correctness of the new return type.

Ensure that the change from Promise<Linter.FlatConfig[]> to Promise<Linter.Config[]> aligns with the expected structure of the configuration objects returned by the function.

Verification successful

The return type change from Promise<Linter.FlatConfig[]> to Promise<Linter.Config[]> is correct and consistent with the codebase.

  • The Linter.Config type is used consistently across multiple configuration functions, including perfectionist.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correctness of the new return type for the `perfectionist` function.

# Test: Search for the usage of `Linter.Config` and `Linter.FlatConfig` to ensure consistency.
rg --type-add 'ts' --type ts 'Linter.Config'
rg --type-add 'ts' --type ts 'Linter.FlatConfig'

Length of output: 209


Script:

#!/bin/bash
# Description: Verify the correctness of the new return type for the `perfectionist` function.

# Test: Search for the usage of `Linter.Config` and `Linter.FlatConfig` to ensure consistency.
rg 'Linter.Config' --glob '*.ts'
rg 'Linter.FlatConfig' --glob '*.ts'

Length of output: 2375

internal/lint-configs/eslint-config/src/configs/vue.ts (2)

3-4: LGTM!

The code changes are approved.


5-5: Verify the correctness of the new return type.

Ensure that the change from Promise<Linter.FlatConfig[]> to Promise<Linter.Config[]> aligns with the expected structure of the configuration objects returned by the function.

Verification successful

The change in return type for the vue function from Promise<Linter.FlatConfig[]> to Promise<Linter.Config[]> is correct and consistent with the rest of the codebase.

  • The usage of Linter.Config is consistent across multiple configuration functions.
  • Linter.FlatConfig is used in specific instances, indicating a different purpose.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correctness of the new return type for the `vue` function.

# Test: Search for the usage of `Linter.Config` and `Linter.FlatConfig` to ensure consistency.
rg --type-add 'ts' --type ts 'Linter.Config'
rg --type-add 'ts' --type ts 'Linter.FlatConfig'

Length of output: 209


Script:

#!/bin/bash
# Description: Verify the correctness of the new return type for the `vue` function.

# Test: Search for the usage of `Linter.Config` and `Linter.FlatConfig` to ensure consistency.
rg --type-add 'ts:*.ts' --type ts 'Linter.Config'
rg --type-add 'ts:*.ts' --type ts 'Linter.FlatConfig'

Length of output: 2409

internal/lint-configs/eslint-config/src/configs/jsonc.ts (2)

3-4: LGTM!

The code changes are approved.


5-5: Verify the correctness of the new return type.

Ensure that the change from Promise<Linter.FlatConfig[]> to Promise<Linter.Config[]> aligns with the expected structure of the configuration objects returned by the function.

Verification successful

The new return type Promise<Linter.Config[]> for the jsonc function is correct and consistent with the rest of the codebase.

  • The jsonc function's return type aligns with the usage pattern of similar configuration functions.
  • The Linter.Config type is consistently used across multiple configuration functions.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the correctness of the new return type for the `jsonc` function.

# Test: Search for the usage of `Linter.Config` and `Linter.FlatConfig` to ensure consistency.
rg --type-add 'ts' --type ts 'Linter.Config'
rg --type-add 'ts' --type ts 'Linter.FlatConfig'

Length of output: 209


Script:

#!/bin/bash
# Description: Verify the correctness of the new return type for the `jsonc` function.

# Test: Search for the usage of `Linter.Config` and `Linter.FlatConfig` to ensure consistency.
rg --glob '*.ts' 'Linter.Config'
rg --glob '*.ts' 'Linter.FlatConfig'

Length of output: 2375

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

9-9: LGTM! But verify the function usage in the codebase.

The code changes are approved.

However, ensure that all consumers of the javascript function handle the new return type Promise<Linter.Config[]>.

.lintstagedrc.mjs Show resolved Hide resolved
@anncwb anncwb changed the title fix: Upgrade unbuild to resolve console warning issues fix: Upgrade unbuild to resolve console warning issues [deploy] Aug 2, 2024
@anncwb anncwb merged commit 5301591 into main Aug 2, 2024
11 checks passed
@anncwb anncwb deleted the fixture/unbuild branch August 2, 2024 14:18
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant