Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fimbul/mimir

Package Overview
Dependencies
Maintainers
2
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fimbul/mimir - npm Package Compare versions

Comparing version 0.5.0-dev.20180311 to 0.5.0-dev.20180313

src/rules/no-useless-predicate.d.ts

2

package.json
{
"name": "@fimbul/mimir",
"version": "0.5.0-dev.20180311",
"version": "0.5.0-dev.20180313",
"description": "Core rules of the Fimbullinter project",

@@ -5,0 +5,0 @@ "main": "recommended.yaml",

@@ -38,2 +38,3 @@ # Mímir

`no-useless-initializer` | Detects unnecessary initialization with `undefined`. | TSLint's rule `no-unnecessary-initializer` doesn't fix all parameter initializers and gives false positives for destructuring.
`no-useless-predicate` | Detects redundant conditions that are either always true or always false. *requires type information* | Combination of TSLint's `strict-type-predicates`, `typeof-compare` and parts of `strict-boolean-expressions`.
`prefer-dot-notation` | Prefer `obj.foo` over `obj['foo']` where possible. | Same as TSLint's `no-string-literal` rule, but more performant.

@@ -40,0 +41,0 @@ `prefer-number-isnan` | Prefer ES2015's `Number.isNaN` over the global `isNaN` mainly for performance. *requires type information* | No similar rule in TSLint.

@@ -9,3 +9,4 @@ import * as ts from 'typescript';

private visitNode(wrap);
private shouldFail();
private fail({asteriskToken, name});
}

@@ -22,3 +22,3 @@ "use strict";

wrap.children.forEach(this.visitNode, this);
if (!this.containsYield)
if (this.shouldFail())
this.fail(wrap.node.parent);

@@ -47,2 +47,5 @@ wrap = wrap.skip;

}
shouldFail() {
return !this.containsYield;
}
fail({ asteriskToken, name }) {

@@ -49,0 +52,0 @@ this.addFailure(asteriskToken.end - 1, asteriskToken.end, `Generator ${name === undefined ? '' : `'${name.getText(this.sourceFile).replace(/'/g, "\\'")}' `}contains no 'yield'.`);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc