Skip to content

Commit

Permalink
chore(package, tslint): Add codelyzer tslint rules
Browse files Browse the repository at this point in the history
Codelyzer is a set of tslint rules for static code analysis of Angular TypeScript projects.
  • Loading branch information
toverux committed Jan 19, 2017
1 parent d889381 commit 8c40318
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build": "yarn ngc-build && yarn webpack-build",
"ngc-build": "ngc",
"webpack-build": "webpack",
"webpack-watch": "yarn webpack-build -- --watch",
"semantic-release": "semantic-release pre && npm publish --access=public && semantic-release post"
},
"dependencies": {
Expand All @@ -25,6 +26,7 @@
"@angular/compiler-cli": "^2.4.3",
"@angular/core": "^2.4.3",
"awesome-typescript-loader": "^3.0.0-beta.18",
"codelyzer": "^2.0.0-beta.4",
"rxjs": "^5.0.3",
"semantic-release": "^6.3.2",
"tslint": "^4.3.1",
Expand Down
22 changes: 21 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
{
"extends": "tslint:latest",
"rulesDirectory": ["node_modules/codelyzer"],
"rules": {
"quotemark": ["single"],
"trailing-comma": false
"trailing-comma": false,

"directive-selector": [true, "attribute", "swal", "camelCase"],
"component-selector": [true, "element", "swal", "kebab-case"],
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": 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", "swal"],
"component-class-suffix": true,
"directive-class-suffix": true,
"import-destructuring-spacing": true,
"templates-use-public": true,
"no-access-missing-member": true,
"invoke-injectable": true
}
}
64 changes: 63 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ anymatch@^1.3.0:
arrify "^1.0.0"
micromatch "^2.1.5"

app-root-path@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46"

aproba@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0"
Expand Down Expand Up @@ -501,6 +505,16 @@ code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"

codelyzer@^2.0.0-beta.4:
version "2.0.0-beta.4"
resolved "https://registry.yarnpkg.com/codelyzer/-/codelyzer-2.0.0-beta.4.tgz#644c5ffcdcc6c933991e3790a29c5085e80ae4ca"
dependencies:
app-root-path "^2.0.1"
css-selector-tokenizer "^0.7.0"
cssauron "^1.4.0"
source-map "^0.5.6"
sprintf-js "^1.0.3"

colors@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
Expand Down Expand Up @@ -632,6 +646,24 @@ crypto-browserify@^3.11.0:
public-encrypt "^4.0.0"
randombytes "^2.0.0"

css-selector-tokenizer@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86"
dependencies:
cssesc "^0.1.0"
fastparse "^1.1.1"
regexpu-core "^1.0.0"

cssauron@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/cssauron/-/cssauron-1.4.0.tgz#a6602dff7e04a8306dc0db9a551e92e8b5662ad8"
dependencies:
through X.X.X

cssesc@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4"

currently-unhandled@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
Expand Down Expand Up @@ -838,6 +870,10 @@ [email protected]:
version "1.0.2"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550"

fastparse@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8"

filename-regex@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775"
Expand Down Expand Up @@ -1337,6 +1373,10 @@ jsbn@~0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd"

jsesc@~0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"

json-loader@^0.5.4:
version "0.5.4"
resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.4.tgz#8baa1365a632f58a3c46d20175fc6002c96e37de"
Expand Down Expand Up @@ -2089,6 +2129,10 @@ reflect-metadata@^0.1.2:
version "0.1.9"
resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.9.tgz#987238dc87a516895fe457f130435ffbd763a4d4"

regenerate@^1.2.1:
version "1.3.2"
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260"

regenerator-runtime@^0.10.0:
version "0.10.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz#257f41961ce44558b18f7814af48c17559f9faeb"
Expand All @@ -2100,6 +2144,14 @@ regex-cache@^0.4.2:
is-equal-shallow "^0.1.3"
is-primitive "^2.0.0"

regexpu-core@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b"
dependencies:
regenerate "^1.2.1"
regjsgen "^0.2.0"
regjsparser "^0.1.4"

registry-auth-token@^3.0.1:
version "3.1.0"
resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.1.0.tgz#997c08256e0c7999837b90e944db39d8a790276b"
Expand All @@ -2112,6 +2164,16 @@ registry-url@^3.0.3:
dependencies:
rc "^1.0.1"

regjsgen@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"

regjsparser@^0.1.4:
version "0.1.5"
resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c"
dependencies:
jsesc "~0.5.0"

repeat-element@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
Expand Down Expand Up @@ -2491,7 +2553,7 @@ tar@~2.2.1:
fstream "^1.0.2"
inherits "2"

through@2, through@~2.3, through@~2.3.1:
through@2, through@X.X.X, through@~2.3, through@~2.3.1:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"

Expand Down

0 comments on commit 8c40318

Please sign in to comment.