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

eslint-plugin-microsoft-typescript

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-microsoft-typescript - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

19

dist/rules/no-type-assertion-whitespace.js

@@ -16,19 +16,18 @@ "use strict";

schema: [],
type: 'suggestion',
type: 'problem',
},
defaultOptions: [],
create: function (context) {
var sourceCode = context.getSourceCode();
var checkTypeAssertionWhitespace = function (node) {
var leftSideWhitespaceStart = node.typeAnnotation.range[1] + 1;
var rightSideWhitespaceEnd = node.expression.range[0];
var startLine = node.loc.start.line;
var endLine = node.loc.end.line;
if (leftSideWhitespaceStart !== rightSideWhitespaceEnd) {
var leftToken = sourceCode.getLastToken(node.typeAnnotation);
var rightToken = sourceCode.getFirstToken(node.expression);
if (!leftToken || !rightToken) {
return;
}
if (sourceCode.isSpaceBetweenTokens(leftToken, rightToken)) {
context.report({
messageId: 'noTypeAssertionWhitespace',
node: node,
loc: {
start: { column: leftSideWhitespaceStart, line: startLine },
end: { column: rightSideWhitespaceEnd, line: endLine },
},
loc: { column: leftToken.loc.end.column + 1, line: leftToken.loc.end.line },
});

@@ -35,0 +34,0 @@ }

{
"name": "eslint-plugin-microsoft-typescript",
"version": "0.1.5",
"version": "0.1.6",
"description": "ESlint rules for TypeScript",

@@ -5,0 +5,0 @@ "keywords": [

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