Rule Proposal: no-useless-rename
See original GitHub issueFrom disallowIdenticalDestructuringNames.
This rule will prevent to write useless renaming. Original JSCS rule is checking only object patterns, but my proposal is checking object patterns, import declarations, and export declarations.
{
"no-useless-rename": ["error", {
"ignoreDestructuring": false,
"ignoreImport": false,
"ignoreExport": false
}]
}
Valid:
let {foo: bar} = obj;
import * as foo from "foo";
import {foo as bar} from "foo";
export {foo as bar};
export {foo as bar} from "foo";
Invalid:
let {foo: foo} = obj;
import {foo as foo} from "foo";
export {foo as foo};
export {foo as foo} from "foo";
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:5 (5 by maintainers)
Top Results From Across the Web
SEC Proposed Rules
SEC Proposed Rules · Regulation NMS: Minimum Pricing Increments, Access Fees, and Transparency of Better Priced Orders · File No: S7-30-22 · Comments...
Read more >eslint-config-nicestyle - npm
A proposal of style and rules for javascript. This config is midly strict and you can overwrite or add rule if you want....
Read more >eslint rule to required imported objects to have the same name ...
The rule your looking for is filenames/match-exported . ... There are a few proposals out there for this rule idea:.
Read more >Bowing to Pressure, SEC Extends Comment Period for ...
Bowing to Pressure, SEC Extends Comment Period for Climate Change Rule Proposal ... The new comment deadline is June 17 according to SEC...
Read more >eslint-config-nicestyle - npm package - Snyk
A proposal of style and rules for javascript. This config is midly strict and you can overwrite or add rule if you want....
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
Sounds good - I can start work on this soon.
I added
accepted
label since there are 3 supporters in our team.