@eslint-react/shared 1.36.1-next.0 → 1.36.2-beta.0

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
@@ -1,6 +1,7 @@
1
1
  import { ESLintUtils } from '@typescript-eslint/utils';
2
- import { _ } from '@eslint-react/eff';
3
2
  import * as tseslint from '@typescript-eslint/utils/ts-eslint';
3
+ import { ReportDescriptor } from '@typescript-eslint/utils/ts-eslint';
4
+ import { _ } from '@eslint-react/eff';
4
5
 
5
6
  /**
6
7
  * The NPM scope for this project.
@@ -52,6 +53,41 @@ declare const getId: () => string;
52
53
 
53
54
  declare function getReactVersion(fallback?: string): string;
54
55
 
56
+ /**
57
+ * Rule severity.
58
+ * @since 0.0.1
59
+ */
60
+ type RuleSeverity = "error" | "off" | "warn";
61
+ /**
62
+ * Rule declaration.
63
+ * @internal
64
+ * @since 0.0.1
65
+ */
66
+ type RuleDeclaration = [RuleSeverity, Record<string, unknown>?] | RuleSeverity;
67
+ /**
68
+ * Rule config preset.
69
+ * @since 0.0.1
70
+ */
71
+ type RulePreset = Record<string, RuleDeclaration>;
72
+ /**
73
+ * Rule context.
74
+ * @since 0.0.1
75
+ */
76
+ type RuleContext<MessageIds extends string = string, Options extends readonly unknown[] = readonly unknown[]> = tseslint.RuleContext<MessageIds, Options>;
77
+ /**
78
+ * Rule namespace.
79
+ * @since 0.0.1
80
+ */
81
+ type RuleNamespace = "x" | "dom" | "web-api" | "hooks-extra" | "naming-convention" | "debug";
82
+ /**
83
+ * Rule feature.
84
+ * @since 1.20.0
85
+ */
86
+ type RuleFeature = "CFG" | "CHK" | "DBG" | "FIX" | "MOD" | "TSC";
87
+ type RuleStatus = "stable" | "experimental" | "deprecated" | "removed";
88
+
89
+ declare function report<MessageID extends string>(context: RuleContext): (descriptor: undefined | null | ReportDescriptor<MessageID>) => void;
90
+
55
91
  /**
56
92
  * Fallback type.
57
93
  */
@@ -2321,37 +2357,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
2321
2357
  }
2322
2358
  }
2323
2359
 
2324
- /**
2325
- * Rule severity.
2326
- * @since 0.0.1
2327
- */
2328
- type RuleSeverity = "error" | "off" | "warn";
2329
- /**
2330
- * Rule declaration.
2331
- * @internal
2332
- * @since 0.0.1
2333
- */
2334
- type RuleDeclaration = [RuleSeverity, Record<string, unknown>?] | RuleSeverity;
2335
- /**
2336
- * Rule config preset.
2337
- * @since 0.0.1
2338
- */
2339
- type RulePreset = Record<string, RuleDeclaration>;
2340
- /**
2341
- * Rule context.
2342
- * @since 0.0.1
2343
- */
2344
- type RuleContext<MessageIds extends string = string, Options extends readonly unknown[] = readonly unknown[]> = tseslint.RuleContext<MessageIds, Options>;
2345
- /**
2346
- * Rule namespace.
2347
- * @since 0.0.1
2348
- */
2349
- type RuleNamespace = "x" | "dom" | "web-api" | "hooks-extra" | "naming-convention" | "debug";
2350
- /**
2351
- * Rule feature.
2352
- * @since 1.20.0
2353
- */
2354
- type RuleFeature = "CFG" | "CHK" | "DBG" | "FIX" | "MOD" | "TSC";
2355
- type RuleStatus = "stable" | "experimental" | "deprecated" | "removed";
2356
-
2357
- export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, REACT_BUILD_IN_HOOKS, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, type RuleContext, type RuleDeclaration, type RuleFeature, type RuleNamespace, type RulePreset, type RuleSeverity, type RuleStatus, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, getId, getReactVersion, getSettingsFromContext, isInEditorEnv, isInGitHooksOrLintStaged, toNormalizedSettings, unsafeDecodeSettings };
2360
+ export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, REACT_BUILD_IN_HOOKS, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, type RuleContext, type RuleDeclaration, type RuleFeature, type RuleNamespace, type RulePreset, type RuleSeverity, type RuleStatus, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, getId, getReactVersion, getSettingsFromContext, isInEditorEnv, isInGitHooksOrLintStaged, report, toNormalizedSettings, unsafeDecodeSettings };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { ESLintUtils } from '@typescript-eslint/utils';
2
- import { _ } from '@eslint-react/eff';
3
2
  import * as tseslint from '@typescript-eslint/utils/ts-eslint';
3
+ import { ReportDescriptor } from '@typescript-eslint/utils/ts-eslint';
4
+ import { _ } from '@eslint-react/eff';
4
5
 
5
6
  /**
6
7
  * The NPM scope for this project.
@@ -52,6 +53,41 @@ declare const getId: () => string;
52
53
 
53
54
  declare function getReactVersion(fallback?: string): string;
54
55
 
56
+ /**
57
+ * Rule severity.
58
+ * @since 0.0.1
59
+ */
60
+ type RuleSeverity = "error" | "off" | "warn";
61
+ /**
62
+ * Rule declaration.
63
+ * @internal
64
+ * @since 0.0.1
65
+ */
66
+ type RuleDeclaration = [RuleSeverity, Record<string, unknown>?] | RuleSeverity;
67
+ /**
68
+ * Rule config preset.
69
+ * @since 0.0.1
70
+ */
71
+ type RulePreset = Record<string, RuleDeclaration>;
72
+ /**
73
+ * Rule context.
74
+ * @since 0.0.1
75
+ */
76
+ type RuleContext<MessageIds extends string = string, Options extends readonly unknown[] = readonly unknown[]> = tseslint.RuleContext<MessageIds, Options>;
77
+ /**
78
+ * Rule namespace.
79
+ * @since 0.0.1
80
+ */
81
+ type RuleNamespace = "x" | "dom" | "web-api" | "hooks-extra" | "naming-convention" | "debug";
82
+ /**
83
+ * Rule feature.
84
+ * @since 1.20.0
85
+ */
86
+ type RuleFeature = "CFG" | "CHK" | "DBG" | "FIX" | "MOD" | "TSC";
87
+ type RuleStatus = "stable" | "experimental" | "deprecated" | "removed";
88
+
89
+ declare function report<MessageID extends string>(context: RuleContext): (descriptor: undefined | null | ReportDescriptor<MessageID>) => void;
90
+
55
91
  /**
56
92
  * Fallback type.
57
93
  */
@@ -2321,37 +2357,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
2321
2357
  }
2322
2358
  }
2323
2359
 
2324
- /**
2325
- * Rule severity.
2326
- * @since 0.0.1
2327
- */
2328
- type RuleSeverity = "error" | "off" | "warn";
2329
- /**
2330
- * Rule declaration.
2331
- * @internal
2332
- * @since 0.0.1
2333
- */
2334
- type RuleDeclaration = [RuleSeverity, Record<string, unknown>?] | RuleSeverity;
2335
- /**
2336
- * Rule config preset.
2337
- * @since 0.0.1
2338
- */
2339
- type RulePreset = Record<string, RuleDeclaration>;
2340
- /**
2341
- * Rule context.
2342
- * @since 0.0.1
2343
- */
2344
- type RuleContext<MessageIds extends string = string, Options extends readonly unknown[] = readonly unknown[]> = tseslint.RuleContext<MessageIds, Options>;
2345
- /**
2346
- * Rule namespace.
2347
- * @since 0.0.1
2348
- */
2349
- type RuleNamespace = "x" | "dom" | "web-api" | "hooks-extra" | "naming-convention" | "debug";
2350
- /**
2351
- * Rule feature.
2352
- * @since 1.20.0
2353
- */
2354
- type RuleFeature = "CFG" | "CHK" | "DBG" | "FIX" | "MOD" | "TSC";
2355
- type RuleStatus = "stable" | "experimental" | "deprecated" | "removed";
2356
-
2357
- export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, REACT_BUILD_IN_HOOKS, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, type RuleContext, type RuleDeclaration, type RuleFeature, type RuleNamespace, type RulePreset, type RuleSeverity, type RuleStatus, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, getId, getReactVersion, getSettingsFromContext, isInEditorEnv, isInGitHooksOrLintStaged, toNormalizedSettings, unsafeDecodeSettings };
2360
+ export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, REACT_BUILD_IN_HOOKS, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, type RuleContext, type RuleDeclaration, type RuleFeature, type RuleNamespace, type RulePreset, type RuleSeverity, type RuleStatus, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, getId, getReactVersion, getSettingsFromContext, isInEditorEnv, isInGitHooksOrLintStaged, report, toNormalizedSettings, unsafeDecodeSettings };
package/dist/index.js CHANGED
@@ -77,6 +77,13 @@ function getReactVersion(fallback = "19.0.0") {
77
77
  }
78
78
  }
79
79
 
80
+ // src/report.ts
81
+ function report(context) {
82
+ return (descriptor) => {
83
+ if (descriptor != null) context.report(descriptor);
84
+ };
85
+ }
86
+
80
87
  // ../../node_modules/.pnpm/valibot@1.0.0-rc.4_typescript@5.8.2/node_modules/valibot/dist/index.js
81
88
  var store;
82
89
  // @__NO_SIDE_EFFECTS__
@@ -1335,5 +1342,6 @@ exports.getReactVersion = getReactVersion;
1335
1342
  exports.getSettingsFromContext = getSettingsFromContext;
1336
1343
  exports.isInEditorEnv = isInEditorEnv;
1337
1344
  exports.isInGitHooksOrLintStaged = isInGitHooksOrLintStaged;
1345
+ exports.report = report;
1338
1346
  exports.toNormalizedSettings = toNormalizedSettings;
1339
1347
  exports.unsafeDecodeSettings = unsafeDecodeSettings;
package/dist/index.mjs CHANGED
@@ -69,6 +69,13 @@ function getReactVersion(fallback = "19.0.0") {
69
69
  }
70
70
  }
71
71
 
72
+ // src/report.ts
73
+ function report(context) {
74
+ return (descriptor) => {
75
+ if (descriptor != null) context.report(descriptor);
76
+ };
77
+ }
78
+
72
79
  // ../../node_modules/.pnpm/valibot@1.0.0-rc.4_typescript@5.8.2/node_modules/valibot/dist/index.js
73
80
  var store;
74
81
  // @__NO_SIDE_EFFECTS__
@@ -1303,4 +1310,4 @@ function getSettingsFromContext(context) {
1303
1310
  }
1304
1311
  var defineSettings = identity;
1305
1312
 
1306
- export { CustomComponentPropSchema, CustomComponentSchema, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, REACT_BUILD_IN_HOOKS, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, getId, getReactVersion, getSettingsFromContext, isInEditorEnv, isInGitHooksOrLintStaged, toNormalizedSettings, unsafeDecodeSettings };
1313
+ export { CustomComponentPropSchema, CustomComponentSchema, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, REACT_BUILD_IN_HOOKS, RE_CAMEL_CASE, RE_CONSTANT_CASE, RE_JAVASCRIPT_PROTOCOL, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_SNAKE_CASE, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, getId, getReactVersion, getSettingsFromContext, isInEditorEnv, isInGitHooksOrLintStaged, report, toNormalizedSettings, unsafeDecodeSettings };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/shared",
3
- "version": "1.36.1-next.0",
3
+ "version": "1.36.2-beta.0",
4
4
  "description": "ESLint React's Shared constants and functions.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -38,7 +38,7 @@
38
38
  "@typescript-eslint/utils": "^8.26.1",
39
39
  "picomatch": "^4.0.2",
40
40
  "ts-pattern": "^5.6.2",
41
- "@eslint-react/eff": "1.36.1-next.0"
41
+ "@eslint-react/eff": "1.36.2-beta.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/picomatch": "^3.0.2",