@eslint-react/shared 1.26.0-beta.5 → 1.26.0-next.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 +1 -4
- package/dist/index.d.ts +1 -4
- package/dist/index.js +0 -16
- package/dist/index.mjs +1 -15
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -52,9 +52,6 @@ declare const REACT_BUILD_IN_HOOKS: readonly ["use", "useActionState", "useCallb
|
|
|
52
52
|
*/
|
|
53
53
|
declare const createRuleForPlugin: (pluginName: string) => <Options extends readonly unknown[], MessageIds extends string>({ meta, name, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds, unknown>>) => ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
|
|
54
54
|
|
|
55
|
-
declare function isInEditorEnv(): boolean;
|
|
56
|
-
declare function isInGitHooksOrLintStaged(): boolean;
|
|
57
|
-
|
|
58
55
|
declare const getId: () => string;
|
|
59
56
|
|
|
60
57
|
declare function getReactVersion(fallback?: string): string;
|
|
@@ -2304,4 +2301,4 @@ type RuleNamespace = "x" | "dom" | "web-api" | "hooks-extra" | "naming-conventio
|
|
|
2304
2301
|
*/
|
|
2305
2302
|
type RuleFeature = "CFG" | "CHK" | "DBG" | "FIX" | "MOD" | "TSC";
|
|
2306
2303
|
|
|
2307
|
-
export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DOM_HTML_COMPONENT_TYPES, DOM_SVG_COMPONENT_TYPES, 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 RuleOptions, type RulePreset, type RuleSeverity, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, getId, getReactVersion, getSettingsFromContext,
|
|
2304
|
+
export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DOM_HTML_COMPONENT_TYPES, DOM_SVG_COMPONENT_TYPES, 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 RuleOptions, type RulePreset, type RuleSeverity, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, getId, getReactVersion, getSettingsFromContext, toNormalizedSettings, unsafeDecodeSettings };
|
package/dist/index.d.ts
CHANGED
|
@@ -52,9 +52,6 @@ declare const REACT_BUILD_IN_HOOKS: readonly ["use", "useActionState", "useCallb
|
|
|
52
52
|
*/
|
|
53
53
|
declare const createRuleForPlugin: (pluginName: string) => <Options extends readonly unknown[], MessageIds extends string>({ meta, name, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds, unknown>>) => ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
|
|
54
54
|
|
|
55
|
-
declare function isInEditorEnv(): boolean;
|
|
56
|
-
declare function isInGitHooksOrLintStaged(): boolean;
|
|
57
|
-
|
|
58
55
|
declare const getId: () => string;
|
|
59
56
|
|
|
60
57
|
declare function getReactVersion(fallback?: string): string;
|
|
@@ -2304,4 +2301,4 @@ type RuleNamespace = "x" | "dom" | "web-api" | "hooks-extra" | "naming-conventio
|
|
|
2304
2301
|
*/
|
|
2305
2302
|
type RuleFeature = "CFG" | "CHK" | "DBG" | "FIX" | "MOD" | "TSC";
|
|
2306
2303
|
|
|
2307
|
-
export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DOM_HTML_COMPONENT_TYPES, DOM_SVG_COMPONENT_TYPES, 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 RuleOptions, type RulePreset, type RuleSeverity, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, getId, getReactVersion, getSettingsFromContext,
|
|
2304
|
+
export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DOM_HTML_COMPONENT_TYPES, DOM_SVG_COMPONENT_TYPES, 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 RuleOptions, type RulePreset, type RuleSeverity, WEBSITE_URL, createRuleForPlugin, decodeSettings, defineSettings, getId, getReactVersion, getSettingsFromContext, toNormalizedSettings, unsafeDecodeSettings };
|
package/dist/index.js
CHANGED
|
@@ -222,20 +222,6 @@ var getDocsUrl = (pluginName) => (ruleName) => {
|
|
|
222
222
|
};
|
|
223
223
|
var createRuleForPlugin = (pluginName) => utils.ESLintUtils.RuleCreator(getDocsUrl(pluginName));
|
|
224
224
|
|
|
225
|
-
// src/env.ts
|
|
226
|
-
function isInEditorEnv() {
|
|
227
|
-
if (process.env["CI"]) {
|
|
228
|
-
return false;
|
|
229
|
-
}
|
|
230
|
-
if (isInGitHooksOrLintStaged()) {
|
|
231
|
-
return false;
|
|
232
|
-
}
|
|
233
|
-
return !!(process.env["VSCODE_PID"] || process.env["VSCODE_CWD"] || process.env["JETBRAINS_IDE"] || process.env["VIM"] || process.env["NVIM"]);
|
|
234
|
-
}
|
|
235
|
-
function isInGitHooksOrLintStaged() {
|
|
236
|
-
return !!(process.env["GIT_PARAMS"] || process.env["VSCODE_GIT_COMMAND"] || process.env["npm_lifecycle_script"]?.startsWith("lint-staged"));
|
|
237
|
-
}
|
|
238
|
-
|
|
239
225
|
// src/get-id.ts
|
|
240
226
|
var id = 0n;
|
|
241
227
|
var getId = () => (id++).toString();
|
|
@@ -1491,7 +1477,5 @@ exports.defineSettings = defineSettings;
|
|
|
1491
1477
|
exports.getId = getId;
|
|
1492
1478
|
exports.getReactVersion = getReactVersion;
|
|
1493
1479
|
exports.getSettingsFromContext = getSettingsFromContext;
|
|
1494
|
-
exports.isInEditorEnv = isInEditorEnv;
|
|
1495
|
-
exports.isInGitHooksOrLintStaged = isInGitHooksOrLintStaged;
|
|
1496
1480
|
exports.toNormalizedSettings = toNormalizedSettings;
|
|
1497
1481
|
exports.unsafeDecodeSettings = unsafeDecodeSettings;
|
package/dist/index.mjs
CHANGED
|
@@ -214,20 +214,6 @@ var getDocsUrl = (pluginName) => (ruleName) => {
|
|
|
214
214
|
};
|
|
215
215
|
var createRuleForPlugin = (pluginName) => ESLintUtils.RuleCreator(getDocsUrl(pluginName));
|
|
216
216
|
|
|
217
|
-
// src/env.ts
|
|
218
|
-
function isInEditorEnv() {
|
|
219
|
-
if (process.env["CI"]) {
|
|
220
|
-
return false;
|
|
221
|
-
}
|
|
222
|
-
if (isInGitHooksOrLintStaged()) {
|
|
223
|
-
return false;
|
|
224
|
-
}
|
|
225
|
-
return !!(process.env["VSCODE_PID"] || process.env["VSCODE_CWD"] || process.env["JETBRAINS_IDE"] || process.env["VIM"] || process.env["NVIM"]);
|
|
226
|
-
}
|
|
227
|
-
function isInGitHooksOrLintStaged() {
|
|
228
|
-
return !!(process.env["GIT_PARAMS"] || process.env["VSCODE_GIT_COMMAND"] || process.env["npm_lifecycle_script"]?.startsWith("lint-staged"));
|
|
229
|
-
}
|
|
230
|
-
|
|
231
217
|
// src/get-id.ts
|
|
232
218
|
var id = 0n;
|
|
233
219
|
var getId = () => (id++).toString();
|
|
@@ -1459,4 +1445,4 @@ function getSettingsFromContext(context) {
|
|
|
1459
1445
|
}
|
|
1460
1446
|
var defineSettings = identity;
|
|
1461
1447
|
|
|
1462
|
-
export { CustomComponentPropSchema, CustomComponentSchema, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DOM_HTML_COMPONENT_TYPES, DOM_SVG_COMPONENT_TYPES, 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,
|
|
1448
|
+
export { CustomComponentPropSchema, CustomComponentSchema, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DOM_HTML_COMPONENT_TYPES, DOM_SVG_COMPONENT_TYPES, 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, toNormalizedSettings, unsafeDecodeSettings };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/shared",
|
|
3
|
-
"version": "1.26.0-
|
|
3
|
+
"version": "1.26.0-next.0",
|
|
4
4
|
"description": "ESLint React's Shared constants and functions.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@typescript-eslint/utils": "^8.22.0",
|
|
37
37
|
"picomatch": "^4.0.2",
|
|
38
38
|
"ts-pattern": "^5.6.2",
|
|
39
|
-
"@eslint-react/eff": "1.26.0-
|
|
39
|
+
"@eslint-react/eff": "1.26.0-next.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/picomatch": "^3.0.2",
|