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

sameNameShorthand from vue/v-bind-style confuses hyphens with underscores #2409

Closed
2 tasks done
adamsol opened this issue Feb 26, 2024 · 1 comment · Fixed by #2410
Closed
2 tasks done

sameNameShorthand from vue/v-bind-style confuses hyphens with underscores #2409

adamsol opened this issue Feb 26, 2024 · 1 comment · Fixed by #2410

Comments

@adamsol
Copy link

adamsol commented Feb 26, 2024

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 8.41.0
  • eslint-plugin-vue version: 9.22.0
  • Vue version: 3.4.20
  • Node version: 14.19.3
  • Operating System: Windows 10

Please show your full configuration:

module.exports = {
  extends: ['plugin:vue/vue3-recommended'],
  rules: {
    'vue/v-bind-style': [1, 'shorthand', { sameNameShorthand: 'always' }],
  },
  ignorePatterns: ['node_modules/'],
};

What did you do?

<template>
  <div :test-value="test_value" />
</template>

npm run lint

What did you expect to happen?
No warning.

What actually happened?

/home/projects/vitejs-vite-uc4css/src/App.vue
  2:8  warning  Expected same-name shorthand  vue/v-bind-style

✖ 1 problem (0 errors, 1 warning)
  0 errors and 1 warning potentially fixable with the `--fix` option.

Repository to reproduce this issue

https://stackblitz.com/edit/vitejs-vite-uc4css?file=src%2FApp.vue

@FloEdelmann
Copy link
Member

Thanks for the bug report. PRs welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants