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(nextjs): Fix optional chaining linting issue #14982

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Jan 11, 2025

This a strange one, maybe caused by caching?

The last few PRs are failing due to these linting issues but I can't reproduce this locally on develop and it looks like everything passed in CI 🤷‍♂️

Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

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

ah, that's a new lint rule added recently, probably slipped through in a PR!

.map((str: string) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))
: [];

const reexport = reexportMatch?.[1]
Copy link
Member

Choose a reason for hiding this comment

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

l: This is fine this way, but can also be rewritten now to:

const wrap = wrapMatch?.[1]
     ?.split(',')
        .filter(param => param !== '')
        // Sanitize, as code could be injected with another rollup plugin
        .map((str: string) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))
    || [];

@mydea mydea changed the title fix: Fix linting on develop chore(nextjs): Fix optional chaining linting issue Jan 13, 2025
@mydea mydea merged commit c612915 into develop Jan 13, 2025
38 checks passed
@mydea mydea deleted the timfish/lint/fix-dev-linting branch January 13, 2025 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants