Commit 128e6b9
committed
Report deep type imports without a public API mapping in no-deep-imports
The no-deep-imports ESLint rule reports deep default and named imports
from 'react-native/...' even when there is no public API mapping (just
without an auto-fix). Deep type imports, however, were only reported
when the imported module had a truthy `types` mapping; a deep type
import from a module with no mapping, or one whose mapping has
`types: null` (e.g. AccessibilityInfo), slipped through unreported.
Add the missing else branch so these deep type imports are reported
(without an auto-fix), matching the default/named import behavior.
Add regression tests for both cases (no mapping, and types: null).1 parent b364490 commit 128e6b9
2 files changed
Lines changed: 31 additions & 0 deletions
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
128 | 154 | | |
129 | 155 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| |||
0 commit comments