How to use the jsx-ast-utils.hasEveryProp function in jsx-ast-utils

To help you get started, we’ve selected a few jsx-ast-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FormidableLabs / eslint-plugin-react-native-a11y / src / rules / has-accessibility-props.js View on Github external
JSXOpeningElement: (node: JSXOpeningElement) => {
      if (
        isTouchable(node, context) &&
        !hasProp(node.attributes, 'accessibilityRole') &&
        !hasEveryProp(node.attributes, deprecatedProps) &&
        getLiteralPropValue(getProp(node.attributes, 'accessible')) !== false
      ) {
        context.report({
          node,
          message: errorMessage(elementType(node))
        });
      }
    }
  })