1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 03:36:18 +02:00
Commit Graph

5 Commits

Author SHA1 Message Date
Brad Decker
2ebf8756a4
[RFC] add prettier to eslint (#8595) 2020-11-02 17:41:28 -06:00
Whymarrh Whitby
b6ccd22d6c
Update ESLint shared config to v3 (#9274)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-08-19 13:57:05 -02:30
Whymarrh Whitby
c1e3c229bc
Fix import/order issues (#9239)
See [`import/order`](https://eslint.org/docs/rules/import/order) for more information.

This change enables `import/order` and fixes the issues raised by the rule.
2020-08-18 16:48:25 -02:30
Mark Stacey
564f76584b
Tolerate missing or falsey substitutions (#8907)
Previously the `getMessage` function would throw if a substitution was
falsey. Now it will accept any substitution, including `undefined`.

A substitution of `null` or `undefined` will still be reported to
Sentry and printed to the console as an error, but it will not
interrupt execution. Any `null` or `undefined` substitutions will be
rendered as empty strings.

Ideally we'd never pass in `null` or `undefined` as a substitution, but
in practice this sometimes just occurs breifly between renders, which
isn't a severe enough problem to justify crashing the UI.

The detection of React component substitutions has been updated as
well, to ensure that `null` values aren't counted as React
substitutions.
2020-07-03 13:02:35 -03:00
Dan J Miller
92e6338b78
Translation helper: substitute react components and component wrapping substrings (#8129)
* Update i18n-helper to allow substitutions of react components and wrapping of translation substrings

* Simplify code in i18n-helper.js related to substitutions, including react substitutions.

* Remove wrapper support from i18n in favour of using translations in substitutions.

* Fix i18n-helper substitution logic: ensure correct index of substitution is applied

* Throw error if there are not enough substitutions for a translation phrase

* Adds unit tests for now i18n-helper substitution functionality

* Fix grammar, react element line spacing and test layout+readability in i18n-helper.test.js
2020-03-11 12:30:05 -02:30