Mark Stacey
86fba2dac1
Fix contentscript injection failure on Firefox 56 ( #10034 )
...
On Firefox 56 and Waterfox Classic, our `runLockdown.js` script throws
an error. This is fine on the HTML pages, as the next script tags still
get run without issue (though they don't benefit from the SES lockdown
sadly). But in the `contentscript`, an exception thrown here appears to
halt the execution of subsequent scripts.
To prevent the `contentscript` from crashing completely, lockdown
errors are now caught and logged. They are also logged to Sentry on the
pages where Sentry is setup.
4 years ago
Mark Stacey
b1b6d7ae38
Fix intermittent metrics e2e test failure ( #9980 )
...
The metrics e2e test would fail if the segment events still weren't
dispatched when the page loaded. The Segment events are sent on a set
interval, so it isn't abnormal for them to lag behind the page load
itself. The `waitUntilCalled` utility has been used to wait until all
required events have been dispatched.
The `wait-until-called` module was converted to an ES5 module, so that
it could be used from an e2e test. The optional `callCount` parameter
has also been added, to allow waiting for more than one call.
The `segmentSpy` had to be converted to a `segmentStub`, to allow the
`waitUntilCalled` utility to be used.
4 years ago
Brad Decker
2ebf8756a4
[RFC] add prettier to eslint ( #8595 )
4 years ago
Whymarrh Whitby
80e2a4496e
Fix mocha/max-top-level-suites issues ( #9699 )
...
Refs #9663
This change enables `mocha/max-top-level-suites` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
10227266f9
Fix node/no-unsupported-features/node-builtins issues ( #9684 )
...
Refs #9663
See [`node/no-unsupported-features/node-builtins`][1] for more information.
This change enables `node/no-unsupported-features/node-builtins` and fixes the issue
raised by the rule.
The `engines.node` version is updated to reflect the version specified by the `.nvmrc`
file and the version used by CircleCI:
```bash
$ cat .nvmrc
v10.18.1
```
```bash
$ docker run --rm -it circleci/node@sha256:e16740707de2ebed45c05d507f33ef204902349c7356d720610b5ec6a35d3d88 node --version
v10.18.1
```
4 years ago
Whymarrh Whitby
6038a1f3f5
Fix dot-notation issues ( #9679 )
...
Refs #9663
This change enables `dot-notation` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
6df17dc90e
Fix accessor-pairs issues ( #9680 )
...
Refs #9663
See [`accessor-pairs`][1] for more information.
This change enables `accessor-pairs` and fixes the issues raised by the rule.
[1]:https://eslint.org/docs/rules/accessor-pairs
4 years ago
Whymarrh Whitby
362e717eef
Fix node/no-deprecated-api issues ( #9670 )
...
Refs #9663
See [`node/no-deprecated-api`][1] for more information.
This change enables `node/no-deprecated-api` and fixes the issues raised by the rule.
[1]:https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-deprecated-api.md
The change to the way that `punycode` is imported is to address the fact that
third-party module is hidden by the built-in. This is a silly hack but it works.
4 years ago
Whymarrh Whitby
b704eaeb66
Fix node/no-path-concat issues ( #9669 )
...
Refs #9663
See [`node/no-path-concat`][1] for more information.
This change enables `node/no-path-concat` and fixes the issues raised by the rule.
[1]:https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-path-concat.md
4 years ago
Whymarrh Whitby
b369a68eb3
Fix node/no-callback-literal issues ( #9668 )
...
Refs #9663
See [`node/no-callback-literal`][1] for more information.
This change enables `node/no-callback-literal` and fixes the issues raised by the rule.
[1]:https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-callback-literal.md
4 years ago
Mark Stacey
7d0a7ab301
Update `@metamask/eslint-config` to v4.1.0 ( #9663 )
...
`@metamask/eslint-config` has been updated to v4.1.0. This update
requires that we update `eslint` to v7 as well, which in turn requires
updating most `eslint`-related packages.
Most notably, `babel-eslint` was replaced with `@babel/eslint-parser`,
and `babel-eslint-plugin` was replaced by `@babel/eslint-plugin`. This
required renaming all the `babel/*` rules to `@babel/*`.
Most new or updated rules that resulted in lint errors have been
temporarily disabled. They will be fixed and re-enabled in subsequent
PRs.
4 years ago
Mark Stacey
ce66ddcf0d
Use `prettier` for JSON linting ( #9396 )
...
Instead of using `eslint-plugin-json` for linting JSON files,
`prettier` is now used. `prettier` is capable of detecting and
correcting more problems than `eslint-plugin-json` can, such as
indentation.
All JSON files have been run through `prettier`. The changes are all
superficial.
4 years ago
Whymarrh Whitby
b8938c9c7a
Move ESLint ignore patterns into config ( #9392 )
4 years ago
Whymarrh Whitby
449118dfc9
Remove unneeded globals from ESLint config ( #9342 )
4 years ago
Whymarrh Whitby
1024f49275
Use @metamask/eslint-config@3.2.0 ( #9330 )
4 years ago
Whymarrh Whitby
2b7a692658
Use @metamask/eslint-config@3.1.0 ( #9275 )
...
This change updates the shared ESLint config to the latest published version,
v3.1.0.
From the config [`CHANGELOG.md`][1]: v3.0.1 has disabled `prefer-object-spread`
by default, so it has been enabled for this project.
[1]:https://github.com/MetaMask/eslint-config/blob/master/CHANGELOG.md
4 years ago
Whymarrh Whitby
b6ccd22d6c
Update ESLint shared config to v3 ( #9274 )
...
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
4 years ago
Whymarrh Whitby
6ab12001e3
Fix prefer-destructuring issues ( #9263 )
...
See [`prefer-destructuring`](https://eslint.org/docs/rules/prefer-destructuring ) for more information.
This change enables `prefer-destructuring` and fixes the issues raised by the rule.
4 years ago
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.
4 years ago
Whymarrh Whitby
b7259e5d6a
Fix radix issues ( #9247 )
...
See [`radix`](https://eslint.org/docs/rules/radix ) for more information.
This change enables `radix` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
4357cda7b8
Fix no-shadow issues ( #9246 )
...
See [`no-shadow`](https://eslint.org/docs/rules/no-shadow ) for more information.
This change enables `no-shadow` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
a89b6677a1
Fix import/unambiguous issues ( #9233 )
...
See [`import/unambiguous`](https://eslint.org/docs/rules/import/unambiguous ) for more information.
This change enables `import/unambiguous` and fixes the issues raised by the rule.
4 years ago
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.
4 years ago
Whymarrh Whitby
aaacf66c6e
Fix import/no-extraneous-dependencies issues ( #9232 )
...
See [`import/no-extraneous-dependencies`](https://eslint.org/docs/rules/import/no-extraneous-dependencies ) for more information.
This change enables `import/no-extraneous-dependencies` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
e021acdc0a
Fix max-statements-per-line issues ( #9218 )
...
See [`max-statements-per-line`](https://eslint.org/docs/rules/max-statements-per-line ) for more information.
This change enables `max-statements-per-line` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
9e7841fa91
Consolidate ESLint config files ( #9231 )
4 years ago
Whymarrh Whitby
5d42a9b773
Fix require-unicode-regexp issues ( #9212 )
...
* Fix require-unicode-regexp issues
See [`require-unicode-regexp`](https://eslint.org/docs/rules/require-unicode-regexp ) for more information.
This change enables `require-unicode-regexp` and fixes the issues raised by the rule.
* Remove case-insensitive flag from regexps
4 years ago
Whymarrh Whitby
884775cf71
Fix no-negated-condition issues ( #9222 )
...
See [`no-negated-condition`](https://eslint.org/docs/rules/no-negated-condition ) for more information.
This change enables `no-negated-condition` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
c11888f287
Fix no-empty-function issues ( #9216 )
...
See [`no-empty-function`](https://eslint.org/docs/rules/no-empty-function ) for more information.
This change enables `no-empty-function` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
9b78d3ab07
Fix import/extensions issues ( #9217 )
...
See [`import/extensions`](https://eslint.org/docs/rules/import/extensions ) for more information.
This change enables `import/extensions` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
3bd22a2058
Fix no-template-curly-in-string issues ( #9221 )
...
See [`no-template-curly-in-string`](https://eslint.org/docs/rules/no-template-curly-in-string ) for more information.
This change enables `no-template-curly-in-string` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
944f6d4880
Fix no-process-exit issues ( #9219 )
...
See [`no-process-exit`](https://eslint.org/docs/rules/no-process-exit ) for more information.
This change enables `no-process-exit` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
82a0ee27f3
Fix prefer-rest-params issues ( #9215 )
...
See [`prefer-rest-params`](https://eslint.org/docs/rules/prefer-rest-params ) for more information.
This change enables `prefer-rest-params` and fixes the issues raised by the rule.
4 years ago
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.
4 years ago
Whymarrh Whitby
b91cf74d14
Fix no-nested-ternary issues ( #9214 )
...
See [`no-nested-ternary`](https://eslint.org/docs/rules/no-nested-ternary ) for more information.
This change enables `no-nested-ternary` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
954df6e482
Fix no-constant-condition issues ( #9210 )
...
See [`no-constant-condition`](https://eslint.org/docs/rules/no-constant-condition ) for more information.
This change enables `no-constant-condition` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
42e7d205b2
Fix no-dupe-else-if issues ( #9208 )
...
See [`no-dupe-else-if`](https://eslint.org/docs/rules/no-dupe-else-if ) for more information.
This change enables `no-dupe-else-if` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
853b89e314
Fix no-global-assign issues ( #9209 )
...
See [`no-global-assign`](https://eslint.org/docs/rules/no-global-assign ) for more information.
This change enables `no-global-assign` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
cd370be728
Fix no-invalid-this issues ( #9207 )
...
See [`no-invalid-this`](https://eslint.org/docs/rules/no-invalid-this ) for more information.
This change enables `no-invalid-this` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
c0f05ccae6
Fix implicit-arrow-linebreak issues ( #9201 )
...
See [`implicit-arrow-linebreak`](https://eslint.org/docs/rules/implicit-arrow-linebreak ) for more information.
This change enables `implicit-arrow-linebreak` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
76bd7f98b6
Fix prefer-spread issues ( #9203 )
...
See [`prefer-spread`](https://eslint.org/docs/rules/prefer-spread ) for more information.
This change enables `prefer-spread` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
310b15ba4a
Fix no-plusplus issues ( #9206 )
...
See [`no-plusplus`](https://eslint.org/docs/rules/no-plusplus ) for more information.
This change enables `no-plusplus` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
548b0bbbd5
Fix no-eq-null issues ( #9205 )
...
See [`no-eq-null`](https://eslint.org/docs/rules/no-eq-null ) for more information.
This change enables `no-eq-null` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
88f54e29fb
Fix no-empty issues ( #9202 )
...
See [`no-empty`](https://eslint.org/docs/rules/no-empty ) for more information.
This change enables `no-empty` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
3346c2fc07
Fix no-loop-func issues ( #9199 )
...
See [`no-loop-func`](https://eslint.org/docs/rules/no-loop-func ) for more information.
This change enables `no-loop-func` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
ef88d79fac
Fix no-useless-concat issues ( #9200 )
...
See [`no-useless-concat`](https://eslint.org/docs/rules/no-useless-concat ) for more information.
This change enables `no-useless-concat` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
9842b2f1ce
Fix no-useless-catch issues ( #9198 )
...
See [`no-useless-catch`](https://eslint.org/docs/rules/no-useless-catch ) for more information.
This change enables `no-useless-catch` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
a8863a3446
Fix consistent-return issues ( #9192 )
...
See [`consistent-return`](https://eslint.org/docs/rules/consistent-return ) for more information.
This change enables `consistent-return` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
885125ad03
Fix no-case-declarations issues ( #9191 )
...
See [`no-case-declarations`](https://eslint.org/docs/rules/no-case-declarations ) for more information.
This change enables `no-case-declarations` and fixes the issues raised by the rule.
4 years ago
Whymarrh Whitby
bf6578c6b8
Enable guard-for-in rule ( #9000 )
4 years ago