Skip to content

Instantly share code, notes, and snippets.

@ziqichen6
ziqichen6 / gist:246e5778617224d2b4aff198dab0305d
Created Aug 6, 2018
jscodeshift script to replace "accessibilityTraits" and "accessibilityComponentType" with "accessibilityStates" and "accessibilityRole"
View gist:246e5778617224d2b4aff198dab0305d
'use strict';
export default function transformer(file, api) {
const j = api.jscodeshift;
const root = j(file.source);
let hasChanges = false;
const elements = root.find(j.JSXElement);
let values;
let valuess;
You can’t perform that action at this time.