diff --git a/packages/@angular/cli/blueprints/ng/files/__path__/polyfills.ts b/packages/@angular/cli/blueprints/ng/files/__path__/polyfills.ts index 7831e97b79a4..0a57669a5a06 100644 --- a/packages/@angular/cli/blueprints/ng/files/__path__/polyfills.ts +++ b/packages/@angular/cli/blueprints/ng/files/__path__/polyfills.ts @@ -18,7 +18,7 @@ * BROWSER POLYFILLS */ -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ +/** IE9, IE10 and IE11 requires all of the following polyfills. */ // import 'core-js/es6/symbol'; // import 'core-js/es6/object'; // import 'core-js/es6/function'; @@ -37,7 +37,7 @@ /** IE10 and IE11 requires the following for NgClass support on SVG elements */ // import 'classlist.js'; // Run `npm install --save classlist.js`. -/** Evergreen browsers require these. **/ +/** Evergreen browsers require these. */ import 'core-js/es6/reflect'; import 'core-js/es7/reflect'; @@ -45,18 +45,16 @@ import 'core-js/es7/reflect'; /** * Required to support Web Animations `@angular/animation`. * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation - **/ + */ // import 'web-animations-js'; // Run `npm install --save web-animations-js`. - /*************************************************************************************************** * Zone JS is required by Angular itself. */ import 'zone.js/dist/zone'; // Included with Angular CLI. - /*************************************************************************************************** * APPLICATION IMPORTS */ diff --git a/packages/@angular/cli/blueprints/ng/files/__path__/test.ts b/packages/@angular/cli/blueprints/ng/files/__path__/test.ts index cd612eeb0e2f..9b76aa98defe 100644 --- a/packages/@angular/cli/blueprints/ng/files/__path__/test.ts +++ b/packages/@angular/cli/blueprints/ng/files/__path__/test.ts @@ -17,7 +17,7 @@ declare const __karma__: any; declare const require: any; // Prevent Karma from running prematurely. -__karma__.loaded = function () {}; +__karma__.loaded = () => { }; // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( diff --git a/packages/@angular/cli/blueprints/ng/files/tslint.json b/packages/@angular/cli/blueprints/ng/files/tslint.json index 34f59facc5e5..e757fdca5179 100644 --- a/packages/@angular/cli/blueprints/ng/files/tslint.json +++ b/packages/@angular/cli/blueprints/ng/files/tslint.json @@ -1,29 +1,16 @@ { - "rulesDirectory": [ - "node_modules/codelyzer" + "extends": [ + "tslint:recommended" ], "rules": { - "arrow-return-shorthand": true, - "callable-types": true, - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "curly": true, - "eofline": true, - "forin": true, "import-blacklist": [ true, "rxjs" ], - "import-spacing": true, - "indent": [ + "interface-name": [ true, - "spaces" + "never-prefix" ], - "interface-over-type-literal": true, - "label-position": true, "max-line-length": [ true, 140 @@ -40,8 +27,6 @@ ] } ], - "no-arg": true, - "no-bitwise": true, "no-console": [ true, "debug", @@ -50,70 +35,36 @@ "timeEnd", "trace" ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-super": true, + "no-consecutive-blank-lines": [ + true, + 2 + ], "no-empty": false, - "no-empty-interface": true, - "no-eval": true, "no-inferrable-types": [ true, "ignore-params" ], - "no-misused-new": true, "no-non-null-assertion": true, - "no-shadowed-variable": true, "no-string-literal": false, - "no-string-throw": true, "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unnecessary-initializer": true, - "no-unused-expression": true, + "no-trailing-whitespace": [ + true, + "ignore-template-strings" + ], "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" + "ordered-imports": [ + false ], - "prefer-const": true, "quotemark": [ true, - "single" - ], - "radix": true, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" + "single", + "avoid-escape" ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } + "trailing-comma": [ + false ], - "typeof-compare": true, - "unified-signatures": true, "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ], "directive-selector": [ true, "attribute", @@ -138,5 +89,8 @@ "no-access-missing-member": true, "templates-use-public": true, "invoke-injectable": true - } + }, + "rulesDirectory": [ + "node_modules/codelyzer" + ] } diff --git a/tests/e2e/tests/lint/lint-with-type-check-fail.ts b/tests/e2e/tests/lint/lint-with-type-check-fail.ts index ce8437d018cc..8fb59df8d44a 100644 --- a/tests/e2e/tests/lint/lint-with-type-check-fail.ts +++ b/tests/e2e/tests/lint/lint-with-type-check-fail.ts @@ -36,7 +36,6 @@ function check(val: any, fxState: any) { fxState.num = val + ""; } } - `; return Promise.resolve() diff --git a/tests/e2e/tests/lint/lint-with-type-check.ts b/tests/e2e/tests/lint/lint-with-type-check.ts index 59b8642cf6f8..164b2473b84c 100644 --- a/tests/e2e/tests/lint/lint-with-type-check.ts +++ b/tests/e2e/tests/lint/lint-with-type-check.ts @@ -35,7 +35,6 @@ function check(val: any, fxState: any) { fxState.num = val + ""; } } - `; return Promise.resolve()