mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
1.0 KiB
1.0 KiB
DSpace ESLint plugins > TypeScript rules > dspace-angular-ts/alias-imports
Unclear imports should be aliased for clarity
Examples
Valid code
correctly aliased imports
import { of as observableOf } from 'rxjs';
Invalid code & automatic fixes
imports without alias
import { of } from 'rxjs';
Will produce the following error(s):
This import must be aliased
Result of yarn lint --fix
:
import { of as observableOf } from 'rxjs';
imports under the wrong alias
import { of as ofSomething } from 'rxjs';
Will produce the following error(s):
This import uses the wrong alias (should be {{ local }})
Result of yarn lint --fix
:
import { of as observableOf } from 'rxjs';