@noctcore/eslint-plugin-architecture 0.1.0 → 0.2.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/README.md +8 -2
- package/dist/index.cjs +444 -28
- package/dist/index.d.cts +42 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +444 -28
- package/docs/rules/barrel-purity.md +57 -0
- package/docs/rules/colocated-test-required.md +48 -0
- package/docs/rules/filename-matches-export.md +56 -0
- package/docs/rules/max-import-depth.md +52 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -7,24 +7,54 @@ interface NoCrossFeatureImportsOptions {
|
|
|
7
7
|
readonly allowTypeImports?: boolean;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
interface MaxImportDepthOptions {
|
|
11
|
+
readonly max?: number;
|
|
12
|
+
readonly alias?: Readonly<Record<string, string>>;
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
interface IndexMustReexportDefaultOptions {
|
|
11
16
|
readonly ignorePaths?: readonly string[];
|
|
12
17
|
}
|
|
13
18
|
|
|
19
|
+
interface FilenameMatchesExportOptions {
|
|
20
|
+
readonly ignore?: readonly string[];
|
|
21
|
+
}
|
|
22
|
+
|
|
14
23
|
interface ComponentFolderStructureOptions {
|
|
15
24
|
readonly componentRoot?: string;
|
|
16
25
|
readonly requiredSiblings?: readonly string[];
|
|
17
26
|
readonly ignorePaths?: readonly string[];
|
|
18
27
|
}
|
|
19
28
|
|
|
29
|
+
interface ColocatedTestRequiredOptions {
|
|
30
|
+
readonly include?: readonly string[];
|
|
31
|
+
readonly ignore?: readonly string[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface BarrelPurityOptions {
|
|
35
|
+
readonly allow?: readonly string[];
|
|
36
|
+
}
|
|
37
|
+
|
|
20
38
|
/** Every rule this plugin exposes, keyed by its (unprefixed) rule id. */
|
|
21
39
|
declare const rules: {
|
|
40
|
+
'barrel-purity': _typescript_eslint_utils_ts_eslint.RuleModule<"impureBarrel", [BarrelPurityOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
41
|
+
name: string;
|
|
42
|
+
};
|
|
43
|
+
'colocated-test-required': _typescript_eslint_utils_ts_eslint.RuleModule<"missingTest", [ColocatedTestRequiredOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
44
|
+
name: string;
|
|
45
|
+
};
|
|
22
46
|
'component-folder-structure': _typescript_eslint_utils_ts_eslint.RuleModule<"missingSiblings", [ComponentFolderStructureOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
23
47
|
name: string;
|
|
24
48
|
};
|
|
49
|
+
'filename-matches-export': _typescript_eslint_utils_ts_eslint.RuleModule<"filenameMismatch" | "renameExport", [FilenameMatchesExportOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
50
|
+
name: string;
|
|
51
|
+
};
|
|
25
52
|
'index-must-reexport-default': _typescript_eslint_utils_ts_eslint.RuleModule<"missingDefaultReexport", [IndexMustReexportDefaultOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
26
53
|
name: string;
|
|
27
54
|
};
|
|
55
|
+
'max-import-depth': _typescript_eslint_utils_ts_eslint.RuleModule<"tooDeep", [MaxImportDepthOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
56
|
+
name: string;
|
|
57
|
+
};
|
|
28
58
|
'no-cross-feature-imports': _typescript_eslint_utils_ts_eslint.RuleModule<"crossFeatureImport", [NoCrossFeatureImportsOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
29
59
|
name: string;
|
|
30
60
|
};
|
|
@@ -36,12 +66,24 @@ declare const plugin: {
|
|
|
36
66
|
version: string;
|
|
37
67
|
};
|
|
38
68
|
rules: {
|
|
69
|
+
'barrel-purity': _typescript_eslint_utils_ts_eslint.RuleModule<"impureBarrel", [BarrelPurityOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
70
|
+
name: string;
|
|
71
|
+
};
|
|
72
|
+
'colocated-test-required': _typescript_eslint_utils_ts_eslint.RuleModule<"missingTest", [ColocatedTestRequiredOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
73
|
+
name: string;
|
|
74
|
+
};
|
|
39
75
|
'component-folder-structure': _typescript_eslint_utils_ts_eslint.RuleModule<"missingSiblings", [ComponentFolderStructureOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
40
76
|
name: string;
|
|
41
77
|
};
|
|
78
|
+
'filename-matches-export': _typescript_eslint_utils_ts_eslint.RuleModule<"filenameMismatch" | "renameExport", [FilenameMatchesExportOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
79
|
+
name: string;
|
|
80
|
+
};
|
|
42
81
|
'index-must-reexport-default': _typescript_eslint_utils_ts_eslint.RuleModule<"missingDefaultReexport", [IndexMustReexportDefaultOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
43
82
|
name: string;
|
|
44
83
|
};
|
|
84
|
+
'max-import-depth': _typescript_eslint_utils_ts_eslint.RuleModule<"tooDeep", [MaxImportDepthOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
85
|
+
name: string;
|
|
86
|
+
};
|
|
45
87
|
'no-cross-feature-imports': _typescript_eslint_utils_ts_eslint.RuleModule<"crossFeatureImport", [NoCrossFeatureImportsOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
46
88
|
name: string;
|
|
47
89
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -7,24 +7,54 @@ interface NoCrossFeatureImportsOptions {
|
|
|
7
7
|
readonly allowTypeImports?: boolean;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
interface MaxImportDepthOptions {
|
|
11
|
+
readonly max?: number;
|
|
12
|
+
readonly alias?: Readonly<Record<string, string>>;
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
interface IndexMustReexportDefaultOptions {
|
|
11
16
|
readonly ignorePaths?: readonly string[];
|
|
12
17
|
}
|
|
13
18
|
|
|
19
|
+
interface FilenameMatchesExportOptions {
|
|
20
|
+
readonly ignore?: readonly string[];
|
|
21
|
+
}
|
|
22
|
+
|
|
14
23
|
interface ComponentFolderStructureOptions {
|
|
15
24
|
readonly componentRoot?: string;
|
|
16
25
|
readonly requiredSiblings?: readonly string[];
|
|
17
26
|
readonly ignorePaths?: readonly string[];
|
|
18
27
|
}
|
|
19
28
|
|
|
29
|
+
interface ColocatedTestRequiredOptions {
|
|
30
|
+
readonly include?: readonly string[];
|
|
31
|
+
readonly ignore?: readonly string[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface BarrelPurityOptions {
|
|
35
|
+
readonly allow?: readonly string[];
|
|
36
|
+
}
|
|
37
|
+
|
|
20
38
|
/** Every rule this plugin exposes, keyed by its (unprefixed) rule id. */
|
|
21
39
|
declare const rules: {
|
|
40
|
+
'barrel-purity': _typescript_eslint_utils_ts_eslint.RuleModule<"impureBarrel", [BarrelPurityOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
41
|
+
name: string;
|
|
42
|
+
};
|
|
43
|
+
'colocated-test-required': _typescript_eslint_utils_ts_eslint.RuleModule<"missingTest", [ColocatedTestRequiredOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
44
|
+
name: string;
|
|
45
|
+
};
|
|
22
46
|
'component-folder-structure': _typescript_eslint_utils_ts_eslint.RuleModule<"missingSiblings", [ComponentFolderStructureOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
23
47
|
name: string;
|
|
24
48
|
};
|
|
49
|
+
'filename-matches-export': _typescript_eslint_utils_ts_eslint.RuleModule<"filenameMismatch" | "renameExport", [FilenameMatchesExportOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
50
|
+
name: string;
|
|
51
|
+
};
|
|
25
52
|
'index-must-reexport-default': _typescript_eslint_utils_ts_eslint.RuleModule<"missingDefaultReexport", [IndexMustReexportDefaultOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
26
53
|
name: string;
|
|
27
54
|
};
|
|
55
|
+
'max-import-depth': _typescript_eslint_utils_ts_eslint.RuleModule<"tooDeep", [MaxImportDepthOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
56
|
+
name: string;
|
|
57
|
+
};
|
|
28
58
|
'no-cross-feature-imports': _typescript_eslint_utils_ts_eslint.RuleModule<"crossFeatureImport", [NoCrossFeatureImportsOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
29
59
|
name: string;
|
|
30
60
|
};
|
|
@@ -36,12 +66,24 @@ declare const plugin: {
|
|
|
36
66
|
version: string;
|
|
37
67
|
};
|
|
38
68
|
rules: {
|
|
69
|
+
'barrel-purity': _typescript_eslint_utils_ts_eslint.RuleModule<"impureBarrel", [BarrelPurityOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
70
|
+
name: string;
|
|
71
|
+
};
|
|
72
|
+
'colocated-test-required': _typescript_eslint_utils_ts_eslint.RuleModule<"missingTest", [ColocatedTestRequiredOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
73
|
+
name: string;
|
|
74
|
+
};
|
|
39
75
|
'component-folder-structure': _typescript_eslint_utils_ts_eslint.RuleModule<"missingSiblings", [ComponentFolderStructureOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
40
76
|
name: string;
|
|
41
77
|
};
|
|
78
|
+
'filename-matches-export': _typescript_eslint_utils_ts_eslint.RuleModule<"filenameMismatch" | "renameExport", [FilenameMatchesExportOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
79
|
+
name: string;
|
|
80
|
+
};
|
|
42
81
|
'index-must-reexport-default': _typescript_eslint_utils_ts_eslint.RuleModule<"missingDefaultReexport", [IndexMustReexportDefaultOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
43
82
|
name: string;
|
|
44
83
|
};
|
|
84
|
+
'max-import-depth': _typescript_eslint_utils_ts_eslint.RuleModule<"tooDeep", [MaxImportDepthOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
85
|
+
name: string;
|
|
86
|
+
};
|
|
45
87
|
'no-cross-feature-imports': _typescript_eslint_utils_ts_eslint.RuleModule<"crossFeatureImport", [NoCrossFeatureImportsOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
46
88
|
name: string;
|
|
47
89
|
};
|