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

24 Commits

Author SHA1 Message Date
Erik Marks
76a2a9bb8b
@metamask/eslint config@5.0.0 (#10358)
* @metamask/eslint-config@5.0.0
* Update eslintrc and prettierrc
* yarn lint:fix
2021-02-04 10:15:23 -08:00
Mark Stacey
14d85b1332
Make JSDoc formatting more consistent (#9796)
A few inconsistencies in JSDoc formatting have been fixed throughout
the project. Many issues remain; these were just the few things that
were easy to fix with a regular expression.

The changes include:

* Using lower-case for primitive types, but capitalizing non-primitive
 types
* Separating the parameter identifier and the description with a dash
* Omitting a dash between the return type and the return description
* Ensuring the parameter type is first and the identifier is second (in
 a few places it was backwards)
* Using square brackets to denote when a parameter is optional, rather
 than putting "(optional)" in the parameter description
* Including a type and identifier with every parameter
* Fixing inconsistent spacing, except where it's used for alignment
* Remove incorrectly formatted `@deprecated` tags that reference non-
 existent properties
* Remove lone comment block without accompanying function

Additionally, one parameter was renamed for clarity.
2020-11-10 14:00:41 -03:30
Brad Decker
2ebf8756a4
[RFC] add prettier to eslint (#8595) 2020-11-02 17:41:28 -06:00
Whymarrh Whitby
146127c474
Fix no-prototype-builtins issues (#9213)
See [`no-prototype-builtins`](https://eslint.org/docs/rules/no-prototype-builtins) for more information.

This change enables `no-prototype-builtins` and fixes the issues raised by the rule.
2020-08-13 18:04:51 -02:30
Whymarrh Whitby
4f0a205369
Use eslint@6.8.0 (#8978)
* Use eslint@6.8.0
* yarn lint:fix
2020-07-14 12:50:41 -02:30
Whymarrh Whitby
f5a125fe61
Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
Whymarrh Whitby
a78cf0ef3a Enable arrow-parens ESLint rule 2020-02-15 17:04:21 -03:30
Mark Stacey
ac01c5c89a
Consistent jsdoc syntax (#7755)
* Specify type before parameter name

Various JSDoc `@param` entries were specified as `name {type}` rather
than `{type} name`.

A couple of `@return` entries have been given types as well.

* Use JSDoc optional syntax rather than Closure syntax

* Use @returns rather than @return

* Use consistent built-in type capitalization

Primitive types are lower-case, and Object is upper-case.

* Separate param/return description with a dash
2020-01-13 14:36:36 -04:00
Whymarrh Whitby
92971d3c87
Migrate codebase to use ESM (#7730)
* Update eslint-plugin-import version

* Convert JS files to use ESM

* Update ESLint rules to check imports

* Fix test:unit:global command env

* Cleanup mock-dev script
2020-01-09 00:04:58 -03:30
S.C. Chen
1a4203a8c6 Fix locale codes contains underscore will never be preferred (#6116) 2019-02-08 16:06:37 -03:30
brunobar79
a8f745f9fe eslint --fix . 2018-07-02 18:49:33 -04:00
Dan Finlay
11bfdf444d Handle brave throws 2018-06-14 10:09:45 -07:00
Jenny Pollack
fd8bcc9cb1 lint 2018-06-06 22:08:32 -07:00
Jenny Pollack
01a1eff8a8 remove loglevel 2018-06-06 18:35:41 -07:00
Jenny Pollack
7edde61c12 preferred first languauge - check for Brave 2018-06-06 18:24:45 -07:00
Jenny Pollack
275c31855d first language - add check for brave browser on getAcceptLanguages 2018-06-06 18:10:05 -07:00
kumavis
e3ecc94a52
i18n - getFirstPreferredLangCode - guard against missing i18n api
fix for brave
2018-05-28 21:50:23 -07:00
Dan
7b5d506cec Document async function as returning a promise. 2018-04-17 00:55:10 -02:30
Dan
20a075657f Documentation for various controllers and libs 2018-04-16 14:38:04 -02:30
Dan
3c4b72bf2c Map existingLocaleCodes and userPreferredLocaleCodes to lower case in get-first-preferred-lang-code.js 2018-04-03 20:52:17 -02:30
Dan
5aff114001 Ensure get-first-preferred-lang-code.js matches locale codes from local directory names and chrome extension api. 2018-04-03 20:34:28 -02:30
kumavis
165ae7d193 i18n - derrive locale codes from index 2018-03-27 18:07:24 -07:00
Dan
be2254b880 Remove comments and console.logs 2018-03-27 10:37:45 -02:30
Dan
b9309f689b Use extension api to get initial locale. 2018-03-22 12:49:19 -02:30