Skip to content
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

build: max-line-length check not catching all cases #17570

Merged
merged 1 commit into from Nov 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 16 additions & 5 deletions src/material-examples/cdk-experimental/popover-edit/module.ts
Expand Up @@ -3,11 +3,22 @@ import {CdkTableModule} from '@angular/cdk/table';
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {CdkPopoverEditCdkTableFlexExample} from './cdk-popover-edit-cdk-table-flex/cdk-popover-edit-cdk-table-flex-example';
import {CdkPopoverEditCdkTableExample} from './cdk-popover-edit-cdk-table/cdk-popover-edit-cdk-table-example';
import {CdkPopoverEditCellSpanVanillaTableExample} from './cdk-popover-edit-cell-span-vanilla-table/cdk-popover-edit-cell-span-vanilla-table-example';
import {CdkPopoverEditTabOutVanillaTableExample} from './cdk-popover-edit-tab-out-vanilla-table/cdk-popover-edit-tab-out-vanilla-table-example';
import {CdkPopoverEditVanillaTableExample} from './cdk-popover-edit-vanilla-table/cdk-popover-edit-vanilla-table-example';
import {
CdkPopoverEditCdkTableFlexExample
} from './cdk-popover-edit-cdk-table-flex/cdk-popover-edit-cdk-table-flex-example';
import {
CdkPopoverEditCdkTableExample
} from './cdk-popover-edit-cdk-table/cdk-popover-edit-cdk-table-example';
import {
CdkPopoverEditCellSpanVanillaTableExample
// tslint:disable-next-line:max-line-length
} from './cdk-popover-edit-cell-span-vanilla-table/cdk-popover-edit-cell-span-vanilla-table-example';
import {
CdkPopoverEditTabOutVanillaTableExample
} from './cdk-popover-edit-tab-out-vanilla-table/cdk-popover-edit-tab-out-vanilla-table-example';
import {
CdkPopoverEditVanillaTableExample
} from './cdk-popover-edit-vanilla-table/cdk-popover-edit-vanilla-table-example';

export {
CdkPopoverEditCdkTableFlexExample,
Expand Down
20 changes: 15 additions & 5 deletions src/material-experimental/select/testing/shared.spec.ts
Expand Up @@ -47,7 +47,9 @@ export function runHarnessTests(
});

it('should be able to check whether a select is in multi-selection mode', async () => {
const singleSelection = await loader.getHarness(selectHarness.with({selector: '#single-selection'}));
const singleSelection = await loader.getHarness(selectHarness.with({
selector: '#single-selection'
}));
const multipleSelection =
await loader.getHarness(selectHarness.with({selector: '#multiple-selection'}));

Expand All @@ -56,7 +58,9 @@ export function runHarnessTests(
});

it('should get disabled state', async () => {
const singleSelection = await loader.getHarness(selectHarness.with({selector: '#single-selection'}));
const singleSelection = await loader.getHarness(selectHarness.with({
selector: '#single-selection'
}));
const multipleSelection =
await loader.getHarness(selectHarness.with({selector: '#multiple-selection'}));

Expand All @@ -71,7 +75,9 @@ export function runHarnessTests(
});

it('should get required state', async () => {
const singleSelection = await loader.getHarness(selectHarness.with({selector: '#single-selection'}));
const singleSelection = await loader.getHarness(selectHarness.with({
selector: '#single-selection'
}));
const multipleSelection =
await loader.getHarness(selectHarness.with({selector: '#multiple-selection'}));

Expand All @@ -86,8 +92,12 @@ export function runHarnessTests(
});

it('should get valid state', async () => {
const singleSelection = await loader.getHarness(selectHarness.with({selector: '#single-selection'}));
const withFormControl = await loader.getHarness(selectHarness.with({selector: '#with-form-control'}));
const singleSelection = await loader.getHarness(selectHarness.with({
selector: '#single-selection'
}));
const withFormControl = await loader.getHarness(selectHarness.with({
selector: '#with-form-control'
}));

expect(await singleSelection.isValid()).toBe(true);
expect(await withFormControl.isValid()).toBe(false);
Expand Down
4 changes: 2 additions & 2 deletions tools/release/base-release-task.ts
Expand Up @@ -57,8 +57,8 @@ export class BaseReleaseTask {

// Check if the current branch is in sync with the remote branch.
if (upstreamCommitSha !== localCommitSha) {
console.error(chalk.red(` ✘ The current branch is not in sync with the remote branch. Please ` +
`make sure your local branch "${chalk.italic(publishBranch)}" is up to date.`));
console.error(chalk.red(` ✘ The current branch is not in sync with the remote branch. ` +
`Please make sure your local branch "${chalk.italic(publishBranch)}" is up to date.`));
process.exit(1);
}
}
Expand Down
7 changes: 6 additions & 1 deletion tslint.json
Expand Up @@ -5,7 +5,12 @@
"node_modules/codelyzer"
],
"rules": {
"max-line-length": [true, 100],
"max-line-length": [true, {
"limit": 100,
"check-strings": true,
"check-regex": true
}
],
// Disable this flag because of SHA tslint#48b0c597f9257712c7d1f04b55ed0aa60e333f6a
// TSLint now shows warnings if types for properties are inferred. This rule needs to be
// disabled because all properties need to have explicit types set to work for Dgeni.
Expand Down