import tseslint from 'typescript-eslint'; import angular from 'angular-eslint'; /** * ESLint now owns only the rules that are NOT dependency-graph shaped: no `any`, and * template accessibility. The architecture's **boundary** rules — bounded-context * direction (herregistratie → registratie → shared, auth/brief/beheer → shared; shared * depends on nothing), `domain/` framework-freedom, `contracts/` purity, `ui ↛ * infrastructure`, and ApiClient confinement — moved to **dependency-cruiser** (WP-38, * `.dependency-cruiser.js`): one declarative source that also emits the architecture graph * (`npm run dep:graph`) and is enforced by `npm run dep:check` (in CI). That replaced the * per-context `no-restricted-imports` blocks that had to be hand-copied (and had left * `herregistratie` uncovered). */ export default [ { ignores: [ 'dist/**', 'node_modules/**', 'storybook-static/**', '.angular/**', 'coverage/**', 'backend/**', // Generated client — owns its own /* eslint-disable */ header. 'src/app/shared/infrastructure/api-client.ts', ], }, { files: ['src/**/*.ts'], languageOptions: { parser: tseslint.parser, parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, }, plugins: { '@typescript-eslint': tseslint.plugin }, rules: { '@typescript-eslint/no-explicit-any': 'error' }, // This repo has no .html files — every template is inline. This processor // extracts each component's template string into a virtual `*.html` file, // which the template-a11y block below (`files: ['src/**/*.html']`) then lints. processor: angular.processInlineTemplates, }, // Template a11y (WP-17): the official angular-eslint accessibility bundle // (alt-text, label-has-associated-control, click/mouse-events-have-key-events, // interactive-supports-focus, valid-aria, no-autofocus, and more) linting the // virtual `.html` files the processor above extracts from inline templates. ...angular.configs.templateAccessibility.map((c) => ({ ...c, files: ['src/**/*.html'] })), // Tests legitimately use `any` to feed invalid messages/states into reducers. { files: ['src/**/*.spec.ts'], rules: { '@typescript-eslint/no-explicit-any': 'off' }, }, ];