{"id":18532657,"url":"https://github.com/itwillwork/eslint-plugin-file-structure-control","last_synced_at":"2025-05-14T23:08:18.332Z","repository":{"id":156535411,"uuid":"633048927","full_name":"itwillwork/eslint-plugin-file-structure-control","owner":"itwillwork","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-26T17:20:10.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T14:57:28.734Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itwillwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-26T17:09:03.000Z","updated_at":"2023-04-26T17:19:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"80bb4b61-ee9e-41bb-abb9-5b6e7f10d435","html_url":"https://github.com/itwillwork/eslint-plugin-file-structure-control","commit_stats":{"total_commits":2,"total_committers":2,"mean_commits":1.0,"dds":0.5,"last_synced_commit":"7b65fb691a5c5f65bf360f4ef6e59fab64908a64"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itwillwork%2Feslint-plugin-file-structure-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itwillwork%2Feslint-plugin-file-structure-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itwillwork%2Feslint-plugin-file-structure-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itwillwork%2Feslint-plugin-file-structure-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itwillwork","download_url":"https://codeload.github.com/itwillwork/eslint-plugin-file-structure-control/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243363,"owners_count":22038046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-06T19:07:23.903Z","updated_at":"2025-05-14T23:08:13.322Z","avatar_url":"https://github.com/itwillwork.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-file-structure-control\n\nEslint plugin for linting file structure\n\n## Installation\n\n```\nnpm i --save-dev eslint-plugin-file-structure-control\n```\n\n## Usage\n\nCreate an .eslint.json file with the following:\n\n```json\n\"plugins\": [\n    \"file-structure-control\"\n]\n```\n\nThen, you can add the custom rules to the .eslint.json file:\n\n```json\n\"rules\": {\n  \"file-structure-control/sync-relative-files\": \"error\"\n}\n```\n\nTo lint your project with ESLint, add the following script to your package.json:\n\n```json\n{\n  \"scripts\": {\n    \"lint\": \"eslint .\"\n  }\n}\n```\n\nand run the linter with:\n\n```\nnpm run lint\n```\n\n## Rules\n\n#### file-structure-control/sync-relative-files\n\nConfig example:\n\n```js\n \"file-structure-control/sync-relative-files\": [\"error\", {\n      relations: {\n        '.test.tsx': ['.tsx'],\n        '.test.ts': ['.ts'],\n        '.classes.ts': ['.tsx'],\n      },\n    }],\n```\n\nExamples of incorrect code for this rule:\n\n```\n/components\n  /Time.classes.ts\n  /Times.tsx \u003c--- correct Time.tsx\n/utils\n  /time.test.ts\n  /time-utils.ts  \u003c--- correct time.ts\n```\n\nExamples of correct code for this rule:\n\n```\n/components\n  /Time.tsx\n  /Time.classes.ts\n/utils\n  /time.test.ts\n  /time.ts\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitwillwork%2Feslint-plugin-file-structure-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitwillwork%2Feslint-plugin-file-structure-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitwillwork%2Feslint-plugin-file-structure-control/lists"}