Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Show errors for line stacked – not just one per line #26

Open
jukben opened this issue Mar 16, 2019 · 0 comments
Open

Show errors for line stacked – not just one per line #26

jukben opened this issue Mar 16, 2019 · 0 comments
Labels
bug Something isn't working import-group-order

Comments

@jukben
Copy link
Contributor

jukben commented Mar 16, 2019

Because in #25 we introduce possibility of multiple errors per one line. We should be able to report it correctly.

doesItFollowConvention method needs to be updated accordingly.

@jukben jukben added import-group-order bug Something isn't working labels Mar 16, 2019
jukben added a commit that referenced this issue Mar 26, 2019
This PR introduce aditional check for named imports – they should be ordered alphabetically too. Has fixer.

In this PR is also fix, because asterisk imports were sorted wrongly. (The AST is really crazy for this case)

e.g:

```tsx
import * as X, { x, y, z } from 'XY';
import { x, y, z } from 'XY';
```

@karelskopek gonna be happy I guess. 🚀 

This also introduce very minor bug (#26) – in case where you have wrongly ordered named imports you won't get info about that you have wrongly ordered whole line. You get just one error per lime. Fixer works correctly tho. It's low prio, because everyone should use autofixer instead of manual fixing. ([issue could be observed here, as you can see, it gets fixed correctly](https://github.com/productboardlabs/tslint-pb/pull/25/files#diff-50eda79059f42d010ea9aaf07797da76R4))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working import-group-order
Development

No branches or pull requests

1 participant