diff --git a/package-lock.json b/package-lock.json index 7a233c3b..1f82d1bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-vue-scoped-css", - "version": "0.3.3", + "version": "0.3.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ae640686..07a87d7c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-vue-scoped-css", - "version": "0.3.3", + "version": "0.3.4", "description": "ESLint plugin for Scoped CSS in Vue.js", "main": "dist/index.js", "scripts": { diff --git a/tests/lib/rules/require-scoped.ts b/tests/lib/rules/require-scoped.ts index 0d0236a5..b868204e 100644 --- a/tests/lib/rules/require-scoped.ts +++ b/tests/lib/rules/require-scoped.ts @@ -1,6 +1,9 @@ import { RuleTester } from "eslint" +import semver from "semver" const rule = require("../../../lib/rules/require-scoped") +const parserVersion = require("vue-eslint-parser/package.json").version + const tester = new RuleTester({ parser: require.resolve("vue-eslint-parser"), parserOptions: { @@ -81,5 +84,25 @@ tester.run("require-scoped", rule, { }, ], }, + ...(semver.satisfies(parserVersion, ">=7.0.0") + ? [ + { + code: ` + +