Skip to content

Commit

Permalink
Add linter rules for ionic projects
Browse files Browse the repository at this point in the history
  • Loading branch information
debiasej committed Nov 1, 2017
1 parent e341112 commit a3bca7d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 9 deletions.
9 changes: 9 additions & 0 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"ngrx-store-freeze": "^0.2.0",
"prettier": "^1.7.4",
"tslint": "^5.8.0",
"tslint-ionic-rules": "0.0.11",
"typescript": "2.3.4"
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion src/app/app-redux/app.reducer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createSelector, createFeatureSelector } from '@ngrx/store'
import { createFeatureSelector, createSelector } from '@ngrx/store'

import * as appActions from './app.actions'

Expand Down
2 changes: 1 addition & 1 deletion src/app/app-redux/meta.reducer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ActionReducerMap, ActionReducer, MetaReducer } from '@ngrx/store'
import { ActionReducer, ActionReducerMap, MetaReducer } from '@ngrx/store'
import { localStorageSync } from 'ngrx-store-localstorage'
import { environment } from '@environments/environment'
import { storage } from '../shared/global/global-ref.service'
Expand Down
35 changes: 28 additions & 7 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,24 @@
"rulesDirectory": [
"node_modules/codelyzer"
],
"extends": "tslint-ionic-rules",
"rules": {
"callable-types": true,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": [true, "ignore-same-line"],
"curly": [
true,
"ignore-same-line"
],
"eofline": true,
"forin": true,
"import-blacklist": [true, "rxjs"],
"import-blacklist": [
true,
"rxjs"
],
"import-spacing": true,
"indent": [
true,
Expand Down Expand Up @@ -48,7 +55,10 @@
"no-empty": false,
"no-empty-interface": true,
"no-eval": true,
"no-inferrable-types": [true, "ignore-params"],
"no-inferrable-types": [
true,
"ignore-params"
],
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
Expand Down Expand Up @@ -102,17 +112,28 @@
"check-separator",
"check-type"
],

"directive-selector": [true, "attribute", "app", "camelCase"],
"component-selector": [true, "element", "app", "kebab-case"],
"directive-selector": [
true,
"attribute",
"",
"camelCase"
],
"component-selector": [
true,
"element",
"",
"kebab-case"
],
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"no-input-rename": true,
"no-output-rename": true,
"use-life-cycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": [true],
"component-class-suffix": [
false
],
"directive-class-suffix": true,
"no-access-missing-member": true,
"templates-use-public": true,
Expand Down

0 comments on commit a3bca7d

Please sign in to comment.