New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: import { ,ofSubject } from 'rxjs'; #33
bug: import { ,ofSubject } from 'rxjs'; #33
Comments
Hi! When I tried to reproduce your issue, I got this: import { of,Subject } from 'rxjs'; There must be something different in your environment. |
Thanks for the fast reply. That's interesting. Using this eslint config: {
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "simple-import-sort", "prettier"],
"extends": ["plugin:prettier/recommended", "plugin:@typescript-eslint/recommended"],
"rules": {
"simple-import-sort/sort": "error",
"prettier/prettier": "error"
}
}
|
This seems to only happen when using the TypeScript parser. This test case fails: https://github.com/lydell/eslint-plugin-simple-import-sort/compare/typescript-issue |
I reduced it to this minimal typescript eslint config to reproduce it: {
"plugins": ["@typescript-eslint", "simple-import-sort"],
"extends": ["plugin:@typescript-eslint/recommended"],
"rules": {
"simple-import-sort/sort": "error"
}
}
|
Change |
Just tested it with the even more minimal config ( Still got the issue ... Output: import { ,ofSubject } from 'rxjs'; {
"plugins": ["@typescript-eslint", "simple-import-sort"],
"extends": ["plugin:@typescript-eslint/base"],
"rules": {
"simple-import-sort/sort": "error"
}
} |
Yes, that’s what I meant. |
Also using the typescript parser and ending up with imports like this: import { attr, belongsTo,hasMany } from Model from '@ember-data/model'; starting from: import Model from '@ember-data/model';
import { attr, hasMany, belongsTo } from '@ember-data/model'; |
@runspired I get this output: import Model from '@ember-data/model';
import { attr, belongsTo,hasMany } from '@ember-data/model'; There must be something different in your environment. |
@lydell I realized it was likely a similar parser issue but with a related plugin: turning off |
This is due to a bug in @typescript-eslint/parser. PR to fix it here: typescript-eslint/typescript-eslint#1487 Once that’s merged and released, you should be able to update @typescript-eslint/parser to fix the problem, and I’ll add a test for it and close this issue. |
Upgrade to @typescript-eslint/parser 2.18.0 and your problem should be gone! |
Issue is resolved. Thanks for the great work! |
Thanks for this awesome plugin.
Ran into this bug...
Using version
5.0.0
Input:
Output:
The text was updated successfully, but these errors were encountered: