Skip to content

Commit

Permalink
integrate prettier with eslint (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysVuika authored Dec 14, 2024
1 parent 551228d commit efa6847
Show file tree
Hide file tree
Showing 7 changed files with 1,623 additions and 579 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none"
"trailingComma": "es5"
}
4 changes: 3 additions & 1 deletion lib/src/translateProvider.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ describe('TranslateProvider', () => {
global.fetch = jest.fn().mockImplementation(() => {
return Promise.resolve({
ok: true,
json: () => { /* */ },
json: () => {
/* */
},
});
});
});
Expand Down
16 changes: 8 additions & 8 deletions lib/src/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Utils', () => {
const template = 'Good luck, {param1} {param2}!';
const params = {
param1: 'Mr.',
param2: 'Gorsky'
param2: 'Gorsky',
};

const value = format(template, params);
Expand Down Expand Up @@ -61,9 +61,9 @@ describe('Utils', () => {
const data = {
en: {
messages: {
404: 'Error, not found.'
}
}
404: 'Error, not found.',
},
},
};

const value = getValue(data, 'en', 'messages.404');
Expand All @@ -73,8 +73,8 @@ describe('Utils', () => {
test('returns original key if nested value not found', () => {
const data = {
en: {
messages: {}
}
messages: {},
},
};

const value = getValue(data, 'en', 'messages.500');
Expand All @@ -84,8 +84,8 @@ describe('Utils', () => {
test('supports tol-level values with dots', () => {
const data = {
en: {
'messages.errors.500': 'Aw, snap!'
}
'messages.errors.500': 'Aw, snap!',
},
};

const value = getValue(data, 'en', 'messages.errors.500');
Expand Down
Loading

0 comments on commit efa6847

Please sign in to comment.