{"_id":"@dazn/eslint-plugin-kopytko","_rev":"6-9c1953bb58f24206b6b260c8852c744d","name":"@dazn/eslint-plugin-kopytko","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"@dazn/eslint-plugin-kopytko","version":"1.0.0","description":"Set of brightscript rules for eslint","main":"src/index.js","keywords":["brightscript","eslint","kopytko","lint","roku"],"dependencies":{"@roku-road/bright":"^1.3.2"},"peerDependencies":{"eslint":"5.6.0"},"contributors":[{"name":"Radosław Zambrowski","email":"radekzam@gmail.com"},{"name":"Paweł Hertman","email":"pawel@hertman.eu"},{"name":"Tomasz Rejment","email":"trejment@gmail.com"},{"name":"Błażej Chełkowski","email":"blazej.chelkowski@outlook.com"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/getndazn/kopytko-eslint-plugin.git"},"bugs":{"url":"https://github.com/getndazn/kopytko-eslint-plugin/issues"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/changelog","@semantic-release/git","@semantic-release/github"]},"gitHead":"4a9e85e5e56ce249f4014b14370f8694e8e14bad","homepage":"https://github.com/getndazn/kopytko-eslint-plugin#readme","_id":"@dazn/eslint-plugin-kopytko@1.0.0","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-cXfWR+H23tmLbdqhOdVwN8efjUyahFVd+qEz4jE5RVGk4fsdRuFQvqAnxNISR7BegvUYIUkv+vUUHgdNw97cGQ==","shasum":"fe34343a8925cde00ae691b1a7feedfd77813106","tarball":"https://registry.npmjs.org/@dazn/eslint-plugin-kopytko/-/eslint-plugin-kopytko-1.0.0.tgz","fileCount":14,"unpackedSize":14156,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqPIO2Lk7ALOMl/48ABZHqfbx6rXt1HsFMPECPF1ChwQIhALDpqndulP7RVSaDG6j3mg/SLlV53G9WivrzyH6AtdTb"}]},"_npmUser":{"name":"dazn.oss","email":"dazn.oss@rickburgess.me"},"directories":{},"maintainers":[{"name":"rick-burgess-dazn","email":"rick.burgess@dazn.com"},{"name":"automation-drone","email":"dx@dazn.com"},{"name":"dazn.oss.lambda.powertools","email":"dazn.oss.lambda.powertools@rickburgess.me"},{"name":"dazn.oss","email":"dazn.oss@rickburgess.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-kopytko_1.0.0_1632492315383_0.5873172174387267"},"_hasShrinkwrap":false},"2.0.0":{"name":"@dazn/eslint-plugin-kopytko","version":"2.0.0","description":"Set of brightscript rules for eslint","main":"src/index.js","keywords":["brightscript","eslint","kopytko","lint","roku"],"dependencies":{"@roku-road/bright":"^1.3.2"},"peerDependencies":{"eslint":"5.6.0"},"contributors":[{"name":"Radosław Zambrowski","email":"radekzam@gmail.com"},{"name":"Paweł Hertman","email":"pawel@hertman.eu"},{"name":"Tomasz Rejment","email":"trejment@gmail.com"},{"name":"Błażej Chełkowski","email":"blazej.chelkowski@outlook.com"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/getndazn/kopytko-eslint-plugin.git"},"bugs":{"url":"https://github.com/getndazn/kopytko-eslint-plugin/issues"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/changelog","@semantic-release/git","@semantic-release/github"]},"gitHead":"9dc742cf0122552fc14955045df4ee235a758cef","homepage":"https://github.com/getndazn/kopytko-eslint-plugin#readme","_id":"@dazn/eslint-plugin-kopytko@2.0.0","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"integrity":"sha512-gteR6qW+dyeEHszl3pC47A8sBJ2YH85vMwSy1pG5VDms9YjsoiSyN9algzEbNx3qTLJXD+jCv8PwlfpPYVEptA==","shasum":"8342caf39a1c910e63294a1cba8c0434e9c87007","tarball":"https://registry.npmjs.org/@dazn/eslint-plugin-kopytko/-/eslint-plugin-kopytko-2.0.0.tgz","fileCount":14,"unpackedSize":17370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhwb/QCRA9TVsSAnZWagAAMaUP/R2MTiv5dH2m/RSoTaB2\nMp5bSFHfCwc2oyEeu5W4Yajoa0krCsc3jZDu+GSHJYTtM1p2Y1gbs0XOTGLY\nJ0mPI/Fx5hubIiMv+tFb+++TjgT0DGSSqSFN/s+kpyZeuh5DkY+YrXOBHf9d\nEb578T6lazKqQEdOs9DKwvId5IOkvBjCMKpv+LLYS04YBsGAHrgig8QHmfA4\nyE1GYOPGxuVtwnp4GUBM1dzEVHuaaJvSIAl3ucH5g+wja/MB1wdnq5gflJyG\nDRWeIKnFGDfuZ8Cc6rBUFY39uXsmGMoVIA9IMxR7NlN8pU1tlK0//ZQK2XJ/\nRw4CeoG4mMEHcyQfeztC3SODKuSav7Uznsl7ooIEev2O2ZGKYbm+4plERE+N\nq3Z1z0V2JzTqANcYWVzRXIXnC0yA1drUCKeA8jUYUWWYpUchVtcMatOQqtiG\nOF8gt64DdQkaDo0euExQjuxbXjFq5Ygb60YgPJOnP7m+wTY4XcY+HG4ptjTX\nCSFXYy1LLWrWCZTJx6O5kAe4W9GBDMnffI/5wX8HnegkeQqBsFalij0uRqHf\n0970sfcg5JFDguhVgI9mAApzrQ5+6gl/3lDGV9YpOYJjBqhLkc3AWyqnxbpb\nMkMMDsDfylFDv7E92VCesEDcx5hF53KngWBYJU8y4XHa3OtP+qoNDV2b6LiR\naJAv\r\n=x0pR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGXyTgGue8LbJHA7NVmlPBi8SrTa2cavLMxQflXgcHPAIgd5GfItRMIK2CNrO0DBF7Qa9vI6InLw9GiLh6voNzAK8="}]},"_npmUser":{"name":"dazn.oss","email":"dazn.oss@rickburgess.me"},"directories":{},"maintainers":[{"name":"rick-burgess-dazn","email":"rick.burgess@dazn.com"},{"name":"automation-drone","email":"dx@dazn.com"},{"name":"dazn.oss.lambda.powertools","email":"dazn.oss.lambda.powertools@rickburgess.me"},{"name":"dazn.oss","email":"dazn.oss@rickburgess.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-kopytko_2.0.0_1640087504431_0.490061117607838"},"_hasShrinkwrap":false},"2.1.0":{"name":"@dazn/eslint-plugin-kopytko","version":"2.1.0","description":"Set of brightscript rules for eslint","main":"src/index.js","keywords":["brightscript","eslint","kopytko","lint","roku"],"scripts":{"test":"jest"},"dependencies":{"@roku-road/bright":"^1.3.2"},"peerDependencies":{"eslint":"^8.9.0"},"contributors":[{"name":"Radosław Zambrowski","email":"radekzam@gmail.com"},{"name":"Paweł Hertman","email":"pawel@hertman.eu"},{"name":"Tomasz Rejment","email":"trejment@gmail.com"},{"name":"Błażej Chełkowski","email":"blazej.chelkowski@outlook.com"},{"name":"Tomasz Bazelczuk","email":"tbazelczuk@gmail.com"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/getndazn/kopytko-eslint-plugin.git"},"bugs":{"url":"https://github.com/getndazn/kopytko-eslint-plugin/issues"},"publishConfig":{"access":"public"},"release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/npm","@semantic-release/changelog","@semantic-release/git","@semantic-release/github"]},"devDependencies":{"jest":"^27.5.1"},"engines":{"node":">=16.0.0","npm":">=8.0.0"},"gitHead":"f6fe297f356dc7aadb5d997715ea958910ff2e31","homepage":"https://github.com/getndazn/kopytko-eslint-plugin#readme","_id":"@dazn/eslint-plugin-kopytko@2.1.0","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-b74WGqBA8kxVZGq4/RqbCMJAKarmh4JMSBB15luQyWGtvLTKqAHP4/8ufbNmFxa5BSwpqMRL+CTpql/PGJCX7A==","shasum":"2f37d01864ea3870ea679790740245214a013ed3","tarball":"https://registry.npmjs.org/@dazn/eslint-plugin-kopytko/-/eslint-plugin-kopytko-2.1.0.tgz","fileCount":26,"unpackedSize":35249,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIdrJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoxoQ//dV89GVoGwLJUUK7w9pXgbws3zZbY+fDxaTLQxWSclicFnYTZ\r\nXXYWHpHMUaO4Rz/ol7QpZZc2nJb3kP64hbnlu+FMnHa7JUQJYkrxnHS04IYa\r\nYOpWI9QTBybFuTr999kd2bdTYBDFc6NdL3N8kpQIcXKJitsDKNMsVvQMNYU8\r\n39nGABZ2X5OwGJm4qK99+Is0hQIoQMh+hzlLHIrkf6BlBOfd8L2fmHY+YnJs\r\nJ9TbXwKsqH+Tr35Tw0gVcQk9JiiQoWcfKnqjKPbJjvzoLhX/BL0Yht9G6bhp\r\ntOBVyYqfGHQ6LnS31hiWleYvtxUw4NgDAhH7t58+Kh1qBd5LokQgcsVXoBCI\r\nk8kQ94wd5HPigvIKxh8Dl3Of3wYzoApSoJmaexH/cY6S4piJNT+Uta58QLUU\r\nmV40ztMnxrcx8NZNqR+W8diWoMmsiyEZeUvbKGOpphi3Mu1Atk2TsJRcldFb\r\nSMmY4uwr2YiExmlYNg8RdcXMlT9rBmWcnlEUNmPraGCn0Bz7IY/OFmxXbmCX\r\nTca+IIMCr9Ta2KXZumYf2tJPCIiTUaCGEEoJKtFPV9IgSd3fk53eSW+7JNuP\r\nNsOlk2fGsjwVR4rcnwP6r2ciIjggs81k1UbgoLscpsr8RE3f8IZHR6bHdQqL\r\nSpWEWAAt5A6+rdbn6hDNkbvThOmyxALyTLA=\r\n=mTO7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBc8l1NkHgT39ZW4m+DV9nGG/N8cW9glm6wWtiX+gE+UAiBlcl7P9BXRgZLShFMrBneWMa1ookExdIn4BPK7nFGEiQ=="}]},"_npmUser":{"name":"dazn.oss","email":"dazn.oss@rickburgess.me"},"directories":{},"maintainers":[{"name":"rick-burgess-dazn","email":"rick.burgess@dazn.com"},{"name":"automation-drone","email":"dx@dazn.com"},{"name":"dazn.oss.lambda.powertools","email":"dazn.oss.lambda.powertools@rickburgess.me"},{"name":"dazn.oss","email":"dazn.oss@rickburgess.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-kopytko_2.1.0_1646385865420_0.17654561933868296"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-24T14:05:15.321Z","1.0.0":"2021-09-24T14:05:15.531Z","modified":"2023-04-28T09:56:11.578Z","2.0.0":"2021-12-21T11:51:44.611Z","2.1.0":"2022-03-04T09:24:25.562Z"},"maintainers":[{"email":"fishermansfriend1451@gmail.com","name":"gideonparanoid"},{"email":"dx@dazn.com","name":"automation-drone"},{"email":"dazn.oss.lambda.powertools@rickburgess.me","name":"dazn.oss.lambda.powertools"}],"description":"Set of brightscript rules for eslint","homepage":"https://github.com/getndazn/kopytko-eslint-plugin#readme","keywords":["brightscript","eslint","kopytko","lint","roku"],"repository":{"type":"git","url":"git+https://github.com/getndazn/kopytko-eslint-plugin.git"},"contributors":[{"name":"Radosław Zambrowski","email":"radekzam@gmail.com"},{"name":"Paweł Hertman","email":"pawel@hertman.eu"},{"name":"Tomasz Rejment","email":"trejment@gmail.com"},{"name":"Błażej Chełkowski","email":"blazej.chelkowski@outlook.com"},{"name":"Tomasz Bazelczuk","email":"tbazelczuk@gmail.com"}],"bugs":{"url":"https://github.com/getndazn/kopytko-eslint-plugin/issues"},"license":"MIT","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","readmeFilename":"README.md"}