Commit Graph

6 Commits

Author SHA1 Message Date
Egon Elbre
8620532a05 web/satellite: bump dependencies
This contains also multiple fixes to make it work.
The following is a non-exhaustive list.

When @Prop default value is a callback, then it is called
instead of set verbatim. This means, when you want a default
value to be a callback, then it needs to be `default: () => () => X`.

jest does not yet properly support WebWorkers, hence the code introduces
an indirection to provide the worker URL.

This in turn required removing the global "store" dependency from
the tests. As a consequence the new NotificatorPlugin takes store
as a dependency. And many of the tests are adjusted to not import
store directly.

Moved StoreModule definition to avoid initializing the global store.

Some of the router code was moved into store. We can later figure out
how to structure it better and move it back.

bip39 needs explicit fallbacks for some of the dependencies.

Fixes to timer mocking. jest supports it natively.

Remove sinon dependency. jest provides all the functionality we need.

Change-Id: I7af3599390c63ce9f99dbd0b1e0870e9f8ca994d
2022-05-04 15:02:01 +00:00
Egon Elbre
0889866b17 web/: add @vue/component annotations
Some linters do not work properly without those annotations.
This was done with a batch replace.

Also needed to turn off two lint rules, they will be re-enabled in the
followup change. This way the batch change can be clearly separated from
manual modifications.

Change-Id: I891ae09689520edaba5588c1f2206766db2d2b90
2021-08-31 21:25:49 +03:00
Egon Elbre
ad0b19fb02 web/satellite: fix lint issues
Fix svg.d.ts definition.

Disable no-explicit-any in src/api, because wrangling all the GraphQL
result types properly is not that nice. We can either fix this later
manually, generate GraphQL types or remove the GraphQL endpoints.

Add annotations to src/store/. Currently it still uses any in places and
also defines more types than absolutely necessary. This is an
unfortunate side-effect of the vuex api. There does seem to be an
alternative package that handles them, but to minimize the number of
changes, we'll currently use these types. Due to those decisions it's
also not easily possible to have types instead of any in multiple
places.

StripeCardInput currently uses any, however, if we find the proper
declarations, we can replace them later.

Change-Id: I2ec8bf7fdd8023129d1f8739ce2b6d97de2a58d0
2021-08-25 06:01:19 +00:00
Egon Elbre
b8280bd057 web/satellite: enable vue/recommended linting
Change-Id: I73cd1e72f369a172f9416be9b1220cbbd6c77637
2021-08-11 11:10:51 +03:00
Egon Elbre
6b153192a3 web/satellite: fix lint issues
After migrating to eslint some errors were disabled to make it easier to
migrate.

This enables all the lint rules and treats all warnings as a build
failure. Similarly, CI won't automatically try to fix mistakes.

Change-Id: I80f808af026fc51bed90421b3b24737994a52094
2021-08-10 09:22:19 +00:00
Nikolay Yurchenko
04b16c8b6c stylelint added, lint errors fixed (#3360) 2019-10-28 17:59:19 +02:00