Skip to content

vue/new-line-between-multi-line-property: { onlyComponentOptions: true } #1390

Open
@inker

Description

@inker

What rule do you want to change?
vue/new-line-between-multi-line-property

Does this change cause the rule to produce more or fewer warnings?
fewer

How will the change be implemented? (New option, new default behavior, etc.)?
onlyComponentOptions option (default: false)

Please provide some example code that this change will affect:

export default {
  name: 'ComponentName',

  props: {
    foo: String,
    bar: Number, // no error if onlyComponentOptions is true
  },

  created() {
    // ...
  },

  methods: {
    baz() {
      // ...
    },
    qux() {  // no error if onlyComponentOptions is true
      // ...
    },
  },
}

What does the rule currently do for this code?
If the rule is on, an error is displayed for adjacent props & methods:

Enforce new lines between multi-line properties in Vue components.

What will the rule do after it's changed?
If onlyComponentOptions is set to true, props & method properties will be ignored.

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