mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-10 11:33:04 +00:00

The following cases are covered: - ThemedComponent wrapper selectors must not start with ds-themed- - Base component selectors must start with ds-base- - Themed component selectors must start with ds-themed- - The ThemedComponent wrapper must always be used in HTML - The ThemedComponent wrapper must be used in TypeScript _where appropriate_: - Required - Explicit usages (e.g. modal instantiation, routing modules, ...) - By.css selector queries (in order to align with the HTML rule) - Unchecked - Non-routing modules (to ensure the components can be declared) - ViewChild hooks (since they need to attach to the underlying component) All rules work with --fix to automatically migrate to the new convention This covers most of the codebase, but minor manual adjustment are needed afterwards
9 lines
826 B
Markdown
9 lines
826 B
Markdown
# ESLint testing fixtures
|
|
|
|
The files in this directory are used for the ESLint testing environment
|
|
- Some rules rely on registries that must be built up _before_ the rule is run
|
|
- In order to test these registries, the fixture sources contain a few dummy components
|
|
- The TypeScript ESLint test runner requires at least one dummy file to exist to run any tests
|
|
- By default, [`test.ts`](./src/test.ts) is used. Note that this file is empty; it's only there for the TypeScript configuration, the actual content is injected from the `code` property in the tests.
|
|
- To test rules that make assertions based on the path of the file, you'll need to include the `filename` property in the test configuration. Note that it must point to an existing file too!
|
|
- The `filename` must be provided as `fixture('src/something.ts')` |