From b51b9eae4d427d0a909aff8c5f08575c450711a1 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 31 Oct 2016 16:28:38 -0400 Subject: [PATCH] bump eslint config --- package.json | 4 ++-- src/compiler/codegen/events.js | 2 +- src/compiler/parser/html-parser.js | 4 ++-- src/compiler/parser/index.js | 2 +- src/compiler/parser/text-parser.js | 2 +- src/core/util/lang.js | 2 +- src/platforms/web/runtime/directives/model.js | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 794bcaa4b03..4ec609e4c82 100644 --- a/package.json +++ b/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", diff --git a/src/compiler/codegen/events.js b/src/compiler/codegen/events.js index 79c79404662..20f8b3b1f6a 100644 --- a/src/compiler/codegen/events.js +++ b/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 = { diff --git a/src/compiler/parser/html-parser.js b/src/compiler/parser/html-parser.js index 930817173f8..3afc42544e3 100644 --- a/src/compiler/parser/html-parser.js +++ b/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(//g, '$1') - .replace(//g, '$1') + .replace(//g, '$1') } if (options.chars) { options.chars(text) diff --git a/src/compiler/parser/index.js b/src/compiler/parser/index.js index 45a235f576f..1c49f14e13a 100644 --- a/src/compiler/parser/index.js +++ b/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) diff --git a/src/compiler/parser/text-parser.js b/src/compiler/parser/text-parser.js index 10613d11e0c..34f1e018e9d 100644 --- a/src/compiler/parser/text-parser.js +++ b/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, '\\$&') diff --git a/src/core/util/lang.js b/src/core/util/lang.js index 4253a735911..d8000622789 100644 --- a/src/core/util/lang.js +++ b/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 diff --git a/src/platforms/web/runtime/directives/model.js b/src/platforms/web/runtime/directives/model.js index 239f0b06a0b..1cf3c006cff 100644 --- a/src/platforms/web/runtime/directives/model.js +++ b/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) {