(node)
| 631 | |
| 632 | visit(ast, { |
| 633 | JSXAttribute(node) { |
| 634 | node = node as import('@babel/types').JSXAttribute |
| 635 | |
| 636 | if (!node.value) { |
| 637 | return |
| 638 | } |
| 639 | |
| 640 | // We don't want to support namespaced attributes (e.g. `somens:class`) |
| 641 | // React doesn't support them and most tools don't either |
| 642 | if (typeof node.name.name !== 'string') { |
| 643 | return |
| 644 | } |
| 645 | |
| 646 | if (!matcher.hasStaticAttr(node.name.name)) { |
| 647 | return |
| 648 | } |
| 649 | |
| 650 | if (isStringLiteral(node.value)) { |
| 651 | sortStringLiteral(node.value, { env }) |
| 652 | } else if (node.value.type === 'JSXExpressionContainer') { |
| 653 | sortInside(node.value) |
| 654 | } |
| 655 | }, |
| 656 | |
| 657 | CallExpression(node) { |
| 658 | node = node as import('@babel/types').CallExpression |
nothing calls this directly
no test coverage detected
searching dependent graphs…