Skip to content

vue/no-unused-vars not turning off #1034

Closed
@ACVis

Description

@ACVis

Tell us about your environment

  • ESLint version: 6.8.0
  • eslint-plugin-vue version: 6.1.2
  • Node version: 12.8.0

Please show your full configuration:

module.exports = {
    root: true,
    env: {
        es6: true,
        node: true,
        browser: true,
    },
    extends: [
        "plugin:vue/recommended",
        "prettier/vue",
        "plugin:prettier/recommended",
    ],
    rules: {
        "vue/attributes-order": "error",
        "vue/no-unused-vars": "off",
        "no-console": process.env.NODE_ENV === "production" ? "error" : "off",
        "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
    },
    parser: "vue-eslint-parser",
    parserOptions: {
        parser: "babel-eslint",
        sourceType: "module",
    },
};

What did you do?

<template>
    <div class="FCol">
            <vs-table
                class="D--flex JC--center BG-white W-auto"
                :data="items"
                no-data-text="No results to display"
            >
                <template slot="thead">
                    <vs-th class="WB-normal Text-nowrap">Title</vs-th>
                </template>
                <template slot-scope="{ data }">
                    <vs-tr v-for="(tr, indextr) in data" :key="tr.id">
                        <vs-td :data="tr.test">
                            {{ tr.test }}
                        </vs-td>
                    </vs-tr>
                </template>
            </vs-table>
    </div>
</template>

What did you expect to happen?
vue/no-unused-vars rule to be disabled and for there to be no errors or warnings.

What actually happened?

[vue/no-unused-vars]
'indextr' is defined but never used.

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