{"_id":"@arcaauth/eslint-config-dzrv","name":"@arcaauth/eslint-config-dzrv","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@arcaauth/eslint-config-dzrv","version":"1.0.0","description":"A comprehensive ESLint configuration for full-stack TypeScript projects (React + Node.js)","main":"src/index.js","type":"module","exports":{".":"./src/index.js"},"keywords":["eslint","eslintconfig","config","typescript","react","node","fullstack","javascript","code-quality"],"author":{"name":"Dzrv Services LLP"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/arcaauth/eslint-config-dzrv.git"},"peerDependencies":{"eslint":"^9.0.0","typescript":">=5.0.0"},"peerDependenciesMeta":{"typescript":{"optional":true}},"dependencies":{"@eslint/js":"^9.17.0","@typescript-eslint/eslint-plugin":"^8.20.0","@typescript-eslint/parser":"^8.20.0","eslint-config-prettier":"^10.0.1","eslint-import-resolver-typescript":"^3.7.0","eslint-plugin-import":"^2.31.0","eslint-plugin-jsx-a11y":"^6.10.2","eslint-plugin-n":"^17.17.0","eslint-plugin-promise":"^7.2.1","eslint-plugin-react":"^7.37.4","eslint-plugin-react-hooks":"^5.1.0","eslint-plugin-security":"^3.0.1","eslint-plugin-unused-imports":"^4.1.4","globals":"^15.15.0"},"devDependencies":{"eslint":"^9.17.0","typescript":"^5.9.3"},"scripts":{"test":"cd test && npx eslint .","test:validate":"node test/test-config.test.js","validate":"node -e \"import('./src/index.js').then(m => console.log('✅ Config loaded successfully!', Object.keys(m.configs).join(', '))).catch(e => { console.error('❌ Error:', e.message); process.exit(1); })\""},"engines":{"node":">=18.0.0"},"_id":"@arcaauth/eslint-config-dzrv@1.0.0","gitHead":"b3cc1ea210e6d46b95e5d3409bb415960a7dc9aa","bugs":{"url":"https://github.com/arcaauth/eslint-config-dzrv/issues"},"homepage":"https://github.com/arcaauth/eslint-config-dzrv#readme","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-MOrtqkfbRmK32rgcSL6AZPQnZaQvpnY/cs+ap280KJ7pd0X7foyWDQkaNoajIN2+6I9oboRDxxfc/gYiFNgyAA==","shasum":"17a50d1d39d8289247b646b66c035d3a51fb285e","tarball":"https://registry.npmjs.org/@arcaauth/eslint-config-dzrv/-/eslint-config-dzrv-1.0.0.tgz","fileCount":4,"unpackedSize":21401,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHTMK7a5II2cKJuhvo7DMF/ubc2QjrTzIJ/MbQ/XqJxpAiAlfeKLDptC73vlVoawpdWAuBNUY2L59g+yLBMRqOaudw=="}]},"_npmUser":{"name":"ctrl-alt-web","email":"dzrv.music@gmail.com"},"directories":{},"maintainers":[{"name":"ctrl-alt-web","email":"dzrv.music@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-config-dzrv_1.0.0_1760528169679_0.28253595699356215"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-15T11:36:09.546Z","1.0.0":"2025-10-15T11:36:09.857Z","modified":"2025-10-15T11:36:10.228Z"},"maintainers":[{"name":"ctrl-alt-web","email":"dzrv.music@gmail.com"}],"description":"A comprehensive ESLint configuration for full-stack TypeScript projects (React + Node.js)","homepage":"https://github.com/arcaauth/eslint-config-dzrv#readme","keywords":["eslint","eslintconfig","config","typescript","react","node","fullstack","javascript","code-quality"],"repository":{"type":"git","url":"git+https://github.com/arcaauth/eslint-config-dzrv.git"},"author":{"name":"Dzrv Services LLP"},"bugs":{"url":"https://github.com/arcaauth/eslint-config-dzrv/issues"},"license":"MIT","readme":"# eslint-config-dzrv\n\nA comprehensive, opinionated ESLint configuration for modern full-stack TypeScript projects. Supports React frontends, Node.js backends, and everything in between.\n\n## Features\n\n✨ **ESLint v9** compatible (flat config format)  \n🎯 **Full-stack support** - Frontend (React) + Backend (Node.js)  \n📘 **TypeScript first** - Full TypeScript support with type-aware linting  \n🔒 **Security focused** - Built-in security rules  \n♿ **Accessibility** - JSX-A11Y rules for React components  \n🎨 **Prettier compatible** - No conflicts with Prettier formatting  \n📦 **Zero config** - Sensible defaults, customize as needed  \n🔧 **Modular** - Use only what you need  \n\n## Installation\n\n```bash\nnpm install --save-dev eslint-config-dzrv eslint@^9\n```\n\n## Usage\n\n### Quick Start\n\nCreate an `eslint.config.js` file in your project root:\n\n```javascript\nimport fullstack from 'eslint-config-dzrv';\n\n// Use the recommended fullstack preset\nexport default fullstack.configs['recommended-fullstack'];\n```\n\n### Available Presets\n\n#### Recommended Presets (Most Common)\n\n```javascript\nimport fullstack from 'eslint-config-dzrv';\n\n// Full-stack TypeScript + React + Node.js\nexport default fullstack.configs['recommended-fullstack'];\n\n// Frontend only (React + TypeScript)\nexport default fullstack.configs['recommended-react-typescript'];\n\n// Backend only (Node.js + TypeScript)\nexport default fullstack.configs['recommended-node-typescript'];\n\n// Basic JavaScript (no frameworks)\nexport default fullstack.configs['recommended'];\n```\n\n#### Individual Configurations\n\nFor more control, compose your own configuration:\n\n```javascript\nimport fullstack from 'eslint-config-dzrv';\n\nexport default [\n  fullstack.configs.ignores,\n  fullstack.configs.base,\n  fullstack.configs.typescript,\n  fullstack.configs.react,\n  fullstack.configs.node,\n  fullstack.configs.prettier,\n  \n  // Your custom overrides\n  {\n    rules: {\n      'no-console': 'off',\n    },\n  },\n];\n```\n\n### Configuration Examples\n\n#### Monorepo with Frontend and Backend\n\n```javascript\nimport fullstack from 'eslint-config-dzrv';\n\nexport default [\n  ...fullstack.configs['recommended-fullstack'],\n  \n  // Backend-specific overrides\n  {\n    files: ['backend/**/*.ts', 'server/**/*.ts', 'api/**/*.ts'],\n    rules: {\n      'no-console': 'off',\n    },\n  },\n  \n  // Frontend-specific overrides\n  {\n    files: ['frontend/**/*.tsx', 'src/**/*.tsx', 'components/**/*.tsx'],\n    rules: {\n      'react/prop-types': 'off',\n    },\n  },\n];\n```\n\n#### React-only Project\n\n```javascript\nimport fullstack from 'eslint-config-dzrv';\n\nexport default [\n  ...fullstack.configs['recommended-react-typescript'],\n  \n  {\n    rules: {\n      'react-hooks/exhaustive-deps': 'error', // Stricter hook deps\n    },\n  },\n];\n```\n\n#### Node.js API Server\n\n```javascript\nimport fullstack from 'eslint-config-dzrv';\n\nexport default [\n  ...fullstack.configs['recommended-node-typescript'],\n  \n  {\n    rules: {\n      'complexity': ['warn', 25], // Allow more complexity in API routes\n    },\n  },\n];\n```\n\n## Configuration Modules\n\n### Base Config\nCore JavaScript/ES2021+ rules including:\n- Import ordering and organization\n- Unused import detection\n- Security checks\n- Best practices enforcement\n- Code quality rules\n\n### TypeScript Config\nTypeScript-specific rules:\n- Type-safe linting\n- Consistent type imports\n- Promise handling\n- Type inference optimization\n\n### Node.js Config\nBackend-specific rules:\n- Node.js API best practices\n- Promise handling\n- File system operations\n- Process and buffer globals\n\n### React Config\nFrontend React rules:\n- React 17+ (no React import needed)\n- Hooks linting\n- JSX best practices\n- Accessibility (a11y) checks\n\n### Prettier Config\nDisables all rules that conflict with Prettier formatting.\n\n## Rules Philosophy\n\n### Error vs Warning\n- **Errors**: Security issues, bugs, breaking code\n- **Warnings**: Code quality, maintainability, conventions\n\n### Complexity Rules\n- Base: `complexity: 15` (general code)\n- Node: `complexity: 20` (backend routes can be complex)\n- React: Uses base settings\n\n### Console Usage\n- **Frontend**: `warn` (should use proper logging)\n- **Backend**: `off` (console is acceptable)\n\n## TypeScript Support\n\nThis config requires TypeScript projects to have a `tsconfig.json`. The config uses `projectService: true` for type-aware linting.\n\n### Recommended tsconfig.json\n\n```json\n{\n  \"compilerOptions\": {\n    \"target\": \"ES2022\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"bundler\",\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true,\n    \"forceConsistentCasingInFileNames\": true\n  }\n}\n```\n\n## Peer Dependencies\n\n- `eslint` ^9.0.0\n\n## Migration from ESLint v8\n\nESLint v9 uses the new flat config format. Key changes:\n\n1. **Config file**: `.eslintrc.*` → `eslint.config.js`\n2. **Format**: JSON/YAML → JavaScript (ES modules)\n3. **Extends**: String references → Direct imports\n\n### Before (v8)\n```json\n{\n  \"extends\": [\"some-config\"],\n  \"rules\": {}\n}\n```\n\n### After (v9)\n```javascript\nimport someConfig from 'some-config';\n\nexport default [\n  someConfig,\n  {\n    rules: {},\n  },\n];\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n## License\n\nMIT © [Your Name]\n\n## Acknowledgments\n\nInspired by:\n- [@eslint/js](https://www.npmjs.com/package/@eslint/js)\n- [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb)\n- [eslint-config-prettier](https://www.npmjs.com/package/eslint-config-prettier)\n- [eslint-config-dzrv](https://github.com/Dzrv-Digital/eslint-config-dzrv)\n\n## Related Packages\n\n- [Prettier](https://prettier.io/) - Code formatter\n- [TypeScript ESLint](https://typescript-eslint.io/) - TypeScript support\n- [ESLint](https://eslint.org/) - Pluggable linting utility\n\n","readmeFilename":"README.md","_rev":"1-80529826dd88ba1a1fc93ef9e692b4cb"}