{"_id":"@crescware/eslint-plugin-crescware-const-lower-camel-case","_rev":"3-a34389042958d77c49e639cff6c9fe6a","name":"@crescware/eslint-plugin-crescware-const-lower-camel-case","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@crescware/eslint-plugin-crescware-const-lower-camel-case","version":"0.0.1","_id":"@crescware/eslint-plugin-crescware-const-lower-camel-case@0.0.1","maintainers":[{"name":"crescware","email":"okunokentaro+npm@crescware.com"}],"dist":{"shasum":"e07f5f2dc05e7f205f9cb0065635f5820ca07642","tarball":"https://registry.npmjs.org/@crescware/eslint-plugin-crescware-const-lower-camel-case/-/eslint-plugin-crescware-const-lower-camel-case-0.0.1.tgz","fileCount":4,"integrity":"sha512-13Sxb3XYH7gdZst8SJWw33FMtEnM+EAkNt3lACMiF97PQAg24CXdfmNEU+hL+gRbD4tgOu2BWPe8iODFQ8Gl9A==","signatures":[{"sig":"MEQCIGIC8uOe1StS7ocMC6jevZBfJjQN8HvucAYWtHdgmNx2AiAnkrykHEVwRveQreCIkQlGK45gvd7+cc/jYHBhaLUsvA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7959},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":"./dist/index.js"},"gitHead":"16763e798e10690c9a772c4be307fb92088b4e8a","scripts":{"test":"vitest run","build":"rimraf dist && tsgo -p tsconfig.build.json","check":"pnpm run check:types && pnpm run check:lint && pnpm run check:knip && pnpm run test","format":"oxlint --fix && oxfmt","check:knip":"knip","check:lint":"oxlint && oxfmt --check","check:types":"tsgo -p tsconfig.json --noEmit","exec:fixtures":"oxlint -c fixtures/oxlintrc.fixtures.json --no-ignore -f json fixtures/"},"_npmUser":{"name":"crescware","email":"okunokentaro+npm@crescware.com"},"_npmVersion":"11.12.1","description":"ESLint plugin that requires every `const` declaration binding to be named in lowerCamelCase. It ships as a standard ESLint plugin and is dogfooded on its own source through [oxlint](https://oxc.rs/docs/guide/usage/linter)'s JS plugin support.","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.33.2","devDependencies":{"knip":"6.7.0","oxfmt":"0.47.0","oxlint":"1.62.0","rimraf":"6.1.3","vitest":"4.1.5","@types/node":"24.12.2","@typescript/native-preview":"7.0.0-dev.20260422.1"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-crescware-const-lower-camel-case_0.0.1_1780625384009_0.3109161434947707","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to @crescware/eslint-plugin-crescware-const-no-upper-snake-case. Please migrate."},"0.0.2":{"name":"@crescware/eslint-plugin-crescware-const-lower-camel-case","version":"0.0.2","_id":"@crescware/eslint-plugin-crescware-const-lower-camel-case@0.0.2","maintainers":[{"name":"crescware","email":"okunokentaro+npm@crescware.com"}],"dist":{"shasum":"30e40f868a205214c8c8eaba00a7978471d70de2","tarball":"https://registry.npmjs.org/@crescware/eslint-plugin-crescware-const-lower-camel-case/-/eslint-plugin-crescware-const-lower-camel-case-0.0.2.tgz","fileCount":4,"integrity":"sha512-k/ji6Y5txTZ+C2yoXdazTsyZVjRZuG9xDznJVggGqNq8mw5j8y0THlDKYPBkDZlXhFMvxTy/ipP4PVnFISEAyA==","signatures":[{"sig":"MEUCIBgoPnHMntPnZaak3wkLAaiXSFvRShFDdKCwnAAntcvXAiEAh+uFQVy9sLXudrkyB9rr44uWMzjl4tf0FnbFoiC9IZs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8751},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":"./dist/index.js"},"gitHead":"35e3037942b260687ce19504a3419e01892fb028","scripts":{"test":"vitest run","build":"rimraf dist && tsgo -p tsconfig.build.json","check":"pnpm run check:types && pnpm run check:lint && pnpm run check:knip && pnpm run test","format":"oxlint --fix && oxfmt","check:knip":"knip","check:lint":"oxlint && oxfmt --check","check:types":"tsgo -p tsconfig.json --noEmit","exec:fixtures":"oxlint -c fixtures/oxlintrc.fixtures.json --no-ignore -f json fixtures/"},"_npmUser":{"name":"crescware","email":"okunokentaro+npm@crescware.com"},"_npmVersion":"11.12.1","description":"ESLint plugin that requires every `const` declaration binding to be named in lowerCamelCase. It ships as a standard ESLint plugin and is dogfooded on its own source through [oxlint](https://oxc.rs/docs/guide/usage/linter)'s JS plugin support.","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.33.2","devDependencies":{"knip":"6.7.0","oxfmt":"0.47.0","oxlint":"1.62.0","rimraf":"6.1.3","vitest":"4.1.5","@types/node":"24.12.2","@typescript/native-preview":"7.0.0-dev.20260422.1"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-crescware-const-lower-camel-case_0.0.2_1780626619201_0.8763062123211907","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to @crescware/eslint-plugin-crescware-const-no-upper-snake-case. Please migrate."}},"time":{"created":"2026-06-05T02:09:43.884Z","modified":"2026-06-05T03:25:27.370Z","0.0.1":"2026-06-05T02:09:44.151Z","0.0.2":"2026-06-05T02:30:19.334Z"},"description":"ESLint plugin that requires every `const` declaration binding to be named in lowerCamelCase. It ships as a standard ESLint plugin and is dogfooded on its own source through [oxlint](https://oxc.rs/docs/guide/usage/linter)'s JS plugin support.","maintainers":[{"name":"crescware","email":"okunokentaro+npm@crescware.com"}],"readme":"# @crescware/eslint-plugin-crescware-const-lower-camel-case\n\nESLint plugin that requires every `const` declaration binding to be named in\nlowerCamelCase. It ships as a standard ESLint plugin and is dogfooded on its\nown source through [oxlint](https://oxc.rs/docs/guide/usage/linter)'s JS plugin\nsupport.\n\n## Rule: `crescware-const-lower-camel-case/const-lower-camel-case`\n\nEvery identifier introduced by a `const` declaration must be lowerCamelCase:\n\n- First character is a lowercase letter.\n- The rest are letters or digits only.\n- No two consecutive uppercase letters: acronyms are treated as words, so\n  `getUrl` / `userId` are required, not `getURL` / `userID`.\n- Single characters (`x`) are allowed.\n- A single trailing `$` is allowed (`form$`, `courseCategories$`) for\n  valibot-style schema variables.\n- Underscores, a leading `$`, a `$` in the middle (`foo$bar`), consecutive `$`\n  (`foo$$`), PascalCase (`MyConst`) and UPPER_CASE (`ANSWER`) are rejected.\n\n### What is checked\n\nEvery binding introduced by a `const` declaration, including:\n\n- simple bindings (`const fooBar = 1`)\n- object / array destructuring (`const { a } = o`, `const [b] = arr`)\n- renamed destructuring — the local binding, not the source key\n  (`const { id: userId } = o` checks `userId`)\n- nested patterns, default values and rest elements\n- `for (const … of …)` / `for (const … in …)` loop variables\n\n### What is not checked\n\n`let` / `var`, function parameters, object property keys, type names, type\nparameters and import bindings are out of scope.\n\n```ts\nconst myValue = 1; // ok\nconst my_value = 1; // error: must be lowerCamelCase\nconst { user_id } = resp; // error on `user_id`\nlet snake_case = 1; // ok (not a const)\n```\n\n## Usage (as a published ESLint plugin)\n\n```sh\npnpm add -D @crescware/eslint-plugin-crescware-const-lower-camel-case\n```\n\n```js\nimport constLowerCamelCase from \"@crescware/eslint-plugin-crescware-const-lower-camel-case\";\n\nexport default [\n  {\n    plugins: {\n      \"crescware-const-lower-camel-case\": constLowerCamelCase,\n    },\n    rules: {\n      \"crescware-const-lower-camel-case/const-lower-camel-case\": \"error\",\n    },\n  },\n];\n```\n\n## Stack\n\n- **Runtime**: Node.js 24 (via [mise](https://mise.jdx.dev/))\n- **Package manager**: pnpm (via corepack)\n- **Language**: TypeScript ([native preview](https://github.com/nicolo-ribaudo/tc39-proposal-type-annotations))\n- **Test**: [Vitest](https://vitest.dev/)\n- **Lint**: [oxlint](https://oxc.rs/docs/guide/usage/linter)\n- **Format**: [oxfmt](https://github.com/nicolo-ribaudo/oxfmt)\n- **Unused code**: [Knip](https://knip.dev/)\n\n## How it is built and verified\n\n- `src/index.ts` is the plugin: a self-contained ESLint rule with no runtime\n  dependencies. `pnpm build` compiles it to `dist/` (with `.d.ts`) via\n  `tsconfig.build.json`.\n- `.oxlintrc.json` loads the plugin through `jsPlugins: [\"./src/index.ts\"]` and\n  enables the rule on this repository's own source, so the plugin lints itself\n  (every `const` in `src/` is already lowerCamelCase).\n- `fixtures/*.ts` are lint fixtures: `ng-*.ts` must produce diagnostics and\n  `ok-*.ts` must produce none. They are linted with the separate\n  `fixtures/oxlintrc.fixtures.json` (all built-in categories off, only this\n  rule on) and are excluded from the main lint via `ignorePatterns`.\n- `fixtures/integration.test.ts` runs oxlint over the fixtures once and asserts\n  the exact per-file diagnostic messages.\n\n## Setup\n\n```sh\nmise install\ncorepack enable\npnpm install\n```\n\n## Scripts\n\n| Command              | Description                                    |\n| -------------------- | ---------------------------------------------- |\n| `pnpm build`         | Compile `src/index.ts` to `dist/` with `.d.ts` |\n| `pnpm check`         | Run all checks (types, lint, knip, test)       |\n| `pnpm check:types`   | Type check                                     |\n| `pnpm check:lint`    | Lint (incl. self-dogfooding) and format check  |\n| `pnpm check:knip`    | Unused files/exports check                     |\n| `pnpm exec:fixtures` | Print raw fixture diagnostics as JSON          |\n| `pnpm test`          | Run the fixture integration test               |\n| `pnpm format`        | Fix lint and format                            |\n","readmeFilename":"README.md"}