8000 Does not support `--fix` · Issue #1 · vuejs/eslint-plugin-vue · GitHub
[go: up one dir, main page]

Skip to content
Does not support --fix #1
Closed
Closed
@jasonkuhrt

Description

@jasonkuhrt
❯ echo "const a = 'single+semi';" > foobar.js
❯ ./node_modules/.bin/eslint --fix foobar.js

  1:7  error  'a' is assigned a value but never used  no-unused-vars

✖ 1 problem (1 error, 0 warnings)

❯ cat foobar.js
const a = "single+semi"
❯ ccat test.vue
<template>
  <div v-on:click.prevent="activateTab()" v-bind:class="{ active: active }">
    <slot></slot>
  </div>
</template>

<script>
  export default {
    name: 'tab-link',
    data() {
      return {
        storeRegistered: false,
      };
    },
    computed: {
      active() {
        const tab = this.tabs[this.tabGroup];
        const tabName = this.tabName;
        const forceActive = this.forceActive;
        const activeTabName = tab.activeTabName;
        const isActive = !!((tab && activeTabName === tabName) || forceActive);
        return isActive;
      },
      tabs() {
        return this.$store.getters.getTabs;
      },
    },
    props: {
      isDefaultTab: {
        type: Boolean,
      },
      tabGroup: {
        type: String,
        required: true,
      },
      tabName: {
        type: String,
        required: true,
      },
    },
    created() {
      const tab = {};

      tab[this.tabGroup] = {
        activeTabName: this.isDefaultTab ? this.tabName : '',
      };

      if (!this.storeRegistered) {
        this.$store.dispatch('REGISTER_TAB', tab);
        this.storeRegistered = true;
      }
    },
    methods: {
      activateTab() {
        this.$store.dispatch('SET_ACTIVE_TAB', { tabGroup: this.tabGroup, tabName: this.tabName });
      },
    },
  };
</script>

❯ ./node_modules/.bin/eslint --fix test.vue

   9:11  warning  Strings must use doublequote  quotes
  13:8   warning  Extra semicolon               semi
  17:21  error    Unallowed use of `this`       fp/no-this
  17:31  error    Unallowed use of `this`       fp/no-this
  17:45  warning  Extra semicolon               semi
  18:25  error    Unallowed use of `this`       fp/no-this
  18:37  warning  Extra semicolon               semi
  19:29  error    Unallowed use of `this`       fp/no-this
  19:45  warning  Extra semicolon               semi
  20:48  warning  Extra semicolon               semi
  21:79  warning  Extra semicolon               semi
  22:24  warning  Extra semicolon               semi
  25:16  error    Unallowed use of `this`       fp/no-this
  25:43  warning  Extra semicolon               semi
  42:21  warning  Extra semicolon               semi
  44:11  error    Unallowed use of `this`       fp/no-this
  45:24  error    Unallowed use of `this`       fp/no-this
  45:44  error    Unallowed use of `this`       fp/no-this
  45:59  warning  Strings must use doublequote  quotes
  46:8   warning  Extra semicolon               semi
  48:12  error    Unallowed use of `this`       fp/no-this
  49:9   error    Unallowed use of `this`       fp/no-this
  49:30  warning  Strings must use doublequote  quotes
  49:50  warning  Extra semicolon               semi
  50:9   error    Unallowed use of `this`       fp/no-this
  50:36  warning  Extra semicolon               semi
  55:9   error    Unallowed use of `this`       fp/no-this
  55:30  warning  Strings must use doublequote  quotes
  55:60  error    Unallowed use of `this`       fp/no-this
  55:84  error    Unallowed use of `this`       fp/no-this
  55:99  warning  Extra semicolon               semi
  58:4   warning  Extra semicolon               semi

✖ 32 problems (14 errors, 18 warnings)

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

      0