mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge tslint-warnings
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -18,3 +18,5 @@ webpack.records.json
|
|||||||
/npm-debug.log.*
|
/npm-debug.log.*
|
||||||
|
|
||||||
morgan.log
|
morgan.log
|
||||||
|
|
||||||
|
*.css
|
||||||
|
@@ -27,7 +27,3 @@ Currently this contains the [Angular 2 Universal Starter](https://github.com/ang
|
|||||||
|
|
||||||
## AoT and Prod
|
## AoT and Prod
|
||||||
- `npm run build:prod:ngc` to compile the ngfactory files and build prod
|
- `npm run build:prod:ngc` to compile the ngfactory files and build prod
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
60
package.json
60
package.json
@@ -32,17 +32,17 @@
|
|||||||
"lint": "tslint \"src/**/*.ts\" || true"
|
"lint": "tslint \"src/**/*.ts\" || true"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "~2.1.2",
|
"@angular/common": "~2.2.4",
|
||||||
"@angular/compiler": "~2.1.2",
|
"@angular/compiler": "~2.2.4",
|
||||||
"@angular/compiler-cli": "~2.1.2",
|
"@angular/compiler-cli": "~2.2.4",
|
||||||
"@angular/core": "~2.1.2",
|
"@angular/core": "~2.2.4",
|
||||||
"@angular/forms": "~2.1.2",
|
"@angular/forms": "~2.2.4",
|
||||||
"@angular/http": "~2.1.2",
|
"@angular/http": "~2.2.4",
|
||||||
"@angular/platform-browser": "~2.1.2",
|
"@angular/platform-browser": "~2.2.4",
|
||||||
"@angular/platform-browser-dynamic": "~2.1.2",
|
"@angular/platform-browser-dynamic": "~2.2.4",
|
||||||
"@angular/platform-server": "~2.1.2",
|
"@angular/platform-server": "~2.2.4",
|
||||||
"@angular/router": "~3.1.2",
|
"@angular/router": "~3.2.4",
|
||||||
"@angular/upgrade": "~2.1.2",
|
"@angular/upgrade": "~2.2.4",
|
||||||
"@angularclass/bootloader": "~1.0.1",
|
"@angularclass/bootloader": "~1.0.1",
|
||||||
"@angularclass/idle-preload": "~1.0.4",
|
"@angularclass/idle-preload": "~1.0.4",
|
||||||
"@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.14",
|
"@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.14",
|
||||||
@@ -61,27 +61,27 @@
|
|||||||
"ng2-translate": "~4.0.1",
|
"ng2-translate": "~4.0.1",
|
||||||
"preboot": "~4.5.2",
|
"preboot": "~4.5.2",
|
||||||
"rxjs": "5.0.0-beta.12",
|
"rxjs": "5.0.0-beta.12",
|
||||||
"webfontloader": "^1.6.26",
|
"webfontloader": "^1.6.27",
|
||||||
"zone.js": "~0.6.26"
|
"zone.js": "~0.6.26"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ngtools/webpack": "~1.1.7",
|
"@ngtools/webpack": "1.1.7",
|
||||||
"@types/body-parser": "0.0.29",
|
"@types/body-parser": "0.0.33",
|
||||||
"@types/compression": "0.0.29",
|
"@types/compression": "0.0.33",
|
||||||
"@types/cookie-parser": "^1.3.29",
|
"@types/cookie-parser": "^1.3.30",
|
||||||
"@types/express": "^4.0.32",
|
"@types/express": "^4.0.34",
|
||||||
"@types/express-serve-static-core": "^4.0.33",
|
"@types/express-serve-static-core": "^4.0.39",
|
||||||
"@types/hammerjs": "^2.0.32",
|
"@types/hammerjs": "^2.0.33",
|
||||||
"@types/memory-cache": "0.0.29",
|
"@types/memory-cache": "0.0.29",
|
||||||
"@types/mime": "0.0.28",
|
"@types/mime": "0.0.29",
|
||||||
"@types/morgan": "^1.7.32",
|
"@types/morgan": "^1.7.32",
|
||||||
"@types/node": "^6.0.38",
|
"@types/node": "^6.0.51",
|
||||||
"@types/serve-static": "^1.7.27",
|
"@types/serve-static": "^1.7.31",
|
||||||
"@types/webfontloader": "^1.6.27",
|
"@types/webfontloader": "^1.6.27",
|
||||||
"accepts": "^1.3.3",
|
"accepts": "^1.3.3",
|
||||||
"angular2-template-loader": "^0.4.0",
|
"angular2-template-loader": "^0.6.0",
|
||||||
"awesome-typescript-loader": "^2.2.4",
|
"awesome-typescript-loader": "^2.2.4",
|
||||||
"codelyzer": "1.0.0-beta.3",
|
"codelyzer": "2.0.0-beta.1",
|
||||||
"cookie-parser": "^1.4.3",
|
"cookie-parser": "^1.4.3",
|
||||||
"copy-webpack-plugin": "~4.0.1",
|
"copy-webpack-plugin": "~4.0.1",
|
||||||
"express-interceptor": "^1.2.0",
|
"express-interceptor": "^1.2.0",
|
||||||
@@ -90,21 +90,21 @@
|
|||||||
"json-loader": "^0.5.4",
|
"json-loader": "^0.5.4",
|
||||||
"memory-cache": "^0.1.6",
|
"memory-cache": "^0.1.6",
|
||||||
"node-sass": "^3.13.0",
|
"node-sass": "^3.13.0",
|
||||||
"nodemon": "^1.10.0",
|
"nodemon": "^1.11.0",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"reflect-metadata": "0.1.8",
|
"reflect-metadata": "0.1.8",
|
||||||
"rimraf": "^2.5.4",
|
"rimraf": "^2.5.4",
|
||||||
"sass-loader": "^4.0.2",
|
|
||||||
"string-replace-loader": "^1.0.5",
|
"string-replace-loader": "^1.0.5",
|
||||||
"ts-helpers": "^1.1.2",
|
"ts-helpers": "^1.1.2",
|
||||||
"ts-node": "^1.3.0",
|
"ts-node": "^1.7.0",
|
||||||
"tslint": "3.13.0",
|
"tslint": "4.0.2",
|
||||||
"typescript": "2.0.2",
|
"tslint-loader": "3.2.1",
|
||||||
|
"typescript": "2.0.10",
|
||||||
"v8-lazy-parse-webpack-plugin": "^0.3.0",
|
"v8-lazy-parse-webpack-plugin": "^0.3.0",
|
||||||
"webpack": "2.1.0-beta.27",
|
"webpack": "2.1.0-beta.27",
|
||||||
"webpack-bundle-analyzer": "1.4.1",
|
"webpack-bundle-analyzer": "1.4.1",
|
||||||
"webpack-dev-middleware": "^1.8.4",
|
"webpack-dev-middleware": "^1.8.4",
|
||||||
"webpack-dev-server": "2.1.0-beta.11",
|
"webpack-dev-server": "2.1.0-beta.11",
|
||||||
"webpack-merge": "~0.16.0"
|
"webpack-merge": "~1.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,16 +4,19 @@ import { Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/
|
|||||||
changeDetection: ChangeDetectionStrategy.Default,
|
changeDetection: ChangeDetectionStrategy.Default,
|
||||||
encapsulation: ViewEncapsulation.Emulated,
|
encapsulation: ViewEncapsulation.Emulated,
|
||||||
selector: 'ds-home',
|
selector: 'ds-home',
|
||||||
styleUrls: ['./home.component.scss'],
|
styleUrls: ['./home.component.css'],
|
||||||
templateUrl: './home.component.html'
|
templateUrl: './home.component.html'
|
||||||
})
|
})
|
||||||
export class HomeComponent {
|
export class HomeComponent {
|
||||||
|
|
||||||
data: any = {};
|
data: any = {};
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.universalInit();
|
this.universalInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
universalInit() {
|
universalInit() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 22 KiB |
@@ -24,5 +24,7 @@
|
|||||||
},
|
},
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"buildOnSave": false,
|
"buildOnSave": false,
|
||||||
"atom": { "rewriteTsconfig": false }
|
"atom": {
|
||||||
|
"rewriteTsconfig": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -23,5 +23,7 @@
|
|||||||
},
|
},
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"buildOnSave": false,
|
"buildOnSave": false,
|
||||||
"atom": { "rewriteTsconfig": false }
|
"atom": {
|
||||||
|
"rewriteTsconfig": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
105
tslint.json
105
tslint.json
@@ -3,101 +3,18 @@
|
|||||||
"node_modules/codelyzer"
|
"node_modules/codelyzer"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"class-name": true,
|
"directive-selector": [
|
||||||
"comment-format": [
|
|
||||||
true,
|
true,
|
||||||
"check-space"
|
"attribute",
|
||||||
|
"ds",
|
||||||
|
"camelCase"
|
||||||
],
|
],
|
||||||
"curly": true,
|
"component-selector": [
|
||||||
"eofline": true,
|
|
||||||
"forin": true,
|
|
||||||
"indent": [
|
|
||||||
true,
|
true,
|
||||||
"spaces"
|
"element",
|
||||||
|
"ds",
|
||||||
|
"kebab-case"
|
||||||
],
|
],
|
||||||
"label-position": true,
|
|
||||||
"label-undefined": true,
|
|
||||||
"max-line-length": [
|
|
||||||
true,
|
|
||||||
140
|
|
||||||
],
|
|
||||||
"member-access": false,
|
|
||||||
"member-ordering": [
|
|
||||||
true,
|
|
||||||
"static-before-instance",
|
|
||||||
"variables-before-functions"
|
|
||||||
],
|
|
||||||
"no-arg": true,
|
|
||||||
"no-bitwise": true,
|
|
||||||
"no-console": [
|
|
||||||
true,
|
|
||||||
"debug",
|
|
||||||
"info",
|
|
||||||
"time",
|
|
||||||
"timeEnd",
|
|
||||||
"trace"
|
|
||||||
],
|
|
||||||
"no-construct": true,
|
|
||||||
"no-debugger": true,
|
|
||||||
"no-duplicate-key": true,
|
|
||||||
"no-duplicate-variable": true,
|
|
||||||
"no-empty": false,
|
|
||||||
"no-eval": true,
|
|
||||||
"no-inferrable-types": true,
|
|
||||||
"no-shadowed-variable": true,
|
|
||||||
"no-string-literal": false,
|
|
||||||
"no-switch-case-fall-through": true,
|
|
||||||
"no-trailing-whitespace": true,
|
|
||||||
"no-unused-expression": true,
|
|
||||||
"no-unused-variable": true,
|
|
||||||
"no-unreachable": true,
|
|
||||||
"no-use-before-declare": true,
|
|
||||||
"no-var-keyword": true,
|
|
||||||
"object-literal-sort-keys": false,
|
|
||||||
"one-line": [
|
|
||||||
true,
|
|
||||||
"check-open-brace",
|
|
||||||
"check-catch",
|
|
||||||
"check-else",
|
|
||||||
"check-whitespace"
|
|
||||||
],
|
|
||||||
"quotemark": [
|
|
||||||
true,
|
|
||||||
"single"
|
|
||||||
],
|
|
||||||
"radix": true,
|
|
||||||
"semicolon": [
|
|
||||||
"always"
|
|
||||||
],
|
|
||||||
"triple-equals": [
|
|
||||||
true,
|
|
||||||
"allow-null-check"
|
|
||||||
],
|
|
||||||
"typedef-whitespace": [
|
|
||||||
true,
|
|
||||||
{
|
|
||||||
"call-signature": "nospace",
|
|
||||||
"index-signature": "nospace",
|
|
||||||
"parameter": "nospace",
|
|
||||||
"property-declaration": "nospace",
|
|
||||||
"variable-declaration": "nospace"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"variable-name": false,
|
|
||||||
"whitespace": [
|
|
||||||
true,
|
|
||||||
"check-branch",
|
|
||||||
"check-decl",
|
|
||||||
"check-operator",
|
|
||||||
"check-separator",
|
|
||||||
"check-type"
|
|
||||||
],
|
|
||||||
"directive-selector-prefix": [true, "ds"],
|
|
||||||
"component-selector-prefix": [true, "ds"],
|
|
||||||
"directive-selector-name": [true, "camelCase"],
|
|
||||||
"component-selector-name": [true, "kebab-case"],
|
|
||||||
"directive-selector-type": [true, "attribute"],
|
|
||||||
"component-selector-type": [true, "element"],
|
|
||||||
"use-input-property-decorator": true,
|
"use-input-property-decorator": true,
|
||||||
"use-output-property-decorator": true,
|
"use-output-property-decorator": true,
|
||||||
"use-host-property-decorator": true,
|
"use-host-property-decorator": true,
|
||||||
@@ -107,7 +24,11 @@
|
|||||||
"no-forward-ref": true,
|
"no-forward-ref": true,
|
||||||
"use-life-cycle-interface": true,
|
"use-life-cycle-interface": true,
|
||||||
"use-pipe-transform-interface": true,
|
"use-pipe-transform-interface": true,
|
||||||
"pipe-naming": [true, "camelCase", "ds"],
|
"pipe-naming": [
|
||||||
|
true,
|
||||||
|
"camelCase",
|
||||||
|
"ds"
|
||||||
|
],
|
||||||
"component-class-suffix": true,
|
"component-class-suffix": true,
|
||||||
"directive-class-suffix": true,
|
"directive-class-suffix": true,
|
||||||
"import-destructuring-spacing": true,
|
"import-destructuring-spacing": true,
|
||||||
|
@@ -27,7 +27,12 @@ export var commonPlugins = [
|
|||||||
|
|
||||||
// Loader options
|
// Loader options
|
||||||
new webpack.LoaderOptionsPlugin({
|
new webpack.LoaderOptionsPlugin({
|
||||||
|
options: {
|
||||||
|
tslint: {
|
||||||
|
emitErrors: false,
|
||||||
|
failOnHint: false
|
||||||
|
},
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
];
|
];
|
||||||
@@ -49,8 +54,13 @@ export var commonConfig = {
|
|||||||
{ test: /\.ts$/, use: ['awesome-typescript-loader', 'angular2-template-loader'] },
|
{ test: /\.ts$/, use: ['awesome-typescript-loader', 'angular2-template-loader'] },
|
||||||
{ test: /\.html$/, use: 'raw-loader' },
|
{ test: /\.html$/, use: 'raw-loader' },
|
||||||
{ test: /\.css$/, use: 'raw-loader' },
|
{ test: /\.css$/, use: 'raw-loader' },
|
||||||
{ test: /\.scss$/, use: ['raw-loader', 'sass-loader'] },
|
{ test: /\.json$/, use: 'json-loader' },
|
||||||
{ test: /\.json$/, use: 'json-loader' }
|
{
|
||||||
|
enforce: 'pre',
|
||||||
|
test: /\.ts?$/,
|
||||||
|
use: 'tslint-loader',
|
||||||
|
exclude: /(node_modules)/,
|
||||||
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
Reference in New Issue
Block a user