npm vue-eslint-parser 6.0.0

latest releases: 8.3.0, 8.2.0, 8.1.0...
5 years ago

This release supported the new syntax in Vue.js 2.6 🎉

Breaking changes

This release contains a drastic change about VDirectiveKey AST node because now the directive key have gotten to be able to have JavaScript expression.

  export interface VDirectiveKey extends HasLocation, HasParent {
      type: "VDirectiveKey"
      parent: VAttribute
-     name: string
-     argument: string | null
-     modifiers: string[]
-     shorthand: boolean
+     name: VIdentifier
+     argument: VExpressionContainer | VIdentifier | null
+     modifiers: VIdentifier[]
  }
  • It changed the members name, argument, and modifiers to AST nodes from strings. Especially, argument will be a VExpressionContainer node if the directive has dynamic argument syntax.
  • It removed shorthand member. To check wheather the directive key is a shorthand or not, use name.rawName member.
    • :foo ... directiveKey.name.rawName is ":" (and directiveKey.name.name is "bind").
    • .foo ... directiveKey.name.rawName is "." (and directiveKey.name.name is "bind" and directiveKey.modifiers includes the identifier node of "prop").
    • @foo ... directiveKey.name.rawName is "@" (and directiveKey.name.name is "on").
    • #foo ... directiveKey.name.rawName is "#" (and directiveKey.name.name is "slot").

Commits

Don't miss a new vue-eslint-parser release

NewReleases is sending notifications on new releases.