
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@n4bb12/config-tslint
Advanced tools
TSLint configuration focusing on productivity and readability.
yarn add --dev @n4bb12/config-tslint
Add the following to your TSLint config:
{
"extends": "@n4bb12/config-tslint"
}
If the mere goal is consistency, any randomly chosen ruleset is equally good.
From a productivity and readability standpoint, however, different rule configurations can have varyling levels of potential positive and negative impact.
trailing-comma
{ "multiline": "always", "singleline": "never" }
semicolon
"never"
console.log()
events.subscribe(e => console.log(e)/* no disturbing semicolon here */)
quotemark
"double"
linebreak-style
["LF"]
LF
works well on all platforms.CRLF
in bash scripts will fail on non-Windows systems.max-line-length
[80]
object-literal-key-quotes
"consistent-as-needed"
eofline
true
Ctrl + End
, the page in most cases only scrolls vertically.indent
["spaces", 2]
interface-name
"never-prefix"
I
prefix is commonly used on interfaces.class
, interface
and type
are often intersected or exchanged, depending on what needs to be achieved, so type names would need to be changed quite often, when they are prefixed with C
, I
or T
.FAQs
Shareable TSLint configuration for my projects
The npm package @n4bb12/config-tslint receives a total of 8 weekly downloads. As such, @n4bb12/config-tslint popularity was classified as not popular.
We found that @n4bb12/config-tslint 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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.