Skip to content

Commit

Permalink
eslint issues fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
janzal committed Oct 20, 2016
1 parent bc853bc commit eb8790f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/extractAndWritePOTFromMessagesSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import flowRight from 'lodash/flowRight';
import readAllMessageAsObjectSync from './readAllMessageAsObjectSync';
import potFormater from './potFormater';

const CUSTOM_KEY_MAPPER = (message, messageKey, filename) => ({
[message[messageKey]]: [{ ...message, filename }]
const customKeyMapper = (message, messageKey, filename) => ({
[message[messageKey]]: [{ ...message, filename }],
});

const customKeyMapperFactory = (messageKey = 'defaultMessage') =>
(message, filename) => CUSTOM_KEY_MAPPER(message, messageKey, filename);
(message, filename) => customKeyMapper(message, messageKey, filename);

function extractAndWritePOTFromMessagesSync(srcPatterns, { messageKey, output }) {
const mapper = messageKey ? customKeyMapperFactory(messageKey) : undefined;
Expand Down
3 changes: 2 additions & 1 deletion src/filterPOAndWriteTranslateSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import readAllPOAsObjectSync from './readAllPOAsObjectSync';

const isAJSONFile = string => /.json/.test(string);

function filterPOAndWriteTranslateSync(srcPatterns, { messageKey = 'defaultMessage', messagesPattern, output }) {
function filterPOAndWriteTranslateSync(srcPatterns,
{ messageKey = 'defaultMessage', messagesPattern, output }) {
const translationTable = readAllPOAsObjectSync(srcPatterns);
const messageList = flowRight(
flatten, // 3. return flatten object values
Expand Down

0 comments on commit eb8790f

Please sign in to comment.