Skip to content

feat(@angular/cli): extend tslnit config from recommended #6507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -37,26 +37,24 @@
/** 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';


/**
* 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
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/@angular/cli/blueprints/ng/files/__path__/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
90 changes: 22 additions & 68 deletions packages/@angular/cli/blueprints/ng/files/tslint.json
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -40,8 +27,6 @@
]
}
],
"no-arg": true,
"no-bitwise": true,
"no-console": [
true,
"debug",
Expand All @@ -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",
Expand All @@ -138,5 +89,8 @@
"no-access-missing-member": true,
"templates-use-public": true,
"invoke-injectable": true
}
},
"rulesDirectory": [
"node_modules/codelyzer"
]
}
1 change: 0 additions & 1 deletion tests/e2e/tests/lint/lint-with-type-check-fail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ function check(val: any, fxState: any) {
fxState.num = val + "";
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was fail Exceeds the 2 allowed consecutive blank lines which not fixed with lint --fix command.
We can change no-consecutive-blank-lines to 3, if we want to avoid this change.

`;

return Promise.resolve()
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/tests/lint/lint-with-type-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ function check(val: any, fxState: any) {
fxState.num = val + "";
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was fail Exceeds the 2 allowed consecutive blank lines which not fixed with lint --fix command.
We can change no-consecutive-blank-lines to 3, if we want to avoid this change.

`;

return Promise.resolve()
Expand Down