From f581040fdb211345a4af92232447afd162052aa6 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Sun, 14 Feb 2021 09:48:40 +0900 Subject: [PATCH] Upgrade vue-eslint-parser to v7.5.0 --- package.json | 2 +- tests/lib/rules/no-restricted-syntax.js | 35 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d3ef63e66..0d33765a5 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "eslint-utils": "^2.1.0", "natural-compare": "^1.4.0", "semver": "^7.3.2", - "vue-eslint-parser": "^7.4.1" + "vue-eslint-parser": "^7.5.0" }, "devDependencies": { "@types/eslint": "^7.2.0", diff --git a/tests/lib/rules/no-restricted-syntax.js b/tests/lib/rules/no-restricted-syntax.js index e7b3d4480..662c2296f 100644 --- a/tests/lib/rules/no-restricted-syntax.js +++ b/tests/lib/rules/no-restricted-syntax.js @@ -36,6 +36,20 @@ tester.run('no-restricted-syntax', rule, { message: 'Call expressions are not allowed.' } ] + }, + + { + // https://github.com/vuejs/eslint-plugin-vue/issues/870 + code: ` + `, + options: [ + { + selector: 'CallExpression > :nth-child(3)[value!=true]', + message: 'Third argument of interpolate must be true' + } + ] } ], invalid: [ @@ -148,6 +162,27 @@ tester.run('no-restricted-syntax', rule, { 'Call expressions are not allowed.', 'Call expressions are not allowed.' ] + }, + + { + // https://github.com/vuejs/eslint-plugin-vue/issues/870 + code: ` + `, + options: [ + { + selector: 'CallExpression > :nth-child(3)[value!=true]', + message: 'Third argument of interpolate must be true' + } + ], + errors: [ + { + message: 'Third argument of interpolate must be true', + line: 3, + column: 48 + } + ] } ] })