@typescript-eslint/eslint-plugin 8.72.2-alpha.7 → 8.72.2-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -170,12 +170,13 @@ exports.default = (0, util_1.createRule)({
170
170
  /**
171
171
  * Parse a given `RegExp` pattern to that string if it's a static string.
172
172
  * @param pattern The RegExp pattern text to parse.
173
- * @param unicode Whether the RegExp is unicode.
173
+ * @param flags The RegExp's flags, of which `u` and `v` change how the pattern parses.
174
174
  */
175
- function parseRegExpText(pattern, unicode) {
175
+ function parseRegExpText(pattern, flags) {
176
176
  // Parse it.
177
177
  const ast = regexpp.parsePattern(pattern, undefined, undefined, {
178
- unicode,
178
+ unicode: flags.includes('u'),
179
+ unicodeSets: flags.includes('v'),
179
180
  });
180
181
  if (ast.alternatives.length !== 1) {
181
182
  return null;
@@ -214,7 +215,7 @@ exports.default = (0, util_1.createRule)({
214
215
  flags.includes('m')) {
215
216
  return null;
216
217
  }
217
- const text = parseRegExpText(source, flags.includes('u'));
218
+ const text = parseRegExpText(source, flags);
218
219
  if (text == null) {
219
220
  return null;
220
221
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/eslint-plugin",
3
- "version": "8.72.2-alpha.7",
3
+ "version": "8.72.2-alpha.8",
4
4
  "description": "TypeScript plugin for ESLint",
5
5
  "files": [
6
6
  "dist",
@@ -47,10 +47,10 @@
47
47
  ],
48
48
  "dependencies": {
49
49
  "@eslint-community/regexpp": "^4.12.2",
50
- "@typescript-eslint/scope-manager": "8.72.2-alpha.7",
51
- "@typescript-eslint/type-utils": "8.72.2-alpha.7",
52
- "@typescript-eslint/utils": "8.72.2-alpha.7",
53
- "@typescript-eslint/visitor-keys": "8.72.2-alpha.7",
50
+ "@typescript-eslint/scope-manager": "8.72.2-alpha.8",
51
+ "@typescript-eslint/type-utils": "8.72.2-alpha.8",
52
+ "@typescript-eslint/utils": "8.72.2-alpha.8",
53
+ "@typescript-eslint/visitor-keys": "8.72.2-alpha.8",
54
54
  "ignore": "^7.0.5",
55
55
  "natural-compare": "^1.4.0",
56
56
  "ts-api-utils": "^2.5.0"
@@ -60,8 +60,8 @@
60
60
  "@types/mdast": "^4.0.4",
61
61
  "@types/natural-compare": "^1.4.3",
62
62
  "@types/react": "^18.3.21",
63
- "@typescript-eslint/rule-schema-to-typescript-types": "8.72.2-alpha.7",
64
- "@typescript-eslint/rule-tester": "8.72.2-alpha.7",
63
+ "@typescript-eslint/rule-schema-to-typescript-types": "8.72.2-alpha.8",
64
+ "@typescript-eslint/rule-tester": "8.72.2-alpha.8",
65
65
  "@typescript/native": "npm:typescript@^7.0.2",
66
66
  "@vitest/coverage-v8": "^5.0.3",
67
67
  "ajv": "^6.12.6",
@@ -81,7 +81,7 @@
81
81
  "vitest": "^5.0.3"
82
82
  },
83
83
  "peerDependencies": {
84
- "@typescript-eslint/parser": "^8.72.2-alpha.7",
84
+ "@typescript-eslint/parser": "^8.72.2-alpha.8",
85
85
  "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
86
86
  "typescript": ">=4.8.4 <6.1.0"
87
87
  },