@eslint-react/shared 1.37.4-next.0 → 1.38.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 +4 -76
- package/dist/index.d.ts +4 -76
- package/dist/index.js +2 -60
- package/dist/index.mjs +2 -50
- package/package.json +4 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { _ } from '@eslint-react/eff';
|
|
2
|
-
import * as tseslint from '@typescript-eslint/utils/ts-eslint';
|
|
3
|
-
import { ReportDescriptor } from '@typescript-eslint/utils/ts-eslint';
|
|
4
|
-
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
5
2
|
|
|
6
3
|
/**
|
|
7
4
|
* The NPM scope for this project.
|
|
@@ -15,83 +12,14 @@ declare const GITHUB_URL = "https://github.com/Rel1cx/eslint-react";
|
|
|
15
12
|
* The URL to the project's website.
|
|
16
13
|
*/
|
|
17
14
|
declare const WEBSITE_URL = "https://eslint-react.xyz";
|
|
18
|
-
/**
|
|
19
|
-
* Regular expression for matching a PascalCase string.
|
|
20
|
-
*/
|
|
21
|
-
declare const RE_PASCAL_CASE: RegExp;
|
|
22
|
-
/**
|
|
23
|
-
* Regular expression for matching a camelCase string.
|
|
24
|
-
*/
|
|
25
|
-
declare const RE_CAMEL_CASE: RegExp;
|
|
26
|
-
/**
|
|
27
|
-
* Regular expression for matching a kebab-case string.
|
|
28
|
-
*/
|
|
29
|
-
declare const RE_KEBAB_CASE: RegExp;
|
|
30
|
-
/**
|
|
31
|
-
* Regular expression for matching a snake_case string.
|
|
32
|
-
*/
|
|
33
|
-
declare const RE_SNAKE_CASE: RegExp;
|
|
34
|
-
/**
|
|
35
|
-
* Regular expression for matching a CONSTANT_CASE string.
|
|
36
|
-
*/
|
|
37
|
-
declare const RE_CONSTANT_CASE: RegExp;
|
|
38
|
-
declare const RE_JAVASCRIPT_PROTOCOL: RegExp;
|
|
39
|
-
declare const REACT_BUILD_IN_HOOKS: readonly ["use", "useActionState", "useCallback", "useContext", "useDebugValue", "useDeferredValue", "useEffect", "useFormStatus", "useId", "useImperativeHandle", "useInsertionEffect", "useLayoutEffect", "useMemo", "useOptimistic", "useReducer", "useRef", "useState", "useSyncExternalStore", "useTransition"];
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Rule severity.
|
|
43
|
-
* @since 0.0.1
|
|
44
|
-
*/
|
|
45
|
-
type RuleSeverity = "error" | "off" | "warn";
|
|
46
|
-
/**
|
|
47
|
-
* Rule declaration.
|
|
48
|
-
* @internal
|
|
49
|
-
* @since 0.0.1
|
|
50
|
-
*/
|
|
51
|
-
type RuleDeclaration = [RuleSeverity, Record<string, unknown>?] | RuleSeverity;
|
|
52
|
-
/**
|
|
53
|
-
* Rule config preset.
|
|
54
|
-
* @since 0.0.1
|
|
55
|
-
*/
|
|
56
|
-
type RulePreset = Record<string, RuleDeclaration>;
|
|
57
|
-
/**
|
|
58
|
-
* Rule context.
|
|
59
|
-
* @since 0.0.1
|
|
60
|
-
*/
|
|
61
|
-
type RuleContext<MessageIds extends string = string, Options extends readonly unknown[] = readonly unknown[]> = tseslint.RuleContext<MessageIds, Options>;
|
|
62
|
-
/**
|
|
63
|
-
* Rule namespace.
|
|
64
|
-
* @since 0.0.1
|
|
65
|
-
*/
|
|
66
|
-
type RuleNamespace = "x" | "dom" | "web-api" | "hooks-extra" | "naming-convention" | "debug";
|
|
67
|
-
/**
|
|
68
|
-
* Rule feature.
|
|
69
|
-
* @since 1.20.0
|
|
70
|
-
*/
|
|
71
|
-
type RuleFeature = "CFG" | "DBG" | "FIX" | "MOD" | "TSC";
|
|
72
|
-
/**
|
|
73
|
-
* Rule status.
|
|
74
|
-
* @since 1.36.0
|
|
75
|
-
*/
|
|
76
|
-
type RuleStatus = "stable" | "experimental" | "deprecated" | "removed";
|
|
77
15
|
|
|
78
16
|
/**
|
|
79
|
-
*
|
|
80
|
-
* @param context - The context of the rule
|
|
81
|
-
* @returns A function that takes a descriptor and reports it if it's not null or undefined
|
|
82
|
-
*/
|
|
83
|
-
declare function createReport<MessageID extends string>(context: RuleContext): (descriptor: _ | null | ReportDescriptor<MessageID>) => void;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Get the ESLint rule creator for a plugin.
|
|
17
|
+
* Get the URL for the documentation of a rule in a plugin.
|
|
87
18
|
* @internal
|
|
88
19
|
* @param pluginName The name of the plugin.
|
|
89
|
-
* @returns The
|
|
20
|
+
* @returns The URL for the documentation of a rule.
|
|
90
21
|
*/
|
|
91
|
-
declare const
|
|
92
|
-
|
|
93
|
-
declare function isInEditorEnv(): boolean;
|
|
94
|
-
declare function isInGitHooksOrLintStaged(): boolean;
|
|
22
|
+
declare const getDocsUrl: (pluginName: string) => (ruleName: string) => string;
|
|
95
23
|
|
|
96
24
|
declare const getId: () => string;
|
|
97
25
|
|
|
@@ -2366,4 +2294,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
|
|
|
2366
2294
|
}
|
|
2367
2295
|
}
|
|
2368
2296
|
|
|
2369
|
-
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,
|
|
2297
|
+
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, WEBSITE_URL, decodeSettings, defineSettings, getDocsUrl, getId, getReactVersion, getSettingsFromContext, toNormalizedSettings, unsafeDecodeSettings };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { _ } from '@eslint-react/eff';
|
|
2
|
-
import * as tseslint from '@typescript-eslint/utils/ts-eslint';
|
|
3
|
-
import { ReportDescriptor } from '@typescript-eslint/utils/ts-eslint';
|
|
4
|
-
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
5
2
|
|
|
6
3
|
/**
|
|
7
4
|
* The NPM scope for this project.
|
|
@@ -15,83 +12,14 @@ declare const GITHUB_URL = "https://github.com/Rel1cx/eslint-react";
|
|
|
15
12
|
* The URL to the project's website.
|
|
16
13
|
*/
|
|
17
14
|
declare const WEBSITE_URL = "https://eslint-react.xyz";
|
|
18
|
-
/**
|
|
19
|
-
* Regular expression for matching a PascalCase string.
|
|
20
|
-
*/
|
|
21
|
-
declare const RE_PASCAL_CASE: RegExp;
|
|
22
|
-
/**
|
|
23
|
-
* Regular expression for matching a camelCase string.
|
|
24
|
-
*/
|
|
25
|
-
declare const RE_CAMEL_CASE: RegExp;
|
|
26
|
-
/**
|
|
27
|
-
* Regular expression for matching a kebab-case string.
|
|
28
|
-
*/
|
|
29
|
-
declare const RE_KEBAB_CASE: RegExp;
|
|
30
|
-
/**
|
|
31
|
-
* Regular expression for matching a snake_case string.
|
|
32
|
-
*/
|
|
33
|
-
declare const RE_SNAKE_CASE: RegExp;
|
|
34
|
-
/**
|
|
35
|
-
* Regular expression for matching a CONSTANT_CASE string.
|
|
36
|
-
*/
|
|
37
|
-
declare const RE_CONSTANT_CASE: RegExp;
|
|
38
|
-
declare const RE_JAVASCRIPT_PROTOCOL: RegExp;
|
|
39
|
-
declare const REACT_BUILD_IN_HOOKS: readonly ["use", "useActionState", "useCallback", "useContext", "useDebugValue", "useDeferredValue", "useEffect", "useFormStatus", "useId", "useImperativeHandle", "useInsertionEffect", "useLayoutEffect", "useMemo", "useOptimistic", "useReducer", "useRef", "useState", "useSyncExternalStore", "useTransition"];
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Rule severity.
|
|
43
|
-
* @since 0.0.1
|
|
44
|
-
*/
|
|
45
|
-
type RuleSeverity = "error" | "off" | "warn";
|
|
46
|
-
/**
|
|
47
|
-
* Rule declaration.
|
|
48
|
-
* @internal
|
|
49
|
-
* @since 0.0.1
|
|
50
|
-
*/
|
|
51
|
-
type RuleDeclaration = [RuleSeverity, Record<string, unknown>?] | RuleSeverity;
|
|
52
|
-
/**
|
|
53
|
-
* Rule config preset.
|
|
54
|
-
* @since 0.0.1
|
|
55
|
-
*/
|
|
56
|
-
type RulePreset = Record<string, RuleDeclaration>;
|
|
57
|
-
/**
|
|
58
|
-
* Rule context.
|
|
59
|
-
* @since 0.0.1
|
|
60
|
-
*/
|
|
61
|
-
type RuleContext<MessageIds extends string = string, Options extends readonly unknown[] = readonly unknown[]> = tseslint.RuleContext<MessageIds, Options>;
|
|
62
|
-
/**
|
|
63
|
-
* Rule namespace.
|
|
64
|
-
* @since 0.0.1
|
|
65
|
-
*/
|
|
66
|
-
type RuleNamespace = "x" | "dom" | "web-api" | "hooks-extra" | "naming-convention" | "debug";
|
|
67
|
-
/**
|
|
68
|
-
* Rule feature.
|
|
69
|
-
* @since 1.20.0
|
|
70
|
-
*/
|
|
71
|
-
type RuleFeature = "CFG" | "DBG" | "FIX" | "MOD" | "TSC";
|
|
72
|
-
/**
|
|
73
|
-
* Rule status.
|
|
74
|
-
* @since 1.36.0
|
|
75
|
-
*/
|
|
76
|
-
type RuleStatus = "stable" | "experimental" | "deprecated" | "removed";
|
|
77
15
|
|
|
78
16
|
/**
|
|
79
|
-
*
|
|
80
|
-
* @param context - The context of the rule
|
|
81
|
-
* @returns A function that takes a descriptor and reports it if it's not null or undefined
|
|
82
|
-
*/
|
|
83
|
-
declare function createReport<MessageID extends string>(context: RuleContext): (descriptor: _ | null | ReportDescriptor<MessageID>) => void;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Get the ESLint rule creator for a plugin.
|
|
17
|
+
* Get the URL for the documentation of a rule in a plugin.
|
|
87
18
|
* @internal
|
|
88
19
|
* @param pluginName The name of the plugin.
|
|
89
|
-
* @returns The
|
|
20
|
+
* @returns The URL for the documentation of a rule.
|
|
90
21
|
*/
|
|
91
|
-
declare const
|
|
92
|
-
|
|
93
|
-
declare function isInEditorEnv(): boolean;
|
|
94
|
-
declare function isInGitHooksOrLintStaged(): boolean;
|
|
22
|
+
declare const getDocsUrl: (pluginName: string) => (ruleName: string) => string;
|
|
95
23
|
|
|
96
24
|
declare const getId: () => string;
|
|
97
25
|
|
|
@@ -2366,4 +2294,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
|
|
|
2366
2294
|
}
|
|
2367
2295
|
}
|
|
2368
2296
|
|
|
2369
|
-
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,
|
|
2297
|
+
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, WEBSITE_URL, decodeSettings, defineSettings, getDocsUrl, getId, getReactVersion, getSettingsFromContext, toNormalizedSettings, unsafeDecodeSettings };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var utils = require('@typescript-eslint/utils');
|
|
4
3
|
var module$1 = require('module');
|
|
5
4
|
var eff = require('@eslint-react/eff');
|
|
6
5
|
var tsPattern = require('ts-pattern');
|
|
@@ -16,61 +15,14 @@ var pm__default = /*#__PURE__*/_interopDefault(pm);
|
|
|
16
15
|
var NPM_SCOPE = "@eslint-react";
|
|
17
16
|
var GITHUB_URL = "https://github.com/Rel1cx/eslint-react";
|
|
18
17
|
var WEBSITE_URL = "https://eslint-react.xyz";
|
|
19
|
-
var RE_PASCAL_CASE = /^[A-Z][\dA-Za-z]*$/u;
|
|
20
|
-
var RE_CAMEL_CASE = /^[a-z][\dA-Za-z]*$/u;
|
|
21
|
-
var RE_KEBAB_CASE = /^[a-z][\d\-a-z]*$/u;
|
|
22
|
-
var RE_SNAKE_CASE = /^[a-z][\d_a-z]*$/u;
|
|
23
|
-
var RE_CONSTANT_CASE = /^[A-Z][\d_A-Z]*$/u;
|
|
24
|
-
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;
|
|
25
|
-
var REACT_BUILD_IN_HOOKS = [
|
|
26
|
-
"use",
|
|
27
|
-
"useActionState",
|
|
28
|
-
"useCallback",
|
|
29
|
-
"useContext",
|
|
30
|
-
"useDebugValue",
|
|
31
|
-
"useDeferredValue",
|
|
32
|
-
"useEffect",
|
|
33
|
-
"useFormStatus",
|
|
34
|
-
"useId",
|
|
35
|
-
"useImperativeHandle",
|
|
36
|
-
"useInsertionEffect",
|
|
37
|
-
"useLayoutEffect",
|
|
38
|
-
"useMemo",
|
|
39
|
-
"useOptimistic",
|
|
40
|
-
"useReducer",
|
|
41
|
-
"useRef",
|
|
42
|
-
"useState",
|
|
43
|
-
"useSyncExternalStore",
|
|
44
|
-
"useTransition"
|
|
45
|
-
];
|
|
46
18
|
|
|
47
|
-
// src/
|
|
48
|
-
function createReport(context) {
|
|
49
|
-
return (descriptor) => {
|
|
50
|
-
if (descriptor != null) context.report(descriptor);
|
|
51
|
-
};
|
|
52
|
-
}
|
|
19
|
+
// src/get-doc-url.ts
|
|
53
20
|
var getDocsUrl = (pluginName) => (ruleName) => {
|
|
54
21
|
if (pluginName === "x") {
|
|
55
22
|
return `${WEBSITE_URL}/docs/rules/${ruleName}`;
|
|
56
23
|
}
|
|
57
24
|
return `${WEBSITE_URL}/docs/rules/${pluginName}-${ruleName}`;
|
|
58
25
|
};
|
|
59
|
-
var createRuleForPlugin = (pluginName) => utils.ESLintUtils.RuleCreator(getDocsUrl(pluginName));
|
|
60
|
-
|
|
61
|
-
// src/env.ts
|
|
62
|
-
function isInEditorEnv() {
|
|
63
|
-
if (process.env["CI"]) {
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
if (isInGitHooksOrLintStaged()) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
return !!(process.env["VSCODE_PID"] || process.env["VSCODE_CWD"] || process.env["JETBRAINS_IDE"] || process.env["VIM"] || process.env["NVIM"]);
|
|
70
|
-
}
|
|
71
|
-
function isInGitHooksOrLintStaged() {
|
|
72
|
-
return !!(process.env["GIT_PARAMS"] || process.env["VSCODE_GIT_COMMAND"] || process.env["npm_lifecycle_script"]?.startsWith("lint-staged"));
|
|
73
|
-
}
|
|
74
26
|
|
|
75
27
|
// src/get-id.ts
|
|
76
28
|
var id = 0n;
|
|
@@ -1326,22 +1278,12 @@ exports.ESLintReactSettingsSchema = ESLintReactSettingsSchema;
|
|
|
1326
1278
|
exports.ESLintSettingsSchema = ESLintSettingsSchema;
|
|
1327
1279
|
exports.GITHUB_URL = GITHUB_URL;
|
|
1328
1280
|
exports.NPM_SCOPE = NPM_SCOPE;
|
|
1329
|
-
exports.REACT_BUILD_IN_HOOKS = REACT_BUILD_IN_HOOKS;
|
|
1330
|
-
exports.RE_CAMEL_CASE = RE_CAMEL_CASE;
|
|
1331
|
-
exports.RE_CONSTANT_CASE = RE_CONSTANT_CASE;
|
|
1332
|
-
exports.RE_JAVASCRIPT_PROTOCOL = RE_JAVASCRIPT_PROTOCOL;
|
|
1333
|
-
exports.RE_KEBAB_CASE = RE_KEBAB_CASE;
|
|
1334
|
-
exports.RE_PASCAL_CASE = RE_PASCAL_CASE;
|
|
1335
|
-
exports.RE_SNAKE_CASE = RE_SNAKE_CASE;
|
|
1336
1281
|
exports.WEBSITE_URL = WEBSITE_URL;
|
|
1337
|
-
exports.createReport = createReport;
|
|
1338
|
-
exports.createRuleForPlugin = createRuleForPlugin;
|
|
1339
1282
|
exports.decodeSettings = decodeSettings;
|
|
1340
1283
|
exports.defineSettings = defineSettings;
|
|
1284
|
+
exports.getDocsUrl = getDocsUrl;
|
|
1341
1285
|
exports.getId = getId;
|
|
1342
1286
|
exports.getReactVersion = getReactVersion;
|
|
1343
1287
|
exports.getSettingsFromContext = getSettingsFromContext;
|
|
1344
|
-
exports.isInEditorEnv = isInEditorEnv;
|
|
1345
|
-
exports.isInGitHooksOrLintStaged = isInGitHooksOrLintStaged;
|
|
1346
1288
|
exports.toNormalizedSettings = toNormalizedSettings;
|
|
1347
1289
|
exports.unsafeDecodeSettings = unsafeDecodeSettings;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
1
|
import module from 'node:module';
|
|
3
2
|
import { identity } from '@eslint-react/eff';
|
|
4
3
|
import { match, P } from 'ts-pattern';
|
|
@@ -8,61 +7,14 @@ import pm from 'picomatch';
|
|
|
8
7
|
var NPM_SCOPE = "@eslint-react";
|
|
9
8
|
var GITHUB_URL = "https://github.com/Rel1cx/eslint-react";
|
|
10
9
|
var WEBSITE_URL = "https://eslint-react.xyz";
|
|
11
|
-
var RE_PASCAL_CASE = /^[A-Z][\dA-Za-z]*$/u;
|
|
12
|
-
var RE_CAMEL_CASE = /^[a-z][\dA-Za-z]*$/u;
|
|
13
|
-
var RE_KEBAB_CASE = /^[a-z][\d\-a-z]*$/u;
|
|
14
|
-
var RE_SNAKE_CASE = /^[a-z][\d_a-z]*$/u;
|
|
15
|
-
var RE_CONSTANT_CASE = /^[A-Z][\d_A-Z]*$/u;
|
|
16
|
-
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;
|
|
17
|
-
var REACT_BUILD_IN_HOOKS = [
|
|
18
|
-
"use",
|
|
19
|
-
"useActionState",
|
|
20
|
-
"useCallback",
|
|
21
|
-
"useContext",
|
|
22
|
-
"useDebugValue",
|
|
23
|
-
"useDeferredValue",
|
|
24
|
-
"useEffect",
|
|
25
|
-
"useFormStatus",
|
|
26
|
-
"useId",
|
|
27
|
-
"useImperativeHandle",
|
|
28
|
-
"useInsertionEffect",
|
|
29
|
-
"useLayoutEffect",
|
|
30
|
-
"useMemo",
|
|
31
|
-
"useOptimistic",
|
|
32
|
-
"useReducer",
|
|
33
|
-
"useRef",
|
|
34
|
-
"useState",
|
|
35
|
-
"useSyncExternalStore",
|
|
36
|
-
"useTransition"
|
|
37
|
-
];
|
|
38
10
|
|
|
39
|
-
// src/
|
|
40
|
-
function createReport(context) {
|
|
41
|
-
return (descriptor) => {
|
|
42
|
-
if (descriptor != null) context.report(descriptor);
|
|
43
|
-
};
|
|
44
|
-
}
|
|
11
|
+
// src/get-doc-url.ts
|
|
45
12
|
var getDocsUrl = (pluginName) => (ruleName) => {
|
|
46
13
|
if (pluginName === "x") {
|
|
47
14
|
return `${WEBSITE_URL}/docs/rules/${ruleName}`;
|
|
48
15
|
}
|
|
49
16
|
return `${WEBSITE_URL}/docs/rules/${pluginName}-${ruleName}`;
|
|
50
17
|
};
|
|
51
|
-
var createRuleForPlugin = (pluginName) => ESLintUtils.RuleCreator(getDocsUrl(pluginName));
|
|
52
|
-
|
|
53
|
-
// src/env.ts
|
|
54
|
-
function isInEditorEnv() {
|
|
55
|
-
if (process.env["CI"]) {
|
|
56
|
-
return false;
|
|
57
|
-
}
|
|
58
|
-
if (isInGitHooksOrLintStaged()) {
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
return !!(process.env["VSCODE_PID"] || process.env["VSCODE_CWD"] || process.env["JETBRAINS_IDE"] || process.env["VIM"] || process.env["NVIM"]);
|
|
62
|
-
}
|
|
63
|
-
function isInGitHooksOrLintStaged() {
|
|
64
|
-
return !!(process.env["GIT_PARAMS"] || process.env["VSCODE_GIT_COMMAND"] || process.env["npm_lifecycle_script"]?.startsWith("lint-staged"));
|
|
65
|
-
}
|
|
66
18
|
|
|
67
19
|
// src/get-id.ts
|
|
68
20
|
var id = 0n;
|
|
@@ -1310,4 +1262,4 @@ function getSettingsFromContext(context) {
|
|
|
1310
1262
|
}
|
|
1311
1263
|
var defineSettings = identity;
|
|
1312
1264
|
|
|
1313
|
-
export { CustomComponentPropSchema, CustomComponentSchema, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE,
|
|
1265
|
+
export { CustomComponentPropSchema, CustomComponentSchema, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, WEBSITE_URL, decodeSettings, defineSettings, getDocsUrl, getId, getReactVersion, getSettingsFromContext, toNormalizedSettings, unsafeDecodeSettings };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.38.0-beta.3",
|
|
4
4
|
"description": "ESLint React's Shared constants and functions.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -38,9 +38,11 @@
|
|
|
38
38
|
"@typescript-eslint/utils": "^8.27.0",
|
|
39
39
|
"picomatch": "^4.0.2",
|
|
40
40
|
"ts-pattern": "^5.6.2",
|
|
41
|
-
"@eslint-react/eff": "1.
|
|
41
|
+
"@eslint-react/eff": "1.38.0-beta.3",
|
|
42
|
+
"@eslint-react/kit": "1.38.0-beta.3"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
45
|
+
"@tsconfig/node22": "^22.0.0",
|
|
44
46
|
"@types/picomatch": "^3.0.2",
|
|
45
47
|
"fast-equals": "^5.2.2",
|
|
46
48
|
"micro-memoize": "^4.1.3",
|