tslint-microsoft-contrib
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -32,9 +32,3 @@ "use strict"; | ||
var deletedObject = node.expression.getChildren()[1]; | ||
if (deletedObject.kind === SyntaxKind.current().ElementAccessExpression) { | ||
var deletedExpression = deletedObject.expression; | ||
if (deletedExpression.kind !== SyntaxKind.current().PropertyAccessExpression) { | ||
this.addNoDeleteFailure(deletedObject); | ||
} | ||
} | ||
else if (deletedObject.kind !== SyntaxKind.current().PropertyAccessExpression) { | ||
if (deletedObject != null && deletedObject.kind === SyntaxKind.current().Identifier) { | ||
this.addNoDeleteFailure(deletedObject); | ||
@@ -41,0 +35,0 @@ } |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -96,2 +96,5 @@ "use strict"; | ||
expression = statement.expression; | ||
if (expression == null) { | ||
return null; | ||
} | ||
} | ||
@@ -98,0 +101,0 @@ else { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "tslint-microsoft-contrib", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "TSLint Rules for Microsoft", | ||
@@ -27,3 +27,3 @@ "repository": { | ||
}, | ||
"main": ".", | ||
"main": "package.json", | ||
"keywords": [ | ||
@@ -30,0 +30,0 @@ "tslint", |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -11,3 +11,3 @@ [![npm version](https://badge.fury.io/js/tslint-microsoft-contrib.svg)](https://badge.fury.io/js/tslint-microsoft-contrib) | ||
Version 2.0.5 | ||
Version 2.0.6 | ||
------------- | ||
@@ -75,3 +75,3 @@ The project has been in use for at least several months on multiple projects. Please report any bugs or false positives you might find! | ||
`missing-jsdoc` | All files must have a top level [JSDoc](http://usejsdoc.org/) comment. A JSDoc comment starts with /** (not one more or one less asterisk) and a JSDoc at the 'top-level' appears without leading spaces. Trailing spaces are acceptable but not recommended. | 1.0 | ||
`missing-optional-annotation` | A parameter that follows one or more parameters marked as optional is not itself marked optional | 0.0.1 | ||
`missing-optional-annotation` | Deprecated - This rule is now enforced by the TypeScript compiler. A parameter that follows one or more parameters marked as optional is not itself marked optional | 0.0.1 | ||
`mocha-avoid-only` | Do not invoke Mocha's describe.only or it.only functions. These functions are useful ways to run a single unit test or a single test case during your build, but please be careful to not push these methods calls to your version control repositiory because it will turn off any of the other tests.| 1.0 | ||
@@ -88,4 +88,5 @@ `no-backbone-get-set-outside-model` | Avoid using model.get('x') and model.set('x', value) Backbone accessors outside of the owning model. This breaks type safety and you should define getters and setters for your attributes instead.| 1.0 | ||
`no-duplicate-case` | Do not use duplicate case labels in switch statements. Similar to the [ESLint no-duplicate-case](http://eslint.org/docs/rules/no-duplicate-case.html) rule | 1.0 | ||
`no-duplicate-parameter-names` | Do not write functions or methods with duplicate parameter names | 0.0.1 | ||
`no-duplicate-parameter-names` | Deprecated - This rule is now enforced by the TypeScript compiler. Do not write functions or methods with duplicate parameter names | 0.0.1 | ||
`no-empty-interfaces` | Do not use empty interfaces. They are compile-time only artifacts and they serve no useful purpose | 1.0 | ||
`no-empty-line-after-opening-brace` | Avoid an empty line after an opening brace. | 2.0.6 | ||
`no-exec-script` | Do not use the execScript functions | 0.0.1 | ||
@@ -119,2 +120,3 @@ `no-for-in` | Avoid use of for-in statements. They can be replaced by Object.keys | 1.0 | ||
`prefer-array-literal` | Use array literal syntax when declaring or instantiating array types. For example, prefer the Javascript form of string[] to the TypeScript form Array<string>. Prefer '[]' to 'new Array()'. Prefer '[4, 5]' to 'new Array(4, 5)'. Prefer '[undefined, undefined]' to 'new Array(4)'. | 1.0 | ||
`prefer-const` | Use `const` to declare variables if they are only assigned a value once. | 2.0.6 | ||
`prefer-type-cast` | Prefer the tradition type casts instead of the new 'as-cast' syntax. For example, prefer '<string>myVariable' instead of 'myVariable as string'. Rule ignores any file ending in .tsx. If you prefer the opposite and want to see the 'as type' casts, then enable the tslint rule named 'no-angle-bracket-type-assertion'| 2.0.4 | ||
@@ -121,0 +123,0 @@ `promise-must-complete` | When a Promise instance is created, then either the reject() or resolve() parameter must be called on it within all code branches in the scope. For more examples see the [feature request](https://github.com/Microsoft/tslint-microsoft-contrib/issues/34). | 1.0 |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -103,2 +103,44 @@ "use strict"; | ||
AstUtils.isStatic = isStatic; | ||
function isBindingPattern(node) { | ||
return node != null && (node.kind === SyntaxKind.current().ArrayBindingPattern || | ||
node.kind === SyntaxKind.current().ObjectBindingPattern); | ||
} | ||
function walkUpBindingElementsAndPatterns(node) { | ||
while (node && (node.kind === SyntaxKind.current().BindingElement || isBindingPattern(node))) { | ||
node = node.parent; | ||
} | ||
return node; | ||
} | ||
function getCombinedNodeFlags(node) { | ||
node = walkUpBindingElementsAndPatterns(node); | ||
var flags = node.flags; | ||
if (node.kind === SyntaxKind.current().VariableDeclaration) { | ||
node = node.parent; | ||
} | ||
if (node && node.kind === SyntaxKind.current().VariableDeclarationList) { | ||
flags |= node.flags; | ||
node = node.parent; | ||
} | ||
if (node && node.kind === SyntaxKind.current().VariableStatement) { | ||
flags |= node.flags; | ||
} | ||
return flags; | ||
} | ||
function isLet(node) { | ||
return !!(getCombinedNodeFlags(node) & ts.NodeFlags.Let); | ||
} | ||
AstUtils.isLet = isLet; | ||
function isExported(node) { | ||
return !!(getCombinedNodeFlags(node) & ts.NodeFlags.Export); | ||
} | ||
AstUtils.isExported = isExported; | ||
function isAssignmentOperator(token) { | ||
return token >= SyntaxKind.current().FirstAssignment && token <= SyntaxKind.current().LastAssignment; | ||
} | ||
AstUtils.isAssignmentOperator = isAssignmentOperator; | ||
function isBindingLiteralExpression(node) { | ||
return (!!node) && | ||
(node.kind === SyntaxKind.current().ObjectLiteralExpression || node.kind === SyntaxKind.current().ArrayLiteralExpression); | ||
} | ||
AstUtils.isBindingLiteralExpression = isBindingLiteralExpression; | ||
function findParentBlock(child) { | ||
@@ -105,0 +147,0 @@ var parent = child.parent; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
237637
66
5285
157