diff --git a/.changeset/swift-dolls-joke.md b/.changeset/swift-dolls-joke.md new file mode 100644 index 00000000..9d903a81 --- /dev/null +++ b/.changeset/swift-dolls-joke.md @@ -0,0 +1,5 @@ +--- +"eslint-plugin-vue-scoped-css": patch +--- + +fix(deps): update dependency eslint-compat-utils to ^0.3.0 diff --git a/package-lock.json b/package-lock.json index c54bfab7..f4e22a17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "eslint-plugin-vue-scoped-css", - "version": "2.6.1", + "version": "2.7.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "eslint-plugin-vue-scoped-css", - "version": "2.6.1", + "version": "2.7.0", "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "eslint-compat-utils": "^0.2.1", + "eslint-compat-utils": "^0.3.1", "lodash": "^4.17.21", "postcss": "^8.4.31", "postcss-safe-parser": "^6.0.0", @@ -10378,9 +10378,9 @@ } }, "node_modules/eslint-compat-utils": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.2.1.tgz", - "integrity": "sha512-+0mhJhMeVaiMrgtltweI3sThf8g9VSZKVNSna6gdULUycp9HmcTvcYTw+b7YY+OUHAPXmRiJ9fvsDFnQq9i//A==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.3.1.tgz", + "integrity": "sha512-TgO8WtGv23/uACVuCWdfH1GWHGd5DfvJcqukz9Wh5n+QyW5f7HcM9i/U7GVX7WWLYA+w1sVcW7Ur7ZPPAiX8TA==", "dependencies": { "semver": "^7.5.4" }, @@ -33618,9 +33618,9 @@ } }, "eslint-compat-utils": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.2.1.tgz", - "integrity": "sha512-+0mhJhMeVaiMrgtltweI3sThf8g9VSZKVNSna6gdULUycp9HmcTvcYTw+b7YY+OUHAPXmRiJ9fvsDFnQq9i//A==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.3.1.tgz", + "integrity": "sha512-TgO8WtGv23/uACVuCWdfH1GWHGd5DfvJcqukz9Wh5n+QyW5f7HcM9i/U7GVX7WWLYA+w1sVcW7Ur7ZPPAiX8TA==", "requires": { "semver": "^7.5.4" } diff --git a/package.json b/package.json index 286ef9ee..43a33902 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ }, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "eslint-compat-utils": "^0.2.1", + "eslint-compat-utils": "^0.3.1", "lodash": "^4.17.21", "postcss": "^8.4.31", "postcss-safe-parser": "^6.0.0", diff --git a/tests/lib/comment-directives.ts b/tests/lib/comment-directives.ts index f251a655..ae48cd9b 100644 --- a/tests/lib/comment-directives.ts +++ b/tests/lib/comment-directives.ts @@ -1,13 +1,9 @@ -import { RuleTester } from "./test-lib/eslint-compat"; -import { Linter } from "eslint"; +import { RuleTester, testRuleIdPrefix } from "./test-lib/eslint-compat"; import rule = require("../../lib/rules/no-unused-selector"); -import * as semver from "semver"; import * as vueParser from "vue-eslint-parser"; -const testRulePrefix = semver.gte(Linter.version, "9.0.0-0") - ? "rule-to-test/" - : ""; +const testRulePrefix = testRuleIdPrefix; const tester = new RuleTester({ languageOptions: { diff --git a/tests/lib/test-lib/eslint-compat.ts b/tests/lib/test-lib/eslint-compat.ts index 3e9418c9..6e541a36 100644 --- a/tests/lib/test-lib/eslint-compat.ts +++ b/tests/lib/test-lib/eslint-compat.ts @@ -1,8 +1,12 @@ -import { getRuleTester } from "eslint-compat-utils/rule-tester"; +import { + getRuleTester, + getRuleIdPrefix, +} from "eslint-compat-utils/rule-tester"; import { getLegacyESLint } from "eslint-compat-utils/eslint"; // eslint-disable-next-line @typescript-eslint/naming-convention -- Class name export const RuleTester = getRuleTester(); +export const testRuleIdPrefix = getRuleIdPrefix(); // eslint-disable-next-line @typescript-eslint/naming-convention -- Class name export const LegacyESLint = getLegacyESLint();