nikeshnazareth / verifiable-voting

A verifiable voting system built using Ethereum and IPFS
MIT License
0 stars 0 forks source link

Standardise RXJS operator imports #41

Open nikeshnazareth opened 5 years ago

nikeshnazareth commented 5 years ago

The majority of the code base uses the old operator import syntax: import 'rxjs/add/operator/filter'

This is now deprecated. Furthermore, it doesn't seem to work anymore with Subjects (or BehaviourSubjects, or ReplaySubjects, etc)

The new syntax is: import { filter } from 'rxjs/operators' mysubject.pipe(filter(...))

Currently, the code base uses the new syntax when required and the old when when possible. This should be standardised.

nikeshnazareth commented 5 years ago

Note that the second syntax (lettable operators) can be enforced with the following tslint rules:

"rxjs-no-add": { "severity": "error" },
"rxjs-no-operator": { "severity": "error" },
"rxjs-no-patched": { "severity": "error" },
"rxjs-no-wholesale": { "severity": "error" }

See this explanation