Skip to content

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

Closed
@Ricky-rick

Description

@Ricky-rick

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>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions