Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
eslint-plugin-classes
Advanced tools
custom ESLint rule, checks class style. (will adding more rules for class)
should no space between method name and parens.
The following patterns are considered warnings:
class Foo {
bar () {
}
}
class Foo {
static bar () {
}
}
class Foo {
bar () {
}
buz() {
}
}
The following patterns are not warnings:
class Foo {
bar() {
}
}
class Foo {
static bar() {
}
}
class Foo {
bar() {
}
buz() {
}
}
The following patterns are considered warnings:
class foo {
}
class Foo {
Bar () {
}
}
The following patterns are not warnings:
class Foo {
}
class Foo {
bar () {
}
}
class should have constructor always even if empty body.
The following patterns are considered warnings:
class Foo {
}
class Foo {
bar() {
}
}
The following patterns are not warnings:
class Foo {
constructor() {
console.log('test');
}
}
class Foo {
constructor() {
}
bar() {
}
}
extended class should call super()
at the top of constructor.
The following patterns are considered warnings:
class Foo extends A {
bar() {
}
}
class Foo extends A {
constructor() {
this.bar();
}
bar() {
}
}
The following patterns are not warnings:
class Foo extends A {
constructor() {
super();
this.a = 10;
}
bar() {
}
}
class Foo extends A {
bar() {
}
constructor() {
super();
this.a = 10;
}
}
class Foo extends A {
constructor() {
// comments
super();
this.a = 10;
}
}
enforce order of definition of method in order of static method => constructor => instance methods.
The following patterns are considered warnings:
class Foo {
constructor() {}
static bar() {}
}
class Foo {
baz() {}
static bar() {}
constructor() {}
baz() {}
}
The following patterns are not warnings:
class Foo {
static bar() {}
static bal() {}
constructor() {}
baz() {}
biz() {}
bez() {}
}
plugins:
- classes
rules:
# Plugins
classes/space : 2
classes/name : [2, "class", "method"]
classes/constructor : 2
classes/super : 2
classes/style : 2
MIT
FAQs
custom ESLint rule, ckecks class style.
The npm package eslint-plugin-classes receives a total of 4,883 weekly downloads. As such, eslint-plugin-classes popularity was classified as popular.
We found that eslint-plugin-classes 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.