{"_id":"@bitrix24/eslint-plugin-bitrix24-janative","_rev":"6-ef996455e788a530709762e1aecc83d2","name":"@bitrix24/eslint-plugin-bitrix24-janative","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@bitrix24/eslint-plugin-bitrix24-janative","version":"1.0.0","keywords":["eslint"],"author":{"name":"Bitrix24"},"license":"MIT","_id":"@bitrix24/eslint-plugin-bitrix24-janative@1.0.0","maintainers":[{"name":"compote2","email":"compote@gmail.com"},{"name":"vovkabelov","email":"i@vovkabelov.ru"}],"homepage":"https://github.com/bitrix24/eslint-bitrix24#readme","bugs":{"url":"https://github.com/bitrix24/eslint-bitrix24/issues"},"dist":{"shasum":"8f2e40d29383f8da22f14adc76af4ba99881c1a1","tarball":"https://registry.npmjs.org/@bitrix24/eslint-plugin-bitrix24-janative/-/eslint-plugin-bitrix24-janative-1.0.0.tgz","fileCount":4,"integrity":"sha512-4Vq5LnKaPON7I5pYsBYnC1iO2nMaSSfvmJDC72Td5PrvYASf/Jo+116POQF8TWdxNkcc/FdYZFuciEOzjhHCNw==","signatures":[{"sig":"MEYCIQChBG+MSJUz6VpN77mKqN2C5OJ+EDSvWSlqcsVyyEaSCwIhAOGQv1DnK72kKrqaB3FN2KSQotgwT57o7GW49lv7ux1y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2515},"main":"index.js","gitHead":"fd659e448dd5ca927153b7744bf3d49691bc516b","_npmUser":{"name":"compote2","email":"compote@gmail.com"},"repository":{"url":"git+https://github.com/bitrix24/eslint-bitrix24.git","type":"git"},"_npmVersion":"9.2.0","description":"ESLint rules for the Bitrix24 Janative style guide","directories":{},"_nodeVersion":"19.3.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-bitrix24-janative_1.0.0_1685023739667_0.760396436682484","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@bitrix24/eslint-plugin-bitrix24-janative","version":"1.0.1","keywords":["eslint"],"author":{"name":"Bitrix24"},"license":"MIT","_id":"@bitrix24/eslint-plugin-bitrix24-janative@1.0.1","maintainers":[{"name":"compote2","email":"compote@gmail.com"},{"name":"vovkabelov","email":"i@vovkabelov.ru"}],"homepage":"https://github.com/bitrix24/eslint-bitrix24#readme","bugs":{"url":"https://github.com/bitrix24/eslint-bitrix24/issues"},"dist":{"shasum":"e37afd33891549635158b315062e6e7335a2653a","tarball":"https://registry.npmjs.org/@bitrix24/eslint-plugin-bitrix24-janative/-/eslint-plugin-bitrix24-janative-1.0.1.tgz","fileCount":3,"integrity":"sha512-6Nz2raoQIfBR5968WYLLp1JfT0usB13g54vNC+cpedBPQfrSrNVt9M1rzvoBosBWbmS2RfGehSPBfLOMNZYERw==","signatures":[{"sig":"MEUCIQD1ca8xj0P2jMebobqAhgQBxfroVYZHxZAADZ30EPlqZwIgFdeIKbhCjb11jIvY43aX3SQxD+SkQqWkdOPia40CfvQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1860},"main":"index.js","gitHead":"c4ce8c5770518f8fc76f884ed4cb89e91e99fc82","_npmUser":{"name":"compote2","email":"compote@gmail.com"},"repository":{"url":"git+https://github.com/bitrix24/eslint-bitrix24.git","type":"git"},"_npmVersion":"10.2.5","description":"ESLint rules for the Bitrix24 Janative style guide","directories":{},"_nodeVersion":"20.6.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-bitrix24-janative_1.0.1_1708411879679_0.508212319917164","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@bitrix24/eslint-plugin-bitrix24-janative","version":"1.0.2","keywords":["eslint"],"author":{"name":"Bitrix24"},"license":"MIT","_id":"@bitrix24/eslint-plugin-bitrix24-janative@1.0.2","maintainers":[{"name":"compote2","email":"compote@gmail.com"},{"name":"vovkabelov","email":"i@vovkabelov.ru"}],"homepage":"https://github.com/bitrix24/eslint-bitrix24#readme","bugs":{"url":"https://github.com/bitrix24/eslint-bitrix24/issues"},"dist":{"shasum":"03abb04883b57674400f78f82095ba080a72ae04","tarball":"https://registry.npmjs.org/@bitrix24/eslint-plugin-bitrix24-janative/-/eslint-plugin-bitrix24-janative-1.0.2.tgz","fileCount":4,"integrity":"sha512-0/VbgWmrxU5RtxYb3DkoUD1qPJW3AjcwdTXYaaBP4Yvo7lXgWL8QnkvcRRF33LU9P8Cai5cN/BFIrJdleVkMBQ==","signatures":[{"sig":"MEUCIQCWzkfnoXDWshpzwGen+JjBo20GibYd1o6xB/qoWDpoygIgRxFyU2lFFKmeNn1sH6jnBQ1sNURIlaPdDE13mzevQyU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2515},"main":"index.js","gitHead":"44b65e9100dcb9e4e56fe039cdc4d5b427ba5d7f","_npmUser":{"name":"compote2","email":"compote@gmail.com"},"repository":{"url":"git+https://github.com/bitrix24/eslint-bitrix24.git","type":"git"},"_npmVersion":"10.2.5","description":"ESLint rules for the Bitrix24 Janative style guide","directories":{},"_nodeVersion":"20.6.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-bitrix24-janative_1.0.2_1708420104225_0.7095911563767501","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@bitrix24/eslint-plugin-bitrix24-janative","version":"1.0.3","keywords":["eslint"],"author":{"name":"Bitrix24"},"license":"MIT","_id":"@bitrix24/eslint-plugin-bitrix24-janative@1.0.3","maintainers":[{"name":"compote2","email":"compote@gmail.com"},{"name":"vovkabelov","email":"i@vovkabelov.ru"}],"homepage":"https://github.com/bitrix24/eslint-bitrix24#readme","bugs":{"url":"https://github.com/bitrix24/eslint-bitrix24/issues"},"dist":{"shasum":"34c4d1e98d8662fc1382e4639854f97c5cc01ed0","tarball":"https://registry.npmjs.org/@bitrix24/eslint-plugin-bitrix24-janative/-/eslint-plugin-bitrix24-janative-1.0.3.tgz","fileCount":5,"integrity":"sha512-qT2KpmNbjI0Ez0ukDIonC2y3XS9W6Dbh796mQh62wkl16SCGuiqlG3gPDorngWFqRz5zENtteTqtFg9cfZF1FQ==","signatures":[{"sig":"MEUCIDT8uDtygYOx5QsuuKmXIzcMsSaPmpK7JsuDnj66JcGBAiEAmmK2Kr2/UXhXrl1eUmed0C+B6+fWm2fSE3YECh8kb7o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3075},"main":"index.js","gitHead":"c58bf8f69369309dfdbb040fcba7984d3216e638","_npmUser":{"name":"compote2","email":"compote@gmail.com"},"repository":{"url":"git+https://github.com/bitrix24/eslint-bitrix24.git","type":"git"},"_npmVersion":"11.7.0","description":"ESLint rules for the Bitrix24 Janative style guide","directories":{},"_nodeVersion":"24.8.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-bitrix24-janative_1.0.3_1773749846439_0.8810433124068218","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@bitrix24/eslint-plugin-bitrix24-janative","version":"1.0.4","keywords":["eslint"],"author":{"name":"Bitrix24"},"license":"MIT","_id":"@bitrix24/eslint-plugin-bitrix24-janative@1.0.4","maintainers":[{"name":"compote2","email":"compote@gmail.com"},{"name":"vovkabelov","email":"i@vovkabelov.ru"}],"homepage":"https://github.com/bitrix24/eslint-bitrix24#readme","bugs":{"url":"https://github.com/bitrix24/eslint-bitrix24/issues"},"dist":{"shasum":"e00d0db65e1f95753356a04d4b9e9d421cf85140","tarball":"https://registry.npmjs.org/@bitrix24/eslint-plugin-bitrix24-janative/-/eslint-plugin-bitrix24-janative-1.0.4.tgz","fileCount":5,"integrity":"sha512-nvBXA8p/Gj7HiFFozNteJrwxLLXtojWZvTYFQL4j4y6cMF/AmHeR6uf+YO9PLdZwzSUfzcq3EHqzEMx+TmpVdA==","signatures":[{"sig":"MEQCIC6xZplCqxMbZmnEbzRPi/6QXckkZzcZtwA5ApFhUbmkAiBX0VybQcr7KIuWczo5JU2iBszgLQZYgtskisFls/ey5Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bitrix24%2feslint-plugin-bitrix24-janative@1.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":3168},"main":"index.js","type":"module","gitHead":"06873e2923f334d265ac5b1a0a7600b8378093e7","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9fd6e527-2a87-4f65-b9e7-22f900066853"}},"repository":{"url":"git+https://github.com/bitrix24/eslint-bitrix24.git","type":"git"},"_npmVersion":"11.12.0","description":"ESLint rules for the Bitrix24 Janative style guide","directories":{},"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-bitrix24-janative_1.0.4_1774007459132_0.24203391078627523","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@bitrix24/eslint-plugin-bitrix24-janative","version":"1.1.0","description":"ESLint rules for the Bitrix24 Janative style guide","type":"module","main":"index.js","bin":{"janative-deps":"bin/janative-deps.js"},"repository":{"type":"git","url":"git+https://github.com/bitrix24/eslint-bitrix24.git"},"keywords":["eslint"],"scripts":{"test":"mocha \"tests/**/*.test.js\""},"author":{"name":"Bitrix24"},"license":"MIT","bugs":{"url":"https://github.com/bitrix24/eslint-bitrix24/issues"},"homepage":"https://github.com/bitrix24/eslint-bitrix24#readme","peerDependencies":{"eslint":"^8.0.0 || ^9.0.0"},"dependencies":{"espree":"^9.6.1 || ^10.0.0"},"devDependencies":{"mocha":"^11.7.5","@babel/core":"^7.28.5","@babel/eslint-parser":"^7.28.5","eslint":"^8.57.1"},"gitHead":"aafcfdc85d07a40aa27cf3cfeede7b681e088237","_id":"@bitrix24/eslint-plugin-bitrix24-janative@1.1.0","_nodeVersion":"24.8.0","_npmVersion":"11.18.0","dist":{"integrity":"sha512-GTwiHWB6aKUJ1fBnDmmYlLZmhNqsg/Sx9V0OOWSYU7vVK1t0zX7Ja4Y3FKEw8rYyEnapMNf8MTPyD57Am3w7dQ==","shasum":"eb467b91d49c766f1bb6e487471a010383ecc342","tarball":"https://registry.npmjs.org/@bitrix24/eslint-plugin-bitrix24-janative/-/eslint-plugin-bitrix24-janative-1.1.0.tgz","fileCount":51,"unpackedSize":128384,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBwQeBmsZQZQHi/PQElQowWZqCEg/RISw0KUpIqaXKgKAiEA5FOMGVVBIHGJYuNvalbH1JS7wnEWWBZw0HHRE3Lhe54="}]},"_npmUser":{"name":"compote2","email":"compote@gmail.com"},"directories":{},"maintainers":[{"name":"compote2","email":"compote@gmail.com"},{"name":"vovkabelov","email":"i@vovkabelov.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-plugin-bitrix24-janative_1.1.0_1785510542327_0.8607389991571315"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-25T14:08:59.610Z","modified":"2026-07-31T15:09:02.711Z","1.0.0":"2023-05-25T14:08:59.983Z","1.0.1":"2024-02-20T06:51:19.920Z","1.0.2":"2024-02-20T09:08:24.391Z","1.0.3":"2026-03-17T12:17:26.580Z","1.0.4":"2026-03-20T11:50:59.285Z","1.1.0":"2026-07-31T15:09:02.517Z"},"bugs":{"url":"https://github.com/bitrix24/eslint-bitrix24/issues"},"author":{"name":"Bitrix24"},"license":"MIT","homepage":"https://github.com/bitrix24/eslint-bitrix24#readme","keywords":["eslint"],"repository":{"type":"git","url":"git+https://github.com/bitrix24/eslint-bitrix24.git"},"description":"ESLint rules for the Bitrix24 Janative style guide","maintainers":[{"name":"compote2","email":"compote@gmail.com"},{"name":"vovkabelov","email":"i@vovkabelov.ru"}],"readme":"# @bitrix24/eslint-plugin-bitrix24-janative\n\nCustom ESLint rules for Bitrix24 JaNative (mobile) development.\n\nCompatible with ESLint 8 and ESLint 9.\n\n## Installation\n\n```bash\nnpm install --save-dev @bitrix24/eslint-plugin-bitrix24-janative\n```\n\nThis plugin is included automatically when using [@bitrix24/eslint-config-bitrix24-mobile](https://github.com/bitrix24/eslint-bitrix24/tree/main/packages/eslint-config-bitrix24-mobile). Manual installation is only needed if you want to use the rules independently.\n\n## Rules\n\n| Rule | Level in the mobile preset | Description |\n|------|------|-------------|\n| `deps-unresolved-require` | error | The required path does not exist: nothing declares it with `jn.define()` |\n| `deps-missing-entry` | error | The dependency is used but not listed in `deps.php` |\n| `deps-external-bundle` | error | The required file is a bundle file of another extension |\n| `deps-unused-entry` | error | `deps.php` lists a path nothing in the extension uses |\n| `deps-non-canonical-require` | error | The path is not the name the target file declares |\n| `no-global-require` | error | Disallow top-level `require()` calls outside of `jn.define()` |\n| `no-static-variable-in-class` | off | Disallow static variable declarations in classes |\n\nA repository that has not been through `janative-deps sync` yet will fail on the entries it\naccumulated before the rules existed. Run `janative-deps sync` once over the mobileapp tree\nand commit the result before turning the preset on.\n\n### How the dependency rules read the code\n\nA dependency is a `require()` call with a string literal, or an `@deps path` annotation in a\ncomment. `jn.require()` counts the same: it is the global form, used by the code living\noutside a `jn.define()`. A template string cannot be read — that is what `@deps` exists for.\n`requireLazy()` and `jn.import()` are lazy loading, never a dependency of the file, and never\ngo into `deps.php`. Paths starting with `native/` are outside the project and are not looked\nfor.\n\nThe source is parsed rather than searched through as text, so a call split across lines is\nstill a call and the same words inside a template string are not. A file that does not parse\nfalls back to a text scan rather than being skipped.\n\nAn extension asking for its own name depends on nothing, so no entry is expected for it. When\ntwo files of the repository declare the same name, the one inside the extension asking for it\nwins over the namesake.\n\nThe checks form a chain, so a single request produces a single verdict: an unresolved path\nsays nothing about `deps.php`, and a bundle file of another extension is reported as such\nrather than as a missing entry.\n\n`deps-unused-entry` judges the extension as a whole and reports once, at its entry point\n(`extension.js` or `component.js`): a path unused by one file may well be used by its\nneighbour. An entry marked `// @keep` on its line is never reported. An extension that calls\n`requireLazy()` keeps `require-lazy` in `deps.php` without ever requiring it.\n\nAn entry is never called unused while the code asks for it, whatever else is wrong with the\nrequest — an unresolved path, a bundle file of a neighbour, a native module. Those have rules\nof their own, and removing the entry as well would take out a line the build needs.\n\n## Command\n\n```bash\nnpx janative-deps check [path...]     # report what does not match deps.php\nnpx janative-deps sync  [path...]     # write deps.php to match the code\n```\n\n`check` is what the rules report, applied to whole directories rather than a single file.\nEvery finding is an error and exits with `1`, matching the preset where every rule is an\nerror — a commit the rules would fail must not slip through the command either. It also\ncatches what the rules cannot: a commit that touches `deps.php` alone, without any\nJavaScript for ESLint to look at, and an entry listed more than once.\n\n`sync` writes the file. Missing dependencies are added in the canonical section order\n(`components` → `extensions` → `bundle`), unused entries are removed except the ones marked\n`@keep`, repeat listings of the same entry are collapsed into the first one, a flat file\nwithout sections stays flat, and a file left with nothing to list is deleted. Formatting,\nquote style, comments and line endings of an existing file are preserved: entries are\ninserted and removed as point edits, not by rewriting the file.\n\n| Option | Meaning |\n|--------|---------|\n| `--dry-run` | with `sync`, report the changes without writing them |\n| `--quiet` | report only the summary |\n| `-h`, `--help` | show usage |\n\nPaths default to the current directory. Pointing the command at a repository root visits every\nextension of the mobileapp tree.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}