@eslint-react/kit 1.40.0-beta.2 → 1.40.0-beta.3

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.
package/dist/index.d.mts CHANGED
@@ -85,6 +85,14 @@ declare const RE_SNAKE_CASE: RegExp;
85
85
  */
86
86
  declare const RE_CONSTANT_CASE: RegExp;
87
87
  declare const RE_JAVASCRIPT_PROTOCOL: RegExp;
88
+ /**
89
+ * Regular expression for matching a JSX pragma comment.
90
+ */
91
+ declare const RE_JSX_ANNOTATION: RegExp;
92
+ /**
93
+ * Regular expression for matching a valid JavaScript identifier.
94
+ */
95
+ declare const RE_JS_IDENTIFIER: RegExp;
88
96
  /**
89
97
  * Regular expression for matching a RegExp string.
90
98
  */
@@ -93,7 +101,7 @@ declare const RE_REGEXP_STR: RegExp;
93
101
  * Convert a string to the `RegExp`.
94
102
  * Normal strings (e.g. `"foo"`) is converted to `/^foo$/` of `RegExp`.
95
103
  * Strings like `"/^foo/i"` are converted to `/^foo/i` of `RegExp`.
96
- *
104
+ * @see https://github.com/sveltejs/eslint-plugin-svelte/blob/main/packages/eslint-plugin-svelte/src/utils/regexp.ts
97
105
  * @param string The string to convert.
98
106
  * @returns Returns the `RegExp`.
99
107
  */
@@ -107,4 +115,4 @@ declare function toRegExp(string: string): {
107
115
  */
108
116
  declare function isRegExp(string: string): boolean;
109
117
 
110
- export { index as JsxRuntime, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_JS_EXT, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, type RuleContext, type RuleDeclaration, type RuleFeature, type RulePreset, type RuleSeverity, createReport, isRegExp, toRegExp };
118
+ export { index as JsxRuntime, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_JSX_ANNOTATION, RE_JS_EXT, RE_JS_IDENTIFIER, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, type RuleContext, type RuleDeclaration, type RuleFeature, type RulePreset, type RuleSeverity, createReport, isRegExp, toRegExp };
package/dist/index.d.ts CHANGED
@@ -85,6 +85,14 @@ declare const RE_SNAKE_CASE: RegExp;
85
85
  */
86
86
  declare const RE_CONSTANT_CASE: RegExp;
87
87
  declare const RE_JAVASCRIPT_PROTOCOL: RegExp;
88
+ /**
89
+ * Regular expression for matching a JSX pragma comment.
90
+ */
91
+ declare const RE_JSX_ANNOTATION: RegExp;
92
+ /**
93
+ * Regular expression for matching a valid JavaScript identifier.
94
+ */
95
+ declare const RE_JS_IDENTIFIER: RegExp;
88
96
  /**
89
97
  * Regular expression for matching a RegExp string.
90
98
  */
@@ -93,7 +101,7 @@ declare const RE_REGEXP_STR: RegExp;
93
101
  * Convert a string to the `RegExp`.
94
102
  * Normal strings (e.g. `"foo"`) is converted to `/^foo$/` of `RegExp`.
95
103
  * Strings like `"/^foo/i"` are converted to `/^foo/i` of `RegExp`.
96
- *
104
+ * @see https://github.com/sveltejs/eslint-plugin-svelte/blob/main/packages/eslint-plugin-svelte/src/utils/regexp.ts
97
105
  * @param string The string to convert.
98
106
  * @returns Returns the `RegExp`.
99
107
  */
@@ -107,4 +115,4 @@ declare function toRegExp(string: string): {
107
115
  */
108
116
  declare function isRegExp(string: string): boolean;
109
117
 
110
- export { index as JsxRuntime, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_JS_EXT, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, type RuleContext, type RuleDeclaration, type RuleFeature, type RulePreset, type RuleSeverity, createReport, isRegExp, toRegExp };
118
+ export { index as JsxRuntime, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_JSX_ANNOTATION, RE_JS_EXT, RE_JS_IDENTIFIER, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, type RuleContext, type RuleDeclaration, type RuleFeature, type RulePreset, type RuleSeverity, createReport, isRegExp, toRegExp };
package/dist/index.js CHANGED
@@ -33,6 +33,8 @@ var RE_KEBAB_CASE = /^[a-z][\d\-a-z]*$/u;
33
33
  var RE_SNAKE_CASE = /^[a-z][\d_a-z]*$/u;
34
34
  var RE_CONSTANT_CASE = /^[A-Z][\d_A-Z]*$/u;
35
35
  var RE_JAVASCRIPT_PROTOCOL = /^[\u0000-\u001F ]*j[\t\n\r]*a[\t\n\r]*v[\t\n\r]*a[\t\n\r]*s[\t\n\r]*c[\t\n\r]*r[\t\n\r]*i[\t\n\r]*p[\t\n\r]*t[\t\n\r]*:/iu;
36
+ var RE_JSX_ANNOTATION = /@jsx\s+(\S+)/;
37
+ var RE_JS_IDENTIFIER = /^[_$a-z][\w$]*$/i;
36
38
  var RE_REGEXP_STR = /^\/(.+)\/([A-Za-z]*)$/u;
37
39
  function toRegExp(string) {
38
40
  const [, pattern, flags = "u"] = RE_REGEXP_STR.exec(string) ?? [];
@@ -54,7 +56,9 @@ exports.JsxRuntime = JsxRuntime_exports;
54
56
  exports.RE_CAMEL_CASE = RE_CAMEL_CASE;
55
57
  exports.RE_CONSTANT_CASE = RE_CONSTANT_CASE;
56
58
  exports.RE_JAVASCRIPT_PROTOCOL = RE_JAVASCRIPT_PROTOCOL;
59
+ exports.RE_JSX_ANNOTATION = RE_JSX_ANNOTATION;
57
60
  exports.RE_JS_EXT = RE_JS_EXT;
61
+ exports.RE_JS_IDENTIFIER = RE_JS_IDENTIFIER;
58
62
  exports.RE_KEBAB_CASE = RE_KEBAB_CASE;
59
63
  exports.RE_PASCAL_CASE = RE_PASCAL_CASE;
60
64
  exports.RE_REGEXP_STR = RE_REGEXP_STR;
package/dist/index.mjs CHANGED
@@ -31,6 +31,8 @@ var RE_KEBAB_CASE = /^[a-z][\d\-a-z]*$/u;
31
31
  var RE_SNAKE_CASE = /^[a-z][\d_a-z]*$/u;
32
32
  var RE_CONSTANT_CASE = /^[A-Z][\d_A-Z]*$/u;
33
33
  var RE_JAVASCRIPT_PROTOCOL = /^[\u0000-\u001F ]*j[\t\n\r]*a[\t\n\r]*v[\t\n\r]*a[\t\n\r]*s[\t\n\r]*c[\t\n\r]*r[\t\n\r]*i[\t\n\r]*p[\t\n\r]*t[\t\n\r]*:/iu;
34
+ var RE_JSX_ANNOTATION = /@jsx\s+(\S+)/;
35
+ var RE_JS_IDENTIFIER = /^[_$a-z][\w$]*$/i;
34
36
  var RE_REGEXP_STR = /^\/(.+)\/([A-Za-z]*)$/u;
35
37
  function toRegExp(string) {
36
38
  const [, pattern, flags = "u"] = RE_REGEXP_STR.exec(string) ?? [];
@@ -48,4 +50,4 @@ function createReport(context) {
48
50
  };
49
51
  }
50
52
 
51
- export { JsxRuntime_exports as JsxRuntime, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_JS_EXT, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, createReport, isRegExp, toRegExp };
53
+ export { JsxRuntime_exports as JsxRuntime, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_JSX_ANNOTATION, RE_JS_EXT, RE_JS_IDENTIFIER, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, createReport, isRegExp, toRegExp };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/kit",
3
- "version": "1.40.0-beta.2",
3
+ "version": "1.40.0-beta.3",
4
4
  "description": "ESLint React's Plugin Kit for building plugins and rules.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@typescript-eslint/utils": "^8.29.0",
39
39
  "ts-pattern": "^5.7.0",
40
- "@eslint-react/eff": "1.40.0-beta.2"
40
+ "@eslint-react/eff": "1.40.0-beta.3"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@tsconfig/node22": "^22.0.1",