Skip to content

Commit

Permalink
Framework: Add print flags to codemods (#12520)
Browse files Browse the repository at this point in the history
Using jscodeshift's `useTabs` and `arrayBracketSpacing` option flags will generate code more in line with our style guide.
  • Loading branch information
jsnmoon committed Apr 13, 2017
1 parent d556a33 commit 9e51798
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/codemods/commonjs-exports
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const binArgs = [
'-t',
'node_modules/5to6-codemod/transforms/exports.js',
'--extensions=js,jsx',
'--useTabs=true',
'--arrayBracketSpacing=true',
args[0],
];
const binPath = path.join( '.', 'node_modules', '.bin', 'jscodeshift' )
Expand Down
2 changes: 2 additions & 0 deletions bin/codemods/commonjs-imports
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const binArgs = [
'-t',
'node_modules/5to6-codemod/transforms/cjs.js',
'--extensions=js,jsx',
'--useTabs=true',
'--arrayBracketSpacing=true',
args[0],
];
const binPath = path.join( '.', 'node_modules', '.bin', 'jscodeshift' )
Expand Down
2 changes: 2 additions & 0 deletions bin/codemods/generate-named-exports-from-default
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const binArgs = [
'-t',
'node_modules/5to6-codemod/transforms/named-export-generation.js',
'--extensions=js,jsx',
'--useTabs=true',
'--arrayBracketSpacing=true',
args[0],
];
const binPath = path.join( '.', 'node_modules', '.bin', 'jscodeshift' )
Expand Down

0 comments on commit 9e51798

Please sign in to comment.