1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
Commit Graph

28 Commits

Author SHA1 Message Date
Brad Decker
652d631cda
remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
Mark Stacey
3732c5f71e
Add JSDoc ESLint rules (#12112)
ESLint rules have been added to enforce our JSDoc conventions. These
rules were introduced by updating `@metamask/eslint-config` to v9.

Some of the rules have been disabled because the effort to fix all lint
errors was too high. It might be easiest to enable these rules one
directory at a time, or one rule at a time.

Most of the changes in this PR were a result of running
`yarn lint:fix`. There were a handful of manual changes that seemed
obvious and simple to make. Anything beyond that and the rule was left
disabled.
2022-01-07 12:27:33 -03:30
Thomas Huang
d78cfebd43
Jestify app/scripts/lib/**/*.test.js (#12890)
* Jestify app/scripts/lib/*.test.js

* Mocha config on mocha test script

* Add app/scripts/lib to include subdirs
2021-12-06 10:40:39 -06:00
Mark Stacey
f47cfbbb3e
Use strict assertion mode everywhere (#11012)
The `assert` module has two modes: "Legacy" and "strict". When using
strict mode, the "strict" version of each assertion method is implied.
Whereas in legacy mode, by default it will use the deprecated, "loose"
version of each assertion.

We now use strict mode everywhere. A few tests required updates where
they were asserting the wrong thing, and it was passing beforehand due
to the loose matching.
2021-05-07 17:08:24 -02:30
Brad Decker
5a233e4634
colocate tests in flat structure (#10655) 2021-03-16 16:00:08 -05:00
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
e803807dd9
Fix no-param-reassign issues (#9235)
See [`no-param-reassign`](https://eslint.org/docs/rules/no-param-reassign) for more information.

This change enables `no-param-reassign` and fixes the issues raised by the rule.
2020-08-15 09:28:11 -02:30
Whymarrh Whitby
bf6578c6b8
Enable guard-for-in rule (#9000) 2020-07-21 18:40:45 -02:30
Whymarrh Whitby
d612f9988e
Move default export declaration to Migrator class (#8407) 2020-04-26 00:02:41 -02:30
Whymarrh Whitby
76a31c3175 Clean up Migrator test cases (#7835) 2020-01-15 13:54:28 -08:00
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
Whymarrh Whitby
aa41057628
Update ESLint rules for curly braces style (#7477)
* eslint: Enable curly and brace-style

* yarn lint --fix
2019-11-19 20:33:20 -03:30
Whymarrh Whitby
603c1310ff Add a few missing docblocks to background files 2018-04-18 18:00:22 -02:30
kumavis
ffc71ff7d2 migrator - dont overwrite error stack and warn to console 2018-04-05 13:38:34 -07:00
kumavis
7fdf663ea7 migrator - fix typo 2018-04-05 13:21:00 -07:00
kumavis
2b880dd4e0 migrations - report migrations errors to sentry with vault structure 2018-04-05 13:15:08 -07:00
Thomas Huang
13e6672028 Linting 2017-06-12 11:08:32 -07:00
kumavis
2c8bbe3b25 migrator - fix typo 2017-05-12 12:27:40 -07:00
kumavis
70a328e028 migrator - cleaner migration runner with es7 2017-05-11 18:15:59 -07:00
frankiebee
6c01b26845 use asyncQ.waterfall instead of asyncQ.eachSeries 2017-05-11 23:25:33 +02:00
frankiebee
1772d34e94 fix migrator 2017-05-11 10:10:50 +02:00
Thomas Huang
6bdb4c8728 Fix linting warnings 2017-04-26 21:05:45 -07:00
kumavis
77f8995568 migrations - fix migration #9 and add safety checks to migrator 2017-02-03 14:00:30 -08:00
kumavis
80514d73b5 migrations - wip - 005 multivault migration 2017-01-12 02:24:33 -08:00
kumavis
b33c51c0a6 migrations - introduce promise-based migrator 2017-01-12 01:17:05 -08:00