no-useless-rename triggered when there's no rename
See original GitHub issueWhat version of ESLint are you using? v2.11.0
What parser (default, Babel-ESLint, etc.) are you using? Default (babel-eslint shows the same issue)
Please show your full configuration:
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
"no-useless-rename": 1
}
}
What did you do? Please include the actual source code causing the issue.
import Foo from 'foo';
import {bar as otherBar} from 'bar';
import {fooBar} from 'foo-bar';
import {baz as baz} from 'baz';
What did you expect to happen? Just one warning in line 4.
What actually happened? Please include the actual, raw output from ESLint.
/path-to-the-file/index.js
3:9 warning Import fooBar unnecessarily renamed no-useless-rename
4:9 warning Import baz unnecessarily renamed no-useless-rename
✖ 2 problems (0 errors, 2 warnings)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:8 (8 by maintainers)
Top Results From Across the Web
no-useless-rename - ESLint - Pluggable JavaScript Linter
Rule Details. This rule disallows the renaming of import, export, and destructured assignments to the same name.
Read more >Folders and documents enter rename mode when left-clicked
Some setting in Windows is getting turned on/off by a key combination, though I have never heard of such a setting and it...
Read more >25 Best Power Automate Tips and Tricks You Should Know
Always rename your action and always rename them right away after creating them. This is important as dependent actions you might add later...
Read more >no-useless-rename - ESLint Config
This rule disallows the renaming of import, export, and destructured assignments to the same name. What ESLint should do when it catches the...
Read more >Renaming Imports and Proper Variable Declaration | by John ...
No Renaming Import, Export, and Destructured Assignments to the Same ... them in useless ways by renaming them to the same name as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Mmmm, while what @kaicataldo says is generally true, I think in this case I was relying on a parser internal (reference equality), so we should probably fix that. Sorry, my fault.
PR is coming.
Confirmed.