Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
tslint-lines-between-class-members
Advanced tools
Custom rule for TSLint to enforce blank lines between class methods - achieves a similar thing to lines-between-class-members in ESLint
Custom rule for TSLint to enforce blank lines between class methods - achieves a similar thing to lines-between-class-members in ESLint
# yarn
yarn add --dev tslint-lines-between-class-members
# npm
npm install --save-dev tslint-lines-between-class-members
Update your tslint.json
config file, adding the new rules directory and the new rule
You can choose to specify the exact number of lines you want between methods, or leave it to default to just checking there is at least 1
{
"rulesDirectory": [
"node_modules/tslint-lines-between-class-members"
],
"rules": {
"lines-between-class-members": true,
}
}
At least one line:
"lines-between-class-members": true
Exactly one line:
"lines-between-class-members": [true, 1]
Exactly twenty two lines:
"lines-between-class-members": [true, 22]
FAQs
Custom rule for TSLint to enforce blank lines between class methods - achieves a similar thing to lines-between-class-members in ESLint
The npm package tslint-lines-between-class-members receives a total of 2,272 weekly downloads. As such, tslint-lines-between-class-members popularity was classified as popular.
We found that tslint-lines-between-class-members demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.