Socket
Book a DemoInstallSign in
Socket

tslint-lines-between-class-members

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tslint-lines-between-class-members - npm Package Compare versions

Comparing version

to
1.3.5

CONTRIBUTING.md

15

package.json
{
"name": "tslint-lines-between-class-members",
"version": "1.3.4",
"version": "1.3.5",
"description": "Custom rule for TSLint to enforce blank lines between class methods - achieves a similar thing to lines-between-class-members in ESLint",
"scripts": {
"compile": "tsc",
"prepublish": "npm run compile",
"postinstall": "cd ./integration && yarn",
"lint": "tslint --config tslint.json --exclude node_modules **/*.ts",
"test": "ava-ts src/**/test/**/*.spec.ts --verbose",
"test:watch": "npm test -- --watch"
"test:watch": "concurrently \"yarn test --watch\" \"yarn compile:watch\" -n \"ava,tsc\" -p -c \"magenta,blue\"",
"compile": "tsc",
"compile:watch": "tsc --watch",
"prepublish": "yarn compile"
},

@@ -27,7 +29,8 @@ "keywords": [

"ava-ts": "^0.24.3",
"concurrently": "^4.1.0",
"temp-dir": "^1.0.0",
"ts-node": "^6.0.0",
"typescript": "3.4.5",
"tslint": "5.15.0"
"tslint": "5.15.0",
"typescript": "3.4.5"
}
}

2

src/utils.ts

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

const prevLine = getPrevLinesText(node, sourceFile);
return prevLine.trim() === '{';
return /^((\s*{\s*)|([\w\s,<]*\>\s*{\s*))$/.test(prevLine);
};

@@ -22,0 +22,0 @@

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

var prevLine = exports.getPrevLinesText(node, sourceFile);
return prevLine.trim() === '{';
return /^((\s*{\s*)|([\w\s,<]*\>\s*{\s*))$/.test(prevLine);
};

@@ -23,0 +23,0 @@ /**

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.