question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rule Proposal: no-useless-rename

See original GitHub issue

From 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:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kaicataldocommented, May 15, 2016

Sounds good - I can start work on this soon.

0reactions
mysticateacommented, May 14, 2016

I added accepted label since there are 3 supporters in our team.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found