Skip to content
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

vue/no-mutating-props not flagging .sync usage #1714

Closed
2 tasks done
douglasg14b opened this issue Nov 16, 2021 · 0 comments · Fixed by #1715
Closed
2 tasks done

vue/no-mutating-props not flagging .sync usage #1714

douglasg14b opened this issue Nov 16, 2021 · 0 comments · Fixed by #1715
Labels

Comments

@douglasg14b
Copy link

douglasg14b commented Nov 16, 2021

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 6.7.2
  • eslint-plugin-vue version: : 7.19.1
  • Node version: : 14 (I think?)
  • Operating System: : Windows 10

Please show your full configuration:

module.exports = {
  root: true,
  parserOptions: {
    parser: 'babel-eslint'
  },
  env: {
    browser: true,
    node: true,
    'jest/globals': true
  },
  extends: [
    'standard',
    'plugin:vue/recommended',
    'plugin:vuetify/base',
    'plugin:vuetify/recommended'
  ],
  plugins: [
    'vue',
    'jest',
    'import'
  ],
  settings: {
    'import/resolver': {
      alias: {
        map: [
          ['@', './src']
        ],
        extensions: ['.vue', '.js', '.gql']
      }
    }
  },
  rules: {
    'import/extensions': [
      'error',
      {
        'vue': 'always',
        'mixin': 'never',
        'js': 'never',
        'gql': 'always'
      }
    ],
    'no-console': 'off',
    'no-debugger': 'warn',
    'no-return-await': 'off',

    'vue/v-slot-style': [
      'warn',
      {
        atComponent: 'v-slot',
        default: 'longform',
        named: 'longform'
      }
    ],

    'vue/html-closing-bracket-newline': [
      'error',
      {
        singleline: 'never',
        multiline: 'never'
      }
    ],
    'vue/html-self-closing': [
      'error',
      {
        html: {
          void: 'always',
          normal: 'never',
          component: 'never'
        },
        svg: 'always',
        math: 'always'
      }
    ]
  },
  globals: {}
}

What did you do?

<template>
    <account-details-form :customer-number.sync="customerNumber"></account-details-form>
</template>

<script>
import AccountDetailsForm from '@/components/Accounts/AccountDetailsForm.vue'

export default {
  name: 'AccountDetailsDialog',
  components: {
    AccountDetailsForm
  },
  props: {
    customerNumber: {
      type: [Number, String],
      required: true
    }
  },
  data () {
    return {
      isDialogOpen: false,
      form: {}
    }
  }
}
</script>

What did you expect to happen?

That eslint would flag the :customer-number.sync="customerNumber" as an error for mutating a prop

What actually happened?

It does not

Repository to reproduce this issue

The repo seems unnecessary, eslint isn't breaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants