mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 11:03:53 +08:00
fix(@schematics/angular): remove leftover workspace tslint config
This commit is contained in:
parent
6916bc912b
commit
09daf7a7e0
@ -1,140 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "tslint:recommended",
|
|
||||||
"rulesDirectory": [
|
|
||||||
"codelyzer"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"align": {
|
|
||||||
"options": [
|
|
||||||
"parameters",
|
|
||||||
"statements"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"array-type": false,
|
|
||||||
"arrow-return-shorthand": true,
|
|
||||||
"curly": true,
|
|
||||||
"deprecation": {
|
|
||||||
"severity": "warning"
|
|
||||||
},
|
|
||||||
"eofline": true,
|
|
||||||
"import-blacklist": [
|
|
||||||
true,
|
|
||||||
"rxjs/Rx"
|
|
||||||
],
|
|
||||||
"import-spacing": true,
|
|
||||||
"indent": {
|
|
||||||
"options": [
|
|
||||||
"spaces"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"max-classes-per-file": false,
|
|
||||||
"max-line-length": [
|
|
||||||
true,
|
|
||||||
140
|
|
||||||
],
|
|
||||||
"member-ordering": [
|
|
||||||
true,
|
|
||||||
{
|
|
||||||
"order": [
|
|
||||||
"static-field",
|
|
||||||
"instance-field",
|
|
||||||
"static-method",
|
|
||||||
"instance-method"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"no-console": [
|
|
||||||
true,
|
|
||||||
"debug",
|
|
||||||
"info",
|
|
||||||
"time",
|
|
||||||
"timeEnd",
|
|
||||||
"trace"
|
|
||||||
],
|
|
||||||
"no-empty": false,
|
|
||||||
"no-inferrable-types": [
|
|
||||||
true,
|
|
||||||
"ignore-params"
|
|
||||||
],
|
|
||||||
"no-non-null-assertion": true,
|
|
||||||
"no-redundant-jsdoc": true,
|
|
||||||
"no-switch-case-fall-through": true,
|
|
||||||
"no-var-requires": false,
|
|
||||||
"object-literal-key-quotes": [
|
|
||||||
true,
|
|
||||||
"as-needed"
|
|
||||||
],
|
|
||||||
"quotemark": [
|
|
||||||
true,
|
|
||||||
"single"
|
|
||||||
],
|
|
||||||
"semicolon": {
|
|
||||||
"options": [
|
|
||||||
"always"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"space-before-function-paren": {
|
|
||||||
"options": {
|
|
||||||
"anonymous": "never",
|
|
||||||
"asyncArrow": "always",
|
|
||||||
"constructor": "never",
|
|
||||||
"method": "never",
|
|
||||||
"named": "never"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"typedef": [
|
|
||||||
true,
|
|
||||||
"call-signature"
|
|
||||||
],
|
|
||||||
"typedef-whitespace": {
|
|
||||||
"options": [
|
|
||||||
{
|
|
||||||
"call-signature": "nospace",
|
|
||||||
"index-signature": "nospace",
|
|
||||||
"parameter": "nospace",
|
|
||||||
"property-declaration": "nospace",
|
|
||||||
"variable-declaration": "nospace"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"call-signature": "onespace",
|
|
||||||
"index-signature": "onespace",
|
|
||||||
"parameter": "onespace",
|
|
||||||
"property-declaration": "onespace",
|
|
||||||
"variable-declaration": "onespace"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"variable-name": {
|
|
||||||
"options": [
|
|
||||||
"ban-keywords",
|
|
||||||
"check-format",
|
|
||||||
"allow-pascal-case"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"whitespace": {
|
|
||||||
"options": [
|
|
||||||
"check-branch",
|
|
||||||
"check-decl",
|
|
||||||
"check-operator",
|
|
||||||
"check-separator",
|
|
||||||
"check-type",
|
|
||||||
"check-typecast"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"component-class-suffix": true,
|
|
||||||
"contextual-lifecycle": true,
|
|
||||||
"directive-class-suffix": true,
|
|
||||||
"no-conflicting-lifecycle": true,
|
|
||||||
"no-host-metadata-property": true,
|
|
||||||
"no-input-rename": true,
|
|
||||||
"no-inputs-metadata-property": true,
|
|
||||||
"no-output-native": true,
|
|
||||||
"no-output-on-prefix": true,
|
|
||||||
"no-output-rename": true,
|
|
||||||
"no-outputs-metadata-property": true,
|
|
||||||
"template-banana-in-box": true,
|
|
||||||
"template-no-negated-async": true,
|
|
||||||
"use-lifecycle-interface": true,
|
|
||||||
"use-pipe-transform-interface": true
|
|
||||||
}
|
|
||||||
}
|
|
@ -20,10 +20,8 @@ import { Schema as WorkspaceOptions } from './schema';
|
|||||||
|
|
||||||
|
|
||||||
export default function (options: WorkspaceOptions): Rule {
|
export default function (options: WorkspaceOptions): Rule {
|
||||||
const minimalFilesRegExp = /(.editorconfig|tslint.json)\.template$/;
|
|
||||||
|
|
||||||
return mergeWith(apply(url('./files'), [
|
return mergeWith(apply(url('./files'), [
|
||||||
options.minimal ? filter(path => !minimalFilesRegExp.test(path)) : noop(),
|
options.minimal ? filter(path => !path.endsWith('editorconfig.template')) : noop(),
|
||||||
applyTemplates({
|
applyTemplates({
|
||||||
utils: strings,
|
utils: strings,
|
||||||
...options,
|
...options,
|
||||||
|
@ -33,7 +33,6 @@ describe('Workspace Schematic', () => {
|
|||||||
'/package.json',
|
'/package.json',
|
||||||
'/README.md',
|
'/README.md',
|
||||||
'/tsconfig.json',
|
'/tsconfig.json',
|
||||||
'/tslint.json',
|
|
||||||
]));
|
]));
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -69,7 +68,6 @@ describe('Workspace Schematic', () => {
|
|||||||
'/tsconfig.json',
|
'/tsconfig.json',
|
||||||
]));
|
]));
|
||||||
|
|
||||||
expect(files).not.toContain('/tslint.json');
|
|
||||||
expect(files).not.toContain('/.editorconfig');
|
expect(files).not.toContain('/.editorconfig');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ export default function() {
|
|||||||
.then(() => expectFileNotToExist('protractor.conf.js'))
|
.then(() => expectFileNotToExist('protractor.conf.js'))
|
||||||
.then(() => expectFileNotToExist('src/test.ts'))
|
.then(() => expectFileNotToExist('src/test.ts'))
|
||||||
.then(() => expectFileNotToExist('tsconfig.spec.json'))
|
.then(() => expectFileNotToExist('tsconfig.spec.json'))
|
||||||
.then(() => expectFileNotToExist('tslint.json'))
|
|
||||||
.then(() => expectFileNotToExist('src/app/app.component.html'))
|
.then(() => expectFileNotToExist('src/app/app.component.html'))
|
||||||
.then(() => expectFileNotToExist('src/app/app.component.css'))
|
.then(() => expectFileNotToExist('src/app/app.component.css'))
|
||||||
.then(() => expectFileNotToExist('src/app/app.component.spec.ts'))
|
.then(() => expectFileNotToExist('src/app/app.component.spec.ts'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user