{"id":43509897,"url":"https://github.com/getndazn/kopytko-eslint-plugin","last_synced_at":"2026-02-03T12:49:20.424Z","repository":{"id":43379518,"uuid":"385201567","full_name":"getndazn/kopytko-eslint-plugin","owner":"getndazn","description":"Set of Brightscript rules for ESLint","archived":false,"fork":false,"pushed_at":"2024-02-06T13:52:55.000Z","size":155,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":60,"default_branch":"master","last_synced_at":"2025-11-23T03:11:52.771Z","etag":null,"topics":["brightscript","eslint","kopytko","roku"],"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/getndazn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-12T09:58:28.000Z","updated_at":"2023-09-08T18:24:16.000Z","dependencies_parsed_at":"2025-03-21T17:02:12.718Z","dependency_job_id":"61b81e60-c7c0-41b2-ac46-65c0e5f19d01","html_url":"https://github.com/getndazn/kopytko-eslint-plugin","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/getndazn/kopytko-eslint-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getndazn%2Fkopytko-eslint-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getndazn%2Fkopytko-eslint-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getndazn%2Fkopytko-eslint-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getndazn%2Fkopytko-eslint-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getndazn","download_url":"https://codeload.github.com/getndazn/kopytko-eslint-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getndazn%2Fkopytko-eslint-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29046488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"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":["brightscript","eslint","kopytko","roku"],"created_at":"2026-02-03T12:49:19.605Z","updated_at":"2026-02-03T12:49:20.412Z","avatar_url":"https://github.com/getndazn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kopytko ESLint plugin\n\nAn ESLint plugin with a set of rules\n\n## Installation\n\n1. Install `eslint` peer dependency:\n```bash\nnpm i eslint --save-dev\n```\n\n2. Install `eslint-plugin-kopytko`:\n```bash\nnpm i @dazn/eslint-plugin-kopytko --save-dev\n```\n\n## Configuration\n\nIn `.eslintrc`:\n```json\n{\n  \"extends\": \"plugin:@dazn/kopytko/recommended\",\n  \"plugins\": [\"@dazn/kopytko\"]\n}\n```\n\n## Rules\n\n### @dazn/kopytko/dependencies-order\n\nA rule to use with [Kopytko Packager](https://github.com/getndazn/kopytko-packager) 's importing mechanism\nand [Kopytko Unit Testing Framework](https://github.com/getndazn/kopytko-unit-testing-framework) 's mocking mechanism.\n\nEnforces a proper alphabetical and path-specific order of `@import` and `@mock` annotations:\n1. imports or mocks from external packages have to be before local ones\n2. `@mock` annotations have to be after all `@import` annotations\n3. alphabetical order of external packages names\n4. alphabetical order of paths\n5. nested paths have to be declared after their root path\n\n#### External packages before local\n\nExample of **incorrect** code:\n```brightscript\n' @import /components/main-function.brs\n' @import /components/nested/another-function.brs\n' @import /components/nested/cool-function.brs\n' @import /components/nested/some-function.brs from package-name\n' @mock /components/mocked-function.brs\n' @mock /components/some-mocked-function.brs from package-name\n```\n\nExample of **correct** code:\n```brightscript\n' @import /components/nested/some-function.brs from package-name\n' @mock /components/some-mocked-function.brs from package-name\n' @import /components/main-function.brs\n' @import /components/nested/another-function.brs\n' @import /components/nested/cool-function.brs\n' @mock /components/mocked-function.brs\n```\n\n#### Imports before mocks\n\nExample of **incorrect** code:\n```brightscript\n' @mock /components/mocked-function.brs\n' @import /components/main-function.brs\n' @import /components/nested/another-function.brs\n' @import /components/nested/cool-function.brs\n```\n\nExample of **correct** code:\n```brightscript\n' @import /components/main-function.brs\n' @import /components/nested/another-function.brs\n' @import /components/nested/cool-function.brs\n' @mock /components/mocked-function.brs\n```\n\n#### Alphabetical order of external packages names\n\nExample of **incorrect** code:\n```brightscript\n' @import /components/a-function.brs from package-name\n' @import /components/some-function.brs from another-package-name\n' @mock /components/another-mocked-function.brs from package-name\n' @mock /components/some-mocked-function.brs from another-package-name\n' @import /components/main-function.brs\n' @mock /components/mocked-function.brs\n```\n\nExample of **correct** code:\n```brightscript\n' @import /components/some-function.brs from another-package-name\n' @import /components/a-function.brs from package-name\n' @mock /components/some-mocked-function.brs from another-package-name\n' @mock /components/another-mocked-function.brs from package-name\n' @import /components/main-function.brs\n' @mock /components/mocked-function.brs\n```\n\n#### Alphabetical order of paths\n\nExample of **incorrect** code:\n```brightscript\n' @import /components/nested/another-function.brs\n' @import /components/main-function.brs\n' @import /components/nested/cool-function.brs\n' @mock /components/some-mocked-function.brs\n' @mock /components/mocked-function.brs\n```\n\nExample of **correct** code:\n```brightscript\n' @import /components/main-function.brs\n' @import /components/nested/another-function.brs\n' @import /components/nested/cool-function.brs\n' @mock /components/mocked-function.brs\n' @mock /components/some-mocked-function.brs\n```\n\n### @dazn/kopytko/function-no-return\n\nCheck if function with defined return type has `return` statement.\n\nExamples of **incorrect** code for this rule:\n```brightscript\nfunction calc() as Integer\n  result = 1 + 2\nend function\n```\n\nExamples of **correct** code for this rule:\n```brightscript\nfunction calc() as Integer\n  result = 1 + 2\n  return result\nend function\n```\n\n### @dazn/kopytko/indent\n\nEnforces consistent indentation of block, array and object expressions, and function declarations\n\nExamples of **incorrect** code for this rule, set to 2 characters:\n```brightscript\nsub test()\n  example = [\n  1,\n    2,\n  ]\n  if (1 = 1)\n  superFunction({\n    a: \"a\",\n  b: \"b\",\n      c: \"c\",\n  })\n  end if\nend sub\n\n  sub another()\n  superFunction({})\n  end sub\n```\n\nExamples of **correct** code for this rule, set to 2 characters:\n```brightscript\nsub test()\n  example = [\n    1,\n    2,\n  ]\n  if (1 = 1)\n    superFunction({\n      a: \"a\",\n      b: \"b\",\n      c: \"c\",\n    })\n  end if\nend sub\n\nsub another()\n  superFunction({})\nend sub\n```\n\n### @dazn/kopytko/missing-trailing-comma\n\nEnforces a trailing comma after every property of multiline associative array\n\nThe `--fix` option on the command line can automatically fix some of the problems reported by this rule.\n\nExamples of **incorrect** code for this rule:\n```brightscript\ntest = {\n  a: \"a\",\n  b: \"b\"\n}\n```\n\nExamples of **correct** code for this rule:\n```brightscript\ntest = {\n  a: \"a\",\n  b: \"b\",\n}\n```\n\n### @dazn/kopytko/no-uninitialized-variables\n\nCheck that all variables are declared.\n\nExamples of **incorrect** code for this rule:\n```brightscript\nsub a()\n  print(foo)\nend sub\n```\n\nExamples of **correct** code for this rule:\n```brightscript\nsub a()\n  foo = \"bar\"\n  print(foo)\nend sub\n```\n### @dazn/kopytko/sub-to-function\n\nCheck that `sub` doesn't have a return type.\n\nExamples of **incorrect** code for this rule:\n```brightscript\nsub a() as Dynamic\nend sub\n```\n\nExamples of **correct** code for this rule:\n```brightscript\nsub a()\n  print(\"foo\")\nend sub\n```\n\n### @dazn/kopytko/no-print\n\nDisallows the use of `print`.\n\n### @dazn/kopytko/no-stop\n\nDisallows the use of `stop`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetndazn%2Fkopytko-eslint-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetndazn%2Fkopytko-eslint-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetndazn%2Fkopytko-eslint-plugin/lists"}