Skip to content

Commit

Permalink
feat(example): Configure ng-cli-example linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
cartant committed Oct 19, 2017
1 parent 7209895 commit 73872cc
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 1 deletion.
8 changes: 8 additions & 0 deletions examples/ng-cli-example/e2e/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": [
"../tslint.json"
],
"rules": {
"rxjs-add": { "severity": "off" }
}
}
9 changes: 9 additions & 0 deletions examples/ng-cli-example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/ng-cli-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"rxjs-tslint-rules": "^3.0.3",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.3.3"
Expand Down
5 changes: 5 additions & 0 deletions examples/ng-cli-example/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
import { Observable } from 'rxjs/Observable';

@Component({
selector: 'app-root',
Expand All @@ -7,4 +8,8 @@ import { Component } from '@angular/core';
})
export class AppComponent {
title = 'app';

constructor() {
const obs = Observable.of(1).map(value => value + 1);
}
}
2 changes: 2 additions & 0 deletions examples/ng-cli-example/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import './rxjs.imports';

import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

Expand Down
2 changes: 2 additions & 0 deletions examples/ng-cli-example/src/rxjs.imports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import 'rxjs/add/observable/of';
import 'rxjs/add/operator/map';
1 change: 1 addition & 0 deletions examples/ng-cli-example/src/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
]
},
"files": [
"rxjs.imports.ts",
"test.ts"
],
"include": [
Expand Down
13 changes: 12 additions & 1 deletion examples/ng-cli-example/tslint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": [
"rxjs-tslint-rules"
],
"rulesDirectory": [
"node_modules/codelyzer"
],
Expand Down Expand Up @@ -136,6 +139,14 @@
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true,
"invoke-injectable": true
"invoke-injectable": true,
"rxjs-add": {
"options": [{
"allowElsewhere": false,
"allowUnused": false,
"file": "./src/rxjs.imports.ts"
}],
"severity": "error"
}
}
}

0 comments on commit 73872cc

Please sign in to comment.