Package Exports
- tslint-rxjs-subject-restrictions-rule
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tslint-rxjs-subject-restrictions-rule) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
RxJs Subject Restrictions rule
Custom rule for tslint
NPM
www.npmjs.com/package/tslint-rxjs-subject-restrictions-rule
Description
Public access modifier for RxJS Subject is not allowed'. The name of RxJS Subject variable must ends with "$".
Example
Right:
import { BehaviorSubject } from "rxjs/BehaviorSubject";
class Car {
private isActive$ = new BehaviorSubject({})
}Wrong:
import { BehaviorSubject } from "rxjs/BehaviorSubject";
class Car {
public isActive = new BehaviorSubject({})
}Installing / Getting started
Install:
npm i -D tslint-rxjs-subject-restrictions-ruleEdit your tslint.json file:
"rulesDirectory": [
"node_modules/tslint-rxjs-subject-restrictions-rule/dist"
],
"rules": {
"rx-subject-restrictions": true
}Licensing
"The code in this project is licensed under MIT license."