eslint-plugin-stratified-design 0.12.10 → 0.12.11

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.
@@ -98,7 +98,9 @@ const validateRawStructure = (rawStructure) => {
98
98
  for (const rawLayer of rawLayers) {
99
99
  if (!isRawLayerValid(rawLayer)) return false;
100
100
  const layerName = typeof rawLayer === "string" ? rawLayer : rawLayer.name;
101
- if (toSegments(layerName).length > 1) return false;
101
+ const isNodeModule =
102
+ typeof rawLayer === "string" ? false : rawLayer.nodeModule;
103
+ if (!isNodeModule && toSegments(layerName).length > 1) return false;
102
104
  }
103
105
  }
104
106
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-stratified-design",
3
- "version": "0.12.10",
3
+ "version": "0.12.11",
4
4
  "description": "ESlint rules for stratified design",
5
5
  "keywords": [
6
6
  "eslint",
@@ -147,6 +147,13 @@ describe("helpers/stratified-imports", () => {
147
147
  ["layerC"],
148
148
  ],
149
149
  },
150
+ {
151
+ expected: true,
152
+ rawStructure: [
153
+ ["layerA", { name: "layerA/layerB", nodeModule: true }],
154
+ ["layerC"],
155
+ ],
156
+ },
150
157
  {
151
158
  expected: true,
152
159
  rawStructure: [