@simplysm/eslint-plugin 12.11.13 → 12.11.14
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/package.json
CHANGED
|
@@ -3,13 +3,13 @@ export default {
|
|
|
3
3
|
type: "problem",
|
|
4
4
|
docs: {
|
|
5
5
|
description:
|
|
6
|
-
"@simplysm 패키지에서 서브경로 import를 금지합니다. (ex: @simplysm/pkg/src/x → 금지)",
|
|
6
|
+
"@simplysm 패키지에서 'src' 서브경로 import를 금지합니다. (ex: @simplysm/pkg/src/x → 금지)",
|
|
7
7
|
recommended: "error",
|
|
8
8
|
},
|
|
9
9
|
schema: [],
|
|
10
10
|
messages: {
|
|
11
11
|
noSubpathImport:
|
|
12
|
-
"'@simplysm/{{pkg}}' 패키지는
|
|
12
|
+
"'@simplysm/{{pkg}}' 패키지는 'src' 서브경로를 import할 수 없습니다. import '{{importPath}}'는 허용되지 않습니다.",
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
15
|
|
|
@@ -22,8 +22,10 @@ export default {
|
|
|
22
22
|
|
|
23
23
|
if (importPath.startsWith("@simplysm/")) {
|
|
24
24
|
const parts = importPath.split("/");
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
|
|
26
|
+
// 허용: @simplysm/pkg, @simplysm/pkg/xxx, @simplysm/pkg/xxx/yyy
|
|
27
|
+
// 금지: @simplysm/pkg/src, @simplysm/pkg/src/xxx
|
|
28
|
+
if (parts.length >= 3 && parts[2] === "src") {
|
|
27
29
|
context.report({
|
|
28
30
|
node: node.source,
|
|
29
31
|
messageId: "noSubpathImport",
|