mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
Create central entity registry to eliminate scattered configuration across 7+ files. This reduces technical debt and makes adding new entity types easier. Changes: - Create entity-registry.ts with ENTITY_CONFIGS containing all 17 entity types with their adapters, selectors, and dependencies - Document storage patterns (adapter, singleton, map, array, virtual) - Migrate lww-update.meta-reducer.ts to use registry - Migrate dependency-resolver.service.ts to use registry - Migrate conflict-resolution.service.ts to use registry (removes 80-line switch statement) - Migrate validate-operation-payload.ts to use getAllPayloadKeys() - Add ESLint rule require-entity-registry to detect missing entity types and typos in entityType properties Net reduction: 112 lines of code
15 lines
472 B
JavaScript
15 lines
472 B
JavaScript
/**
|
|
* Local ESLint rules for Super Productivity.
|
|
*
|
|
* These rules are loaded by eslint-plugin-local-rules.
|
|
* Usage in .eslintrc.json:
|
|
* "plugins": ["local-rules"],
|
|
* "rules": {
|
|
* "local-rules/require-hydration-guard": "warn",
|
|
* "local-rules/require-entity-registry": "warn"
|
|
* }
|
|
*/
|
|
module.exports = {
|
|
'require-hydration-guard': require('./rules/require-hydration-guard'),
|
|
'require-entity-registry': require('./rules/require-entity-registry'),
|
|
};
|