eslint-plugin-boundaries 6.0.0 → 6.0.2
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/Config/Config.d.ts +7 -7
- package/dist/Config/Config.js +3 -1
- package/package.json +3 -3
package/dist/Config/Config.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Linter } from "eslint";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Config } from "../Shared";
|
|
3
3
|
import { PLUGIN_NAME } from "../Shared";
|
|
4
4
|
export * from "../Public";
|
|
5
5
|
/**
|
|
6
6
|
* The full ESLint config object returned by createConfig, including the plugins field with the boundaries plugin registered.
|
|
7
|
+
* Configuration object returned by createConfig.
|
|
8
|
+
* We use a public alias to keep the exported type nameable and portable.
|
|
9
|
+
* This helps prevent TS2742 errors caused by inferred types leaking internal ESLint type paths.
|
|
7
10
|
*/
|
|
8
|
-
type
|
|
9
|
-
plugins: Record<PluginName, PluginBoundaries>;
|
|
10
|
-
files: Linter.Config["files"];
|
|
11
|
-
} & Omit<Config<PluginName>, "plugins">;
|
|
11
|
+
export type ConfigObject = Linter.Config;
|
|
12
12
|
/**
|
|
13
13
|
* Returns an ESLint config object with the boundaries plugin registered, providing default JS and TS file patterns
|
|
14
14
|
* and enforcing valid types for settings and rules. Supports renaming the plugin. Rules can be prefixed with either
|
|
@@ -16,7 +16,7 @@ type PluginFullConfig<PluginName extends string = typeof PLUGIN_NAME> = {
|
|
|
16
16
|
*
|
|
17
17
|
* @param config - ESLint config object without the plugins field.
|
|
18
18
|
* @param name - The name of the plugin to register. Defaults to "boundaries".
|
|
19
|
-
* @returns {
|
|
19
|
+
* @returns {ConfigObject} The ESLint config object with the boundaries plugin registered and the provided config merged in.
|
|
20
20
|
* @throws {Error} If settings or rules are not from eslint-plugin-boundaries.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
@@ -38,6 +38,6 @@ type PluginFullConfig<PluginName extends string = typeof PLUGIN_NAME> = {
|
|
|
38
38
|
* export default [config];
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
export declare function createConfig<PluginName extends string = typeof PLUGIN_NAME>(config: Omit<Config<PluginName> | Config, "plugins">, name?: PluginName):
|
|
41
|
+
export declare function createConfig<PluginName extends string = typeof PLUGIN_NAME>(config: Omit<Config<PluginName> | Config, "plugins">, name?: PluginName): ConfigObject;
|
|
42
42
|
export declare const recommended: Config<"boundaries">;
|
|
43
43
|
export declare const strict: Config<"boundaries">;
|
package/dist/Config/Config.js
CHANGED
|
@@ -73,7 +73,7 @@ function renamePluginRules(pluginName, rules) {
|
|
|
73
73
|
*
|
|
74
74
|
* @param config - ESLint config object without the plugins field.
|
|
75
75
|
* @param name - The name of the plugin to register. Defaults to "boundaries".
|
|
76
|
-
* @returns {
|
|
76
|
+
* @returns {ConfigObject} The ESLint config object with the boundaries plugin registered and the provided config merged in.
|
|
77
77
|
* @throws {Error} If settings or rules are not from eslint-plugin-boundaries.
|
|
78
78
|
*
|
|
79
79
|
* @example
|
|
@@ -96,6 +96,8 @@ function renamePluginRules(pluginName, rules) {
|
|
|
96
96
|
* ```
|
|
97
97
|
*/
|
|
98
98
|
function createConfig(config, name = Shared_1.PLUGIN_NAME) {
|
|
99
|
+
// Annotate plugins as Record<string, object> to prevent TypeScript from inferring
|
|
100
|
+
// the internal plugin type, which would expose ESLint internal generic types
|
|
99
101
|
const pluginsRegistration = {
|
|
100
102
|
[name]: index_1.default,
|
|
101
103
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-boundaries",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Eslint plugin checking architecture boundaries between elements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"chalk": "4.1.2",
|
|
53
53
|
"eslint-import-resolver-node": "0.3.9",
|
|
54
54
|
"eslint-module-utils": "2.12.1",
|
|
55
|
-
"handlebars": "4.7.
|
|
55
|
+
"handlebars": "4.7.9",
|
|
56
56
|
"micromatch": "4.0.8",
|
|
57
|
-
"@boundaries/elements": "2.0.
|
|
57
|
+
"@boundaries/elements": "2.0.1"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=18.18"
|