Skip to content

Commit

Permalink
Add angular-specific linter. (google#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
franekp authored and berggren committed Sep 13, 2017
1 parent 481a38b commit f43924f
Show file tree
Hide file tree
Showing 3 changed files with 252 additions and 97 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"chart.js": "2.2.2",
"chokidar": "^1.7.0",
"chokidar-cli": "^1.2.0",
"codelyzer": "^3.2.0",
"css-loader": "^0.28.5",
"d3": "4.2.2",
"extract-text-webpack-plugin": "^3.0.0",
Expand Down
36 changes: 34 additions & 2 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "tslint:recommended",
"extends": ["tslint:recommended", "codelyzer"],
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
"max-line-length": {
"options": [150]
Expand All @@ -25,7 +28,36 @@
"whitespace": true,
"no-empty": false,
"no-shadowed-variable": false,
"member-access": false
"member-access": false,

"angular-whitespace": [true, "check-interpolation", "check-pipe", "check-semicolon"],
"banana-in-box": true,
"templates-no-negated-async": true,
"directive-selector": [
true, "attribute", ["ts"], "camelCase"
],
"component-selector": [
"element", [
"ts-core", "ts-explore", "ts-sketch", "ts-story"
], "kebab-case"
],
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"use-view-encapsulation": true,
"no-attribute-parameter-decorator": true,
"no-input-rename": true,
"no-output-rename": true,
"no-forward-ref": true,
"use-life-cycle-interface": true,
"use-pipe-transform-interface": true,
"pipe-naming": [true, "camelCase", "ts"],
"component-class-suffix": true,
"directive-class-suffix": true,
"templates-use-public": true,
"no-access-missing-member": true,
"invoke-injectable": true,
"template-to-ng-template": true
},
"jsRules": {
"max-line-length": {
Expand Down
Loading

0 comments on commit f43924f

Please sign in to comment.