eslint-plugin-vue
Advanced tools
Comparing version 3.7.0 to 3.8.0
@@ -11,2 +11,4 @@ /* | ||
"vue/jsx-uses-vars": "error", | ||
"vue/name-property-casing": "off", | ||
"vue/no-async-in-computed-properties": "off", | ||
"vue/no-confusing-v-for-v-if": "error", | ||
@@ -29,2 +31,3 @@ "vue/no-duplicate-attributes": "off", | ||
"vue/no-parsing-error": "error", | ||
"vue/no-shared-component-data": "off", | ||
"vue/no-side-effects-in-computed-properties": "off", | ||
@@ -31,0 +34,0 @@ "vue/no-template-key": "off", |
@@ -36,3 +36,3 @@ /** | ||
}, | ||
utils.executeOnVueComponent(context, (obj) => { | ||
utils.executeOnVue(context, (obj) => { | ||
const computedProperties = utils.getComputedProperties(obj) | ||
@@ -43,2 +43,3 @@ | ||
if ( | ||
cp.value && | ||
node.loc.start.line >= cp.value.loc.start.line && | ||
@@ -45,0 +46,0 @@ node.loc.end.line <= cp.value.loc.end.line |
@@ -83,3 +83,3 @@ /** | ||
return utils.executeOnVueComponent(context, (obj) => { | ||
return utils.executeOnVue(context, (obj) => { | ||
checkOrder(obj.properties, orderMap, context) | ||
@@ -86,0 +86,0 @@ }) |
@@ -64,3 +64,3 @@ /** | ||
}, | ||
utils.executeOnVueComponent(context, properties => { | ||
utils.executeOnVue(context, properties => { | ||
const computedProperties = utils.getComputedProperties(properties) | ||
@@ -67,0 +67,0 @@ |
@@ -366,2 +366,21 @@ /** | ||
executeOnVue (context, cb) { | ||
return Object.assign( | ||
this.executeOnVueComponent(context, cb), | ||
this.executeOnVueInstance(context, cb) | ||
) | ||
}, | ||
executeOnVueInstance (context, cb) { | ||
const _this = this | ||
return { | ||
'NewExpression:exit' (node) { | ||
// new Vue({}) | ||
if (!_this.isVueInstance(node)) return | ||
cb(node.arguments[0]) | ||
} | ||
} | ||
}, | ||
executeOnVueComponent (context, cb) { | ||
@@ -381,7 +400,2 @@ const filePath = context.getFilename() | ||
cb(node.arguments.slice(-1)[0]) | ||
}, | ||
'NewExpression:exit' (node) { | ||
// new Vue({}) | ||
if (!_this.isVueInstance(node)) return | ||
cb(node.arguments[0]) | ||
} | ||
@@ -388,0 +402,0 @@ } |
{ | ||
"name": "eslint-plugin-vue", | ||
"version": "3.7.0", | ||
"version": "3.8.0", | ||
"description": "Official ESLint plugin for Vue.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -69,2 +69,3 @@ # eslint-plugin-vue | ||
| :wrench: | [html-no-self-closing](./docs/rules/html-no-self-closing.md) | disallow self-closing elements. | | ||
| | [no-async-in-computed-properties](./docs/rules/no-async-in-computed-properties.md) | Check if there are no asynchronous actions inside computed properties. | | ||
| :white_check_mark: | [no-confusing-v-for-v-if](./docs/rules/no-confusing-v-for-v-if.md) | disallow confusing `v-for` and `v-if` on the same element. | | ||
@@ -84,2 +85,3 @@ | | [no-duplicate-attributes](./docs/rules/no-duplicate-attributes.md) | disallow duplicate attributes. | | ||
| | [html-quotes](./docs/rules/html-quotes.md) | enforce quotes style of HTML attributes. | | ||
| :wrench: | [name-property-casing](./docs/rules/name-property-casing.md) | Requires specific casing for the name property in Vue components | | ||
| :wrench: | [v-bind-style](./docs/rules/v-bind-style.md) | enforce `v-bind` directive style. | | ||
@@ -115,2 +117,3 @@ | :wrench: | [v-on-style](./docs/rules/v-on-style.md) | enforce `v-on` directive style. | | ||
| :white_check_mark: | [no-parsing-error](./docs/rules/no-parsing-error.md) | disallow parsing errors in `<template>`. | | ||
| | [no-shared-component-data](./docs/rules/no-shared-component-data.md) | Enforces component's data property to be a function. | | ||
| | [no-template-key](./docs/rules/no-template-key.md) | disallow `key` attribute on `<template>`. | | ||
@@ -117,0 +120,0 @@ | | [return-in-computed-property](./docs/rules/return-in-computed-property.md) | Enforces that a return statement is present in computed property. | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101954
44
2878
170