Skip to content

feat(eslint-plugin): blocklist message function #3854

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

Merged
merged 5 commits into from
May 31, 2024

Conversation

enkot
Copy link
Contributor

@enkot enkot commented May 29, 2024

#3073
Allows to use function as a message in the blocklist meta, so you can dynamically generate reason message based on the target selector:

export default defineConfig({
  blocklist: [
    [/-auto$/, { message: s => `Use "${s.replace(/-auto$/, '-a')}" instead` }],
  ]
})

// my-auto -> "my-auto" is in blocklist: Use "my-a" instead

@enkot enkot requested a review from antfu as a code owner May 29, 2024 14:34
Copy link

netlify bot commented May 29, 2024

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a9682b2
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/665997979a429c000822b7a3
😎 Deploy Preview https://deploy-preview-3854--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

zyyv and others added 4 commits May 31, 2024 10:56

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@antfu antfu added this pull request to the merge queue May 31, 2024
Merged via the queue into unocss:main with commit 9fe9015 May 31, 2024
9 checks passed
Simon-He95 pushed a commit to Simon-He95/unocss that referenced this pull request Nov 30, 2024
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.

None yet

3 participants