Skip to content

vue/comma-dangle unnecessary requires a comma when using CRLF #1265

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

Closed
Ricky-rick opened this issue Jul 27, 2020 · 1 comment · Fixed by #1332
Closed

vue/comma-dangle unnecessary requires a comma when using CRLF #1265

Ricky-rick opened this issue Jul 27, 2020 · 1 comment · Fixed by #1332

Comments

@Ricky-rick
Copy link

Tell us about your environment

  • **ESLint version: 6.8.0
  • **eslint-plugin-vue version: 6.2.2
  • **Node version: 10.21.0

new cli project with:

? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, Linter
? Pick a linter / formatter config: Standard
? Pick additional lint features: Lint on save
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated confi
g files
? Save this as a preset for future projects? No

Please show your full configuration:

module.exports = {
  root: true,
  env: {
    node: true
  },
  extends: [
    'plugin:vue/essential',
    '@vue/standard'
  ],
  parserOptions: {
    parser: 'babel-eslint'
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'vue/comma-dangle': ['error', 'always-multiline']
  }
}

What did you do?

When i have a vue file like this in windows with CRLF line endings the vue/comma-dangle rule say it requires a comma after @click="$emit(1)"
When the line endings are configured as LF there is no error.

<template>
  <div
    class="header"
    @click="$emit('foo')"
  >
  </div>
</template>

<script>
export default {
  name: 'Test'
}
</script>
@ota-meshi
Copy link
Member

Thank you for this issue.
Probably related to parser issue.

vuejs/vue-eslint-parser#74

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