New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fimbul/wotan

Package Overview
Dependencies
Maintainers
2
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fimbul/wotan - npm Package Compare versions

Comparing version 0.4.0-dev.20180301 to 0.4.0-dev.20180302

src/rules/await-only-promise.d.ts

2

package.json
{
"name": "@fimbul/wotan",
"version": "0.4.0-dev.20180301",
"version": "0.4.0-dev.20180302",
"description": "Pluggable TypeScript and JavaScript linter",

@@ -5,0 +5,0 @@ "bin": "bin/main.js",

@@ -46,4 +46,4 @@ # wotan

`await-async-result` | Warns about not using the result of a call to an async function inside async functions. *requires type information* | TSLint's `no-floating-promises` requires you to specify a list of Promise names, it checks outside of async functions and only requires you to register the `onrejected` callback.
`await-promise` | Finds uses of `await` on non-Promise values. Also checks `for await` loops. *requires type information* | Works for all `PromiseLike` and `Thenable` types out of the box without any configuration.
`generator-yield` | Require at least one `yield` inside generator functions. | There's no similar TSLint rule.
`await-only-promise` | Finds uses of `await` on non-Promise values. Also checks `for await` loops. *requires type information* | Works for all `PromiseLike` and `Thenable` types out of the box without any configuration.
`generator-require-yield` | Require at least one `yield` inside generator functions. | There's no similar TSLint rule.
`no-debugger` | Ban `debugger;` statements from your production code. | Performance!

@@ -87,3 +87,3 @@ `no-fallthrough` | Prevents unintentional fallthough in `switch` statements from one case to another. If the fallthrough is intended, add a comment that matches `/^\s*falls? ?through\b/i`. | Allows more comment variants such as `fallthrough` or `fall through`.

"no-useless-assertion": "off",
"await-promise": "warn"
"await-only-promise": "warn"
}

@@ -105,3 +105,3 @@ }

no-useless-assertion: off
await-promise: warn
await-only-promise: warn
- files: "*.spec.ts" # override the following rules for all *.spec.ts files in all directories

@@ -108,0 +108,0 @@ rules:

@@ -6,3 +6,3 @@ import { TypedRule } from '../types';

apply(): void;
private isSpreadableObject(node, i);
private isSpreadableObject(node);
}

@@ -33,7 +33,10 @@ "use strict";

}
isSpreadableObject(node, i) {
if (i === 0)
return true;
if (node.kind === ts.SyntaxKind.ThisKeyword || node.kind === ts.SyntaxKind.SpreadElement)
return false;
isSpreadableObject(node) {
switch (node.kind) {
case ts.SyntaxKind.ThisKeyword:
case ts.SyntaxKind.SpreadElement:
return false;
case ts.SyntaxKind.ObjectLiteralExpression:
return true;
}
const type = this.checker.getTypeAtLocation(node);

@@ -40,0 +43,0 @@ if (type.flags & ts.TypeFlags.Any)

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