File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
test/fixtures/react/option-format Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 11import checkValidOptions from './options'
22
3- export default function ( { types : t } ) {
3+ export default function ( { types : t } ) {
44 return {
55 visitor : {
66 ArrowFunctionExpression ( path , state ) {
@@ -9,7 +9,9 @@ export default function ({types: t}) {
99 const componentName = path . parent . id . name
1010
1111 const functionBody = path . get ( 'body' ) . get ( 'body' )
12- const returnStatement = functionBody . find ( ( c ) => c . type === 'ReturnStatement' )
12+ const returnStatement = functionBody . find (
13+ c => c . type === 'ReturnStatement'
14+ )
1315 const arg = returnStatement . get ( 'argument' )
1416 if ( ! arg . isJSXElement ( ) ) return
1517
Original file line number Diff line number Diff line change @@ -9,15 +9,13 @@ const langTransforms = {
99 snake : snakeCase
1010}
1111
12- const isValidOption = opt => {
13- return opt && isString ( opt )
14- }
12+ const isValidOption = opt => opt && isString ( opt )
1513
16- const validTranform = ( opt ) => {
14+ const validTranform = opt => {
1715 return Object . keys ( langTransforms ) . indexOf ( opt ) > - 1
1816}
1917
20- const checkValidOptions = ( state ) => {
18+ const checkValidOptions = state => {
2119 let attribute = 'data-qa'
2220 let format = 'kebab'
2321
Original file line number Diff line number Diff line change 11{
22 "plugins" : [
33 " syntax-jsx" ,
4- [" ../../../../src" , {
5- "format" : " snake"
6- }]
4+ [
5+ " ../../../../src" ,
6+ {
7+ "format" : " kebab"
8+ }
9+ ]
710 ]
811}
You can’t perform that action at this time.
0 commit comments