Skip to content

component-name-in-template-casing did not auto fix key in JS components section #736

@fxxkscript

Description

@fxxkscript

Tell us about your environment

  • ESLint version: 5.10.0
  • eslint-plugin-vue version: 5.0.0
  • Node version: 11.5.0

Please show your full configuration:

{
  "root": true,

  "extends": [
    "plugin:vue/essential",
    "plugin:prettier/recommended",
    "eslint:recommended"
  ],

  "plugins": ["vue", "prettier"],

  "rules": {
    "prettier/prettier": ["error", { "singleQuote": true }],
    "no-unused-vars": ["error", { "args": "none" }]
  },

  "parserOptions": {
    "parser": "babel-eslint",
    "ecmaVersion": 2017,
    "sourceType": "module"
  },

  "env": {
    "browser": true,
    "node": true,
    "es6": true,
    "commonjs": true
  },

  "globals": {

  }
}

What did you do?

Now, if i use this option in single file component, it will auto fix component name in template but not in js.

<template>
<ComponentA> // this changes
</template>
<script>
var ComponentB = {
  components: {
    // this is a bug, it did not change this key
    'componentA': ComponentA
  },
}
<script>

What did you expect to happen?

<template>
<ComponentA> // this changes
</template>
<script>
var ComponentB = {
  components: {
    // this is a bug, it did not change this key
    'ComponentA': ComponentA
  },
}
<script>

What actually happened?

<template>
<ComponentA> // this changes
</template>
<script>
var ComponentB = {
  components: {
    // this is a bug, it did not change this key
    'componentA': ComponentA
  },
}
<script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy