
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
eslint-plugin-no-dupe-class-fields
Advanced tools
ESLint rule to detect when a class has duplicate properties and methods.
This project is an ESLint plugin which detects when classes have duplicate fields, including methods and properties.
class Foo {
bar = 5;
bar() {
console.log('hello');
}
}
let foo = new Foo();
foo.bar(); // Error because bar is 5. Whoops
This plugin will detect if there are multiple methods or properties with the same name on a single class. This plugin is an upgraded version of the built-in no-dupe-class-members rule, which does not detect class properties. When you use this plugin's recommended config, the built-in no-dupe-class-members rule will be disabled.
Class properties are currently an ECMAScript proposal, and are only supported with a babel plugin. ESLint does not support class properties by default, so you must currently use the babel-eslint parser with ESLint for this plugin to detect class properties.
npm install --save-dev babel-eslint eslint-plugin-no-dupe-class-fields or yarn add --dev babel-eslint eslint-plugin-no-dupe-class-fields.parser property to babel-eslint.plugin:no-dupe-class-fields/recommended to the ESLint config's extends list.Example:
{
"root": true,
"parser": "babel-eslint",
"env": {
"node": true,
"es6": true
},
"extends": ["eslint:recommended", "plugin:no-dupe-class-fields/recommended"],
"plugins": [],
"rules": {
"indent": ["error", 2]
}
}
1.0.0 (2019-01-11)
Initial release.
FAQs
ESLint rule to detect when a class has duplicate properties and methods.
The npm package eslint-plugin-no-dupe-class-fields receives a total of 264 weekly downloads. As such, eslint-plugin-no-dupe-class-fields popularity was classified as not popular.
We found that eslint-plugin-no-dupe-class-fields 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.