{"_id":"@civitta-hungary/dinalint","name":"@civitta-hungary/dinalint","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.7":{"name":"@civitta-hungary/dinalint","version":"1.0.7","description":"Universal in-house linting and formatting presets for React + TypeScript projects.","type":"module","main":"./src/eslint/index.js","bin":{"dinalint":"src/cli/index.js"},"exports":{"./eslint":"./src/eslint/index.js","./eslint/strict":"./src/eslint/strict.js","./prettier":"./src/prettier/index.js"},"scripts":{"lint":"eslint .","lint:fix":"eslint . --fix","test":"vitest run","format":"prettier . --write","format:check":"prettier . --check","check":"npm run lint && npm run test && npm run format:check","prepublish":"npm run check && npm version patch --no-git-tag-version"},"repository":{"type":"git","url":"git+https://github.com/digitalnatives/dinalint.git"},"keywords":["eslint","prettier","react","typescript","tailwindcss"],"author":{"name":"civitta-hungary"},"license":"MIT","publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/digitalnatives/dinalint/issues"},"homepage":"https://github.com/digitalnatives/dinalint#readme","dependencies":{"@eslint/js":"^9.39.4","eslint":"^9.39.4","eslint-config-prettier":"^10.1.8","eslint-plugin-import":"^2.32.0","eslint-plugin-jsx-a11y":"^6.10.2","eslint-plugin-prettier":"^5.5.4","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^7.0.1","eslint-plugin-tailwindcss":"^3.18.3","eslint-plugin-unused-imports":"^4.4.1","globals":"^17.5.0","prettier":"^3.8.2","tailwindcss":"^3.4.19","typescript":"^6.0.2","typescript-eslint":"^8.58.2"},"devDependencies":{"react":"^19.2.5","vitest":"^4.1.4"},"engines":{"node":"20"},"_id":"@civitta-hungary/dinalint@1.0.7","gitHead":"884748b68db80b7d4fdeaf2e4eea85350c1d7442","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-3Xcdp3Qy63oSrPkm2SOoS4XxXXRDQxryqAQgQXmimreappAZyu5yS9812j56Bo8pyP/O4InVWzdAfMtMA77CBw==","shasum":"6076f8d757a04eb75e8f613f5634694337c5ea25","tarball":"https://registry.npmjs.org/@civitta-hungary/dinalint/-/dinalint-1.0.7.tgz","fileCount":19,"unpackedSize":24254,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEk5RV/4detELtLdCGA5Ys0UbpQEqw0t2qYvFsEurKadAiEAmZNmlQuj9i93gadz49lSZa7IImTcQgl4iyS1TsY21Ow="}]},"_npmUser":{"name":"sandormarton","email":"sandor.marton@dina.agency"},"directories":{},"maintainers":[{"name":"sandormarton","email":"sandor.marton@dina.agency"},{"name":"dina-agency","email":"dev@dina.agency"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dinalint_1.0.7_1776339220036_0.5539023691351239"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-16T11:33:39.985Z","1.0.7":"2026-04-16T11:33:40.177Z","modified":"2026-04-16T11:33:40.356Z"},"maintainers":[{"name":"sandormarton","email":"sandor.marton@dina.agency"},{"name":"dina-agency","email":"dev@dina.agency"}],"description":"Universal in-house linting and formatting presets for React + TypeScript projects.","homepage":"https://github.com/digitalnatives/dinalint#readme","keywords":["eslint","prettier","react","typescript","tailwindcss"],"repository":{"type":"git","url":"git+https://github.com/digitalnatives/dinalint.git"},"author":{"name":"civitta-hungary"},"bugs":{"url":"https://github.com/digitalnatives/dinalint/issues"},"license":"MIT","readme":"# dinalint\n\nIn-house linting and formatting standards for **React** + **TypeScript** projects.\n\n`dinalint` provides shared ESLint and Prettier configuration to keep frontend projects aligned with one setup.\n\n## What v1 includes\n\n- ESLint flat config for React + TypeScript.\n- Import ordering and unused import rules.\n- React hooks rules.\n- Recommended accessibility rules.\n- Tailwind class ordering rule.\n- Shared Prettier config.\n- Fixture-based tests and CI checks for this package.\n\n## Before you start\n\n### Existing lint setup warning\n\nIf your project already has ESLint/Prettier config, remove or merge it before enabling `dinalint`.\nRunning multiple overlapping configs can create conflicting rules.\n\n### Supported toolchain\n\n- ESLint: `9.x` (currently required)\n- Node: `>=20`\n\nIf your project has `eslint@10`, `@civitta-hungary/dinalint/eslint` will throw a clear compatibility error.  \nUse `eslint@^9` until `dinalint` is upgraded for ESLint 10.\n\n---\n\n## Flow 1: Install from published npm package\n\nUse this flow when `@civitta-hungary/dinalint` is published and available in npm.\n\n### 1) Install `@civitta-hungary/dinalint`\n\n```bash\nnpm install -D @civitta-hungary/dinalint\n```\n\n```bash\npnpm add -D @civitta-hungary/dinalint\n```\n\n```bash\nyarn add -D @civitta-hungary/dinalint\n```\n\n```bash\nbun add -d @civitta-hungary/dinalint\n```\n\n### 2) Create ESLint config\n\nFor default profile (`@civitta-hungary/dinalint/eslint`):\n\n```js\nimport dinalint from \"@civitta-hungary/dinalint/eslint\";\n\nexport default dinalint;\n```\n\nFor strict profile (`@civitta-hungary/dinalint/eslint/strict`), which adds type-aware linting and stricter rule severities:\n\n```js\nimport dinalintStrict from \"@civitta-hungary/dinalint/eslint/strict\";\n\nexport default dinalintStrict;\n```\n\nUse strict profile when your project has a valid `tsconfig.json` and you want CI-grade enforcement.\n\n### 3) Create Prettier config\n\nCreate `.prettierrc.mjs`:\n\n```js\nimport prettierConfig from \"@civitta-hungary/dinalint/prettier\";\n\nexport default prettierConfig;\n```\n\n### 4) Add scripts in `package.json`\n\nUse `dinalint` wrapper commands so scripts are package-manager-agnostic and robust:\n\n```json\n{\n  \"scripts\": {\n    \"lint\": \"dinalint lint .\",\n    \"lint:flex\": \"dinalint lint:flex .\",\n    \"lint:fix\": \"dinalint lint . --fix\",\n    \"format\": \"dinalint format .\",\n    \"format:check\": \"dinalint format:check .\",\n    \"check\": \"dinalint check .\",\n    \"check:flex\": \"dinalint check:flex .\"\n  }\n}\n```\n\nUse `check:flex` when you want the full check pipeline but with these two rules temporarily disabled:\n\n- `func-style`\n- `custom-rules/exported-react-component-first`\n\nFor PR gate scripts (strictest recommended quality pipeline), add:\n\n```json\n{\n  \"scripts\": {\n    \"lint:strict\": \"eslint \\\"src/**/*.{ts,tsx}\\\" --max-warnings=0\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"imports:check\": \"ts-unused-exports ./tsconfig.json\",\n    \"check:strict\": \"npm run format:check && npm run lint:strict && npm run imports:check && npm run typecheck\"\n  }\n}\n```\n\n### 5) Initialize editor defaults\n\nRun in the consumer project:\n\n```bash\nnpx dinalint init\n```\n\nThis creates a `.editorconfig` in the current project.\n\nIf the file already exists and you want to replace it:\n\n```bash\nnpx dinalint init --force\n```\n\n### 6) Verify setup\n\nRun:\n\n```bash\nnpm run check\n```\n\nIf your project is not npm-based, run the equivalent for your package manager:\n\n```bash\npnpm run check\n```\n\n```bash\nyarn run check\n```\n\n```bash\nbun run check\n```\n\n---\n\n## Flow 2: Local install using `npm pack` (without publishing changes)\n\nUse this flow when testing `@civitta-hungary/dinalint` from local source without publishing to npm.\n\n### 1) Pack in `dinalint` repository\n\nIn the `dinalint` repo:\n\nRun the prepublish release step (checks + patch version bump):\n\n```bash\nnpm run prepublish\n```\n\nThis runs:\n\n- `npm run check`\n- `npm version patch --no-git-tag-version`\n\nThen pack:\n\n```bash\nnpm pack\n```\n\nThis creates a tarball such as `civitta-hungary-dinalint-1.0.1.tgz`.\n\n### 2) Install tarball in consumer project\n\nIn the consumer project:\n\n```bash\nnpm install -D /absolute/path/to/dinalint/civitta-hungary-dinalint-1.0.1.tgz\n```\n\n```bash\npnpm add -D /absolute/path/to/dinalint/civitta-hungary-dinalint-1.0.1.tgz\n```\n\n```bash\nyarn add -D /absolute/path/to/dinalint/civitta-hungary-dinalint-1.0.1.tgz\n```\n\n```bash\nbun add -d /absolute/path/to/dinalint/civitta-hungary-dinalint-1.0.1.tgz\n```\n\n### 3) Apply the same setup steps as Flow 1\n\nAfter tarball install, repeat Flow 1 steps:\n\n1. Create `eslint.config.js`.\n2. Create `.prettierrc.mjs`.\n3. Add scripts.\n4. Run `dinalint init`.\n5. Run `check`.\n\n### 4) Uninstall later\n\n```bash\nnpm uninstall @civitta-hungary/dinalint\n```\n\n```bash\npnpm remove @civitta-hungary/dinalint\n```\n\n```bash\nyarn remove @civitta-hungary/dinalint\n```\n\n```bash\nbun remove @civitta-hungary/dinalint\n```\n\n---\n\n## Turborepo guidance\n\nIn Turborepo, each frontend package should define:\n\n- Local `eslint.config.js` importing `@civitta-hungary/dinalint/eslint`.\n- Local Prettier config importing `@civitta-hungary/dinalint/prettier`.\n\nRoot-level scripts can use turbo filters, for example:\n\n```json\n{\n  \"scripts\": {\n    \"lint\": \"turbo run lint\",\n    \"format:check\": \"turbo run format:check\"\n  }\n}\n```\n\n## Manual release checklist (v1)\n\n1. Run prepublish (checks + patch bump):\n   - `npm run prepublish`\n2. (Recommended) remove local tarballs after local testing:\n   - `rm -f *.tgz`\n3. (Optional) verify package contents:\n   - `npm pack --dry-run`\n4. Publish:\n   - `npm publish`\n5. Add short release notes in the changelog section or release description.\n","readmeFilename":"README.md","_rev":"1-0724ff4fba1d189aad0d107f817bf4ad"}