@eslint-react/shared 1.52.9-next.0 → 1.52.10-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 +18 -14
- package/dist/index.d.ts +18 -14
- package/dist/index.js +20 -0
- package/dist/index.mjs +20 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
+
import * as _eslint_react_kit from '@eslint-react/kit';
|
|
2
|
+
import { CompatiblePlugin, CompatibleConfig, RuleContext } from '@eslint-react/kit';
|
|
1
3
|
import { unit } from '@eslint-react/eff';
|
|
2
|
-
import { RuleContext } from '@eslint-react/kit';
|
|
3
4
|
import { z } from 'zod/v4';
|
|
4
5
|
|
|
5
|
-
interface CompatiblePlugin {
|
|
6
|
-
meta: {
|
|
7
|
-
name: string;
|
|
8
|
-
version: string;
|
|
9
|
-
};
|
|
10
|
-
rules: Record<string, any>;
|
|
11
|
-
}
|
|
12
|
-
interface CompatibleConfig {
|
|
13
|
-
name?: string;
|
|
14
|
-
rules?: Record<string, any>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
6
|
/**
|
|
18
7
|
* The NPM scope for this project.
|
|
19
8
|
*/
|
|
@@ -27,6 +16,21 @@ declare const GITHUB_URL = "https://github.com/Rel1cx/eslint-react";
|
|
|
27
16
|
*/
|
|
28
17
|
declare const WEBSITE_URL = "https://eslint-react.xyz";
|
|
29
18
|
|
|
19
|
+
declare function getConfigAdapters(pluginName: string, plugin: CompatiblePlugin): {
|
|
20
|
+
readonly toFlatConfig: (config: CompatibleConfig) => {
|
|
21
|
+
plugins: {
|
|
22
|
+
[pluginName]: CompatiblePlugin;
|
|
23
|
+
};
|
|
24
|
+
name?: string;
|
|
25
|
+
rules?: Record<string, _eslint_react_kit.RuleConfig>;
|
|
26
|
+
settings?: _eslint_react_kit.SettingsConfig;
|
|
27
|
+
};
|
|
28
|
+
readonly toLegacyConfig: ({ rules }: CompatibleConfig) => {
|
|
29
|
+
plugins: string[];
|
|
30
|
+
rules: Record<string, _eslint_react_kit.RuleConfig<unknown[]>> | undefined;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
30
34
|
/**
|
|
31
35
|
* Get the URL for the documentation of a rule in a plugin.
|
|
32
36
|
* @internal
|
|
@@ -940,4 +944,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
|
|
|
940
944
|
}
|
|
941
945
|
}
|
|
942
946
|
|
|
943
|
-
export { type
|
|
947
|
+
export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, WEBSITE_URL, coerceESLintSettings, coerceSettings, decodeESLintSettings, decodeSettings, defineSettings, getConfigAdapters, getDocsUrl, getId, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, normalizeSettings };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
+
import * as _eslint_react_kit from '@eslint-react/kit';
|
|
2
|
+
import { CompatiblePlugin, CompatibleConfig, RuleContext } from '@eslint-react/kit';
|
|
1
3
|
import { unit } from '@eslint-react/eff';
|
|
2
|
-
import { RuleContext } from '@eslint-react/kit';
|
|
3
4
|
import { z } from 'zod/v4';
|
|
4
5
|
|
|
5
|
-
interface CompatiblePlugin {
|
|
6
|
-
meta: {
|
|
7
|
-
name: string;
|
|
8
|
-
version: string;
|
|
9
|
-
};
|
|
10
|
-
rules: Record<string, any>;
|
|
11
|
-
}
|
|
12
|
-
interface CompatibleConfig {
|
|
13
|
-
name?: string;
|
|
14
|
-
rules?: Record<string, any>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
6
|
/**
|
|
18
7
|
* The NPM scope for this project.
|
|
19
8
|
*/
|
|
@@ -27,6 +16,21 @@ declare const GITHUB_URL = "https://github.com/Rel1cx/eslint-react";
|
|
|
27
16
|
*/
|
|
28
17
|
declare const WEBSITE_URL = "https://eslint-react.xyz";
|
|
29
18
|
|
|
19
|
+
declare function getConfigAdapters(pluginName: string, plugin: CompatiblePlugin): {
|
|
20
|
+
readonly toFlatConfig: (config: CompatibleConfig) => {
|
|
21
|
+
plugins: {
|
|
22
|
+
[pluginName]: CompatiblePlugin;
|
|
23
|
+
};
|
|
24
|
+
name?: string;
|
|
25
|
+
rules?: Record<string, _eslint_react_kit.RuleConfig>;
|
|
26
|
+
settings?: _eslint_react_kit.SettingsConfig;
|
|
27
|
+
};
|
|
28
|
+
readonly toLegacyConfig: ({ rules }: CompatibleConfig) => {
|
|
29
|
+
plugins: string[];
|
|
30
|
+
rules: Record<string, _eslint_react_kit.RuleConfig<unknown[]>> | undefined;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
30
34
|
/**
|
|
31
35
|
* Get the URL for the documentation of a rule in a plugin.
|
|
32
36
|
* @internal
|
|
@@ -940,4 +944,4 @@ declare module "@typescript-eslint/utils/ts-eslint" {
|
|
|
940
944
|
}
|
|
941
945
|
}
|
|
942
946
|
|
|
943
|
-
export { type
|
|
947
|
+
export { type CustomComponent, type CustomComponentNormalized, type CustomComponentProp, type CustomComponentPropNormalized, CustomComponentPropSchema, CustomComponentSchema, type CustomHooks, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, type ESLintReactSettings, type ESLintReactSettingsNormalized, ESLintReactSettingsSchema, type ESLintSettings, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, WEBSITE_URL, coerceESLintSettings, coerceSettings, decodeESLintSettings, decodeSettings, defineSettings, getConfigAdapters, getDocsUrl, getId, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, normalizeSettings };
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,25 @@ var NPM_SCOPE = "@eslint-react";
|
|
|
16
16
|
var GITHUB_URL = "https://github.com/Rel1cx/eslint-react";
|
|
17
17
|
var WEBSITE_URL = "https://eslint-react.xyz";
|
|
18
18
|
|
|
19
|
+
// src/get-config-adapters.ts
|
|
20
|
+
function getConfigAdapters(pluginName, plugin) {
|
|
21
|
+
function toFlatConfig(config) {
|
|
22
|
+
return {
|
|
23
|
+
...config,
|
|
24
|
+
plugins: {
|
|
25
|
+
[pluginName]: plugin
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function toLegacyConfig({ rules }) {
|
|
30
|
+
return {
|
|
31
|
+
plugins: [pluginName],
|
|
32
|
+
rules
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return { toFlatConfig, toLegacyConfig };
|
|
36
|
+
}
|
|
37
|
+
|
|
19
38
|
// src/get-doc-url.ts
|
|
20
39
|
var getDocsUrl = (pluginName) => (ruleName) => {
|
|
21
40
|
if (pluginName === "x") {
|
|
@@ -273,6 +292,7 @@ exports.coerceSettings = coerceSettings;
|
|
|
273
292
|
exports.decodeESLintSettings = decodeESLintSettings;
|
|
274
293
|
exports.decodeSettings = decodeSettings;
|
|
275
294
|
exports.defineSettings = defineSettings;
|
|
295
|
+
exports.getConfigAdapters = getConfigAdapters;
|
|
276
296
|
exports.getDocsUrl = getDocsUrl;
|
|
277
297
|
exports.getId = getId;
|
|
278
298
|
exports.getReactVersion = getReactVersion;
|
package/dist/index.mjs
CHANGED
|
@@ -9,6 +9,25 @@ var NPM_SCOPE = "@eslint-react";
|
|
|
9
9
|
var GITHUB_URL = "https://github.com/Rel1cx/eslint-react";
|
|
10
10
|
var WEBSITE_URL = "https://eslint-react.xyz";
|
|
11
11
|
|
|
12
|
+
// src/get-config-adapters.ts
|
|
13
|
+
function getConfigAdapters(pluginName, plugin) {
|
|
14
|
+
function toFlatConfig(config) {
|
|
15
|
+
return {
|
|
16
|
+
...config,
|
|
17
|
+
plugins: {
|
|
18
|
+
[pluginName]: plugin
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function toLegacyConfig({ rules }) {
|
|
23
|
+
return {
|
|
24
|
+
plugins: [pluginName],
|
|
25
|
+
rules
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return { toFlatConfig, toLegacyConfig };
|
|
29
|
+
}
|
|
30
|
+
|
|
12
31
|
// src/get-doc-url.ts
|
|
13
32
|
var getDocsUrl = (pluginName) => (ruleName) => {
|
|
14
33
|
if (pluginName === "x") {
|
|
@@ -251,4 +270,4 @@ function getSettingsFromContext(context) {
|
|
|
251
270
|
}
|
|
252
271
|
var defineSettings = identity;
|
|
253
272
|
|
|
254
|
-
export { CustomComponentPropSchema, CustomComponentSchema, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, WEBSITE_URL, coerceESLintSettings, coerceSettings, decodeESLintSettings, decodeSettings, defineSettings, getDocsUrl, getId, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, normalizeSettings };
|
|
273
|
+
export { CustomComponentPropSchema, CustomComponentSchema, CustomHooksSchema, DEFAULT_ESLINT_REACT_SETTINGS, DEFAULT_ESLINT_SETTINGS, ESLintReactSettingsSchema, ESLintSettingsSchema, GITHUB_URL, NPM_SCOPE, WEBSITE_URL, coerceESLintSettings, coerceSettings, decodeESLintSettings, decodeSettings, defineSettings, getConfigAdapters, getDocsUrl, getId, getReactVersion, getSettingsFromContext, isESLintReactSettings, isESLintSettings, normalizeSettings };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/shared",
|
|
3
|
-
"version": "1.52.
|
|
3
|
+
"version": "1.52.10-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,8 +38,8 @@
|
|
|
38
38
|
"@typescript-eslint/utils": "^8.41.0",
|
|
39
39
|
"ts-pattern": "^5.8.0",
|
|
40
40
|
"zod": "^4.1.5",
|
|
41
|
-
"@eslint-react/eff": "1.52.
|
|
42
|
-
"@eslint-react/kit": "1.52.
|
|
41
|
+
"@eslint-react/eff": "1.52.10-beta.0",
|
|
42
|
+
"@eslint-react/kit": "1.52.10-beta.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@tsconfig/node22": "^22.0.2",
|