Evan You пре 9 година
родитељ
комит
b51b9eae4d

+ 2 - 2
package.json

@@ -63,10 +63,10 @@
     "de-indent": "^1.0.2",
     "es6-promise": "^3.2.1",
     "eslint": "^3.4.0",
-    "eslint-config-vue": "^1.1.0",
+    "eslint-config-vue": "^2.0.0",
     "eslint-loader": "^1.3.0",
     "eslint-plugin-flowtype": "^2.16.0",
-    "eslint-plugin-html": "^1.5.2",
+    "eslint-plugin-vue": "^1.0.0",
     "flow-bin": "^0.32.0",
     "he": "^1.1.0",
     "http-server": "^0.9.0",

+ 1 - 1
src/compiler/codegen/events.js

@@ -1,6 +1,6 @@
 /* @flow */
 
-const simplePathRE = /^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?'\]|\[".*?"\]|\[\d+\]|\[[A-Za-z_$][\w$]*\])*\s*$/
+const simplePathRE = /^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/
 
 // keyCode aliases
 const keyCodes = {

+ 2 - 2
src/compiler/parser/html-parser.js

@@ -13,7 +13,7 @@ import { makeMap, no } from 'shared/util'
 import { isNonPhrasingTag, canBeLeftOpenTag } from 'web/util/index'
 
 // Regular Expressions for parsing tags and attributes
-const singleAttrIdentifier = /([^\s"'<>\/=]+)/
+const singleAttrIdentifier = /([^\s"'<>/=]+)/
 const singleAttrAssign = /(?:=)/
 const singleAttrValues = [
   // attr value double quotes
@@ -158,7 +158,7 @@ export function parseHTML (html, options) {
         if (stackedTag !== 'script' && stackedTag !== 'style' && stackedTag !== 'noscript') {
           text = text
             .replace(/<!--([\s\S]*?)-->/g, '$1')
-            .replace(/<!\[CDATA\[([\s\S]*?)\]\]>/g, '$1')
+            .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1')
         }
         if (options.chars) {
           options.chars(text)

+ 1 - 1
src/compiler/parser/index.js

@@ -21,7 +21,7 @@ export const forIteratorRE = /\(([^,]*),([^,]*)(?:,([^,]*))?\)/
 const bindRE = /^:|^v-bind:/
 const onRE = /^@|^v-on:/
 const argRE = /:(.*)$/
-const modifierRE = /\.[^\.]+/g
+const modifierRE = /\.[^.]+/g
 const specialNewlineRE = /\u2028|\u2029/g
 
 const decodeHTMLCached = cached(decode)

+ 1 - 1
src/compiler/parser/text-parser.js

@@ -4,7 +4,7 @@ import { cached } from 'shared/util'
 import { parseFilters } from './filter-parser'
 
 const defaultTagRE = /\{\{((?:.|\n)+?)\}\}/g
-const regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g
+const regexEscapeRE = /[-.*+?^${}()|[\]/\\]/g
 
 const buildRegex = cached(delimiters => {
   const open = delimiters[0].replace(regexEscapeRE, '\\$&')

+ 1 - 1
src/core/util/lang.js

@@ -23,7 +23,7 @@ export function def (obj: Object, key: string, val: any, enumerable?: boolean) {
 /**
  * Parse simple path.
  */
-const bailRE = /[^\w\.\$]/
+const bailRE = /[^\w.$]/
 export function parsePath (path: string): any {
   if (bailRE.test(path)) {
     return

+ 1 - 1
src/platforms/web/runtime/directives/model.js

@@ -6,7 +6,7 @@
 import { looseEqual, looseIndexOf } from 'shared/util'
 import { warn, isAndroid, isIE9, isIE, isEdge } from 'core/util/index'
 
-const modelableTagRE = /^input|select|textarea|vue-component-[0-9]+(-[0-9a-zA-Z_\-]*)?$/
+const modelableTagRE = /^input|select|textarea|vue-component-[0-9]+(-[0-9a-zA-Z_-]*)?$/
 
 /* istanbul ignore if */
 if (isIE9) {