()
| 42 | } |
| 43 | |
| 44 | assignPatternMatcher() { |
| 45 | if (!this.isEnabled) return |
| 46 | |
| 47 | for (const pattern of this.context.patterns.details) { |
| 48 | this.patternPropertiesByJsxName.set(pattern.jsxName, new Set(pattern.props ?? [])) |
| 49 | pattern.jsx.forEach((jsx) => { |
| 50 | if (typeof jsx === 'string') { |
| 51 | this.patternMatcher.string.add(jsx) |
| 52 | } else { |
| 53 | this.patternMatcher.regex.push(jsx) |
| 54 | } |
| 55 | }) |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | private get jsxFactory() { |
| 60 | return this.context.config.jsxFactory ?? 'styled' |
no test coverage detected