Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Add support for tslint version to 5.1.0 #367

Closed
wants to merge 3 commits into from
Closed

Add support for tslint version to 5.1.0 #367

wants to merge 3 commits into from

Conversation

bgold09
Copy link
Member

@bgold09 bgold09 commented May 4, 2017

resolves #354

  • 'no-cookies' now explicitly require type checking (extends
    Lint.Rules.TypedRule)
  • The following rules now optionally require type checking (extend
    from Lint.Rules.OptionallyTypedRule):
    • no-string-based-set-immediate
    • no-string-based-set-interval
    • no-string-based-set-timeout
  • 'no-single-line-block-comment' no longer supports nested single
    line comments
  • Removed 'no-unused-imports' in favor of the TSLint implementation
  • The default severity for TSLint is now error; fixing easy violations that
    were exposed by that change
  • Add extended metadata for new rules provided by TSLint
  • Remove deprecated rule 'no-unused-imports'
  • Remove deprecated rule no-sparse-arrays (fixes remove no-sparse-arrays rule #364)

  * 'no-cookies' now explicitly require type checking (extends
     Lint.Rules.TypedRule)
  * The following rules now optionally require type checking (extend
    from Lint.Rules.OptionallyTypedRule):
      * no-string-based-set-immediate
      * no-string-based-set-interval
      * no-string-based-set-timeout
  * 'no-single-line-block-comment' no longer supports nested single
    line comments
  * Removed 'no-unused-imports' in favor of the TSLint implementation
  * The default severity for TSLint is now error; fixing easy violations that
    were exposed by that change
  * Add extended metadata for new rules provided by TSLint
@@ -27,7 +27,7 @@ export class Rule extends Lint.Rules.AbstractRule {
public static FAILURE_STRING_FACTORY(initializer: string, expression: string): string {
//tslint:disable-next-line:max-line-length
return `Do not use the 'for in' statement: 'for (${initializer} in ${expression})'. If this is an object, use 'Object.keys' instead. If this is an array use a standard 'for' loop instead.`;
};
}
Copy link
Member

Choose a reason for hiding this comment

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

I see that tslint still has a bug in their unnecessary-semicolon rule

@@ -46,9 +46,8 @@ class NoInvalidRegexpRuleWalker extends ErrorTolerantWalker {
if (arg1.kind === ts.SyntaxKind.StringLiteral) {
const regexpText: string = (<ts.StringLiteral>arg1).text;
try {
/* tslint:disable:no-unused-new */
// tslint:disable-next-line:no-unused-expression
Copy link
Member

Choose a reason for hiding this comment

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

+1

@HamletDRC HamletDRC changed the title Bump dependent tslint version to 5.1.0 Add support for tslint version to 5.1.0 May 5, 2017
@HamletDRC
Copy link
Member

This all looks good and I ran it on MSE and there were no issues or false positives (however, we are not doing "full program" scanning)

@HamletDRC
Copy link
Member

HamletDRC commented May 5, 2017

If I upgrade to TypeScript 2.3 then some tests fail though :(
BUt this is outside the scope of this PR

@HamletDRC HamletDRC added this to the 4.0.2 milestone May 5, 2017
@HamletDRC HamletDRC closed this May 5, 2017
@HamletDRC
Copy link
Member

Pushed and closed!

@sapegin
Copy link
Contributor

sapegin commented May 9, 2017

@HamletDRC Could you please publish 5.0.0 to npm?

@HamletDRC
Copy link
Member

@sapegin I started the process now, thanks.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove no-sparse-arrays rule tslint 5.0.0 contains custom rule breaking changes
4 participants