Skip to content

Commit

Permalink
Framework: Fix i18n lint test to import babelrc options
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Dec 18, 2015
1 parent 2984fbe commit 2913f91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/i18nlint/i18nlint.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
var fs = require( 'fs' ),
XGettext = require( 'xgettext-js' ),
debug = require( 'debug' )( 'calypso:i18nlint' ),
assign = require( 'lodash/object/assign' ),
babel = require( 'babel-core' ),
babelOptions = JSON.parse( fs.readFileSync( __dirname + '/../../.babelrc' ) ),
preProcessXGettextJSMatch = require( '../i18n/preprocess-xgettextjs-match.js' ),
SourceMapConsumer = require( 'source-map' ).SourceMapConsumer,
tokenize = require( '../../client/lib/interpolate-components/tokenize.js' ),
Expand Down Expand Up @@ -102,7 +104,7 @@ function processJsx( sourceString ) {
sourceMapConsumer = undefined;

try {
transformedJsxSource = babel.transform( sourceString, { sourceMaps: true } );
transformedJsxSource = babel.transform( sourceString, assign( {}, babelOptions, { sourceMaps: true } ) );
sourceMapConsumer = new SourceMapConsumer( transformedJsxSource.map );
} catch ( err ) {
debug( 'babel.transform() failed' +
Expand Down

0 comments on commit 2913f91

Please sign in to comment.