Skip to content

Commit 46e3b15

Browse files
committed
fix: update readme
1 parent 262f0e7 commit 46e3b15

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ An ESLint plugin that enforces the use of import aliases. Also supports autofixi
5656
Aliases are a great thing to make imports more readable and you do not have to change import paths that often when a file path is changed.
5757

5858
```js
59-
import foo from '../../model/sub/foo'
60-
import bar from '../other/bar'
59+
import foo from '../../model/sub/foo';
60+
import bar from '../other/bar';
6161
```
6262

6363
changes to
6464

6565
```js
66-
import foo from '@/model/sub/foo'
67-
import bar from '@/sub/other/bar'
66+
import foo from '@/model/sub/foo';
67+
import bar from '@/sub/other/bar';
6868
```
6969

7070
Now what if you are in a bigger team or you have a lot of projects to update. Or you just want to make sure that everything is consistent. This is where a linter comes into the play. This rule allows you to detect inconsistent imports and even autofix them. This works by matching alias paths agains the imports and replacing the import paths with the first matching aliased path.

0 commit comments

Comments
 (0)