{"id":21250762,"url":"https://github.com/pksilen/eslint-plugin-clean-code","last_synced_at":"2026-04-02T01:13:34.007Z","repository":{"id":43879597,"uuid":"233854510","full_name":"pksilen/eslint-plugin-clean-code","owner":"pksilen","description":"Clean code plugin for ESLint","archived":false,"fork":false,"pushed_at":"2023-10-19T22:32:12.000Z","size":250,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T03:27:03.701Z","etag":null,"topics":["clean","code","eslint","eslint-plugin","eslint-plugin-clean-code","plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pksilen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["paypal.me/pksilen"]}},"created_at":"2020-01-14T14:03:28.000Z","updated_at":"2025-06-24T03:21:45.000Z","dependencies_parsed_at":"2024-06-19T05:29:23.831Z","dependency_job_id":"d9605067-f543-4890-9e08-c0b0f50a0e32","html_url":"https://github.com/pksilen/eslint-plugin-clean-code","commit_stats":{"total_commits":46,"total_committers":3,"mean_commits":"15.333333333333334","dds":0.4565217391304348,"last_synced_commit":"7a074c5b6c2697255f024903647c6fe2e8c1c567"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pksilen/eslint-plugin-clean-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pksilen%2Feslint-plugin-clean-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pksilen%2Feslint-plugin-clean-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pksilen%2Feslint-plugin-clean-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pksilen%2Feslint-plugin-clean-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pksilen","download_url":"https://codeload.github.com/pksilen/eslint-plugin-clean-code/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pksilen%2Feslint-plugin-clean-code/sbom","scorecard":{"id":736619,"data":{"date":"2025-08-11","repo":{"name":"github.com/pksilen/eslint-plugin-clean-code","commit":"5a0a3358b8d5b5152456744578768caa83f117a7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T16:04:49.003Z","repository_id":43879597,"created_at":"2025-08-22T16:04:49.003Z","updated_at":"2025-08-22T16:04:49.003Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:05:07.454Z","status":"ssl_error","status_checked_at":"2026-04-02T00:56:46.496Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clean","code","eslint","eslint-plugin","eslint-plugin-clean-code","plugin"],"created_at":"2024-11-21T03:38:47.687Z","updated_at":"2026-04-02T01:13:33.983Z","avatar_url":"https://github.com/pksilen.png","language":"JavaScript","readme":"# eslint-plugin-clean-code\n\nClean code ESLint plugin\n\n## Installation\n\nYou'll first need to install [ESLint](http://eslint.org):\n\n```\n$ npm install --save-dev eslint \n```\n\nNext, install `eslint-plugin-clean-code`:\n\n```\n$ npm install --save-dev eslint-plugin-clean-code\n```\n\n**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-clean-code` globally.\n\n## Usage\n\nAdd `clean-code` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:\n\n```json\n{\n    \"plugins\": [\n        \"clean-code\"\n    ]\n}\n```\n\n\nThen configure the rules you want to use under the rules section.\n\n```json\n{\n    \"rules\": {\n        \"clean-code/feature-envy\": 2\n    }\n}\n```\n\n## Supported Rules\n\n    | Rule name         | Description                                                                      |\n    --------------------------------------------------------------------------------------------------------\n    | feature-envy      | Reports the \"Feature Envy\" code smell. Feature envy is defined as occurring when |\n    |                   | a method calls methods on another class three or more times. Feature envy is     |\n    |                   | often an indication that functionality is located in the wrong class.            |\n    \n    \n## Todo\n- [ ] Allow end-user configuration of object name/class for which feature envy is not reported \n\n- [ ] Chain of 'instanceof' checks\n        \n      Reports any chains of if-else statements all of whose conditions are instanceof expressions or class equality\n      expressions (e.g. comparison with String.class). Such constructions usually indicate a failure of object-oriented\n      design, which dictates that such type-based dispatch should be done via polymorphic method calls rather than \n      explicit chains of type tests. \n\n- [ ] 'if' statement with too many branches\n      \n      Reports if statements with too many branches. Such statements may be confusing, and are often the sign of \n      inadequate levels of design abstraction.\n      \n- [ ] 'switch' statement outside of factory class/method\n\n- [ ] Method call violates Law of Demeter\n\n- [ ] Overly complex boolean expression  \n\n## Contributing\n\nFeel free to contribute to any of above Todos or supply your own clean code rule not given in Todos.\n\n\n\n","funding_links":["paypal.me/pksilen"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpksilen%2Feslint-plugin-clean-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpksilen%2Feslint-plugin-clean-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpksilen%2Feslint-plugin-clean-code/lists"}