Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_js_analyze): noUselessThisAlias #4758

Closed
wants to merge 1 commit into from
Closed

feat(rome_js_analyze): noUselessThisAlias #4758

wants to merge 1 commit into from

Conversation

Conaclos
Copy link
Contributor

@Conaclos Conaclos commented Aug 7, 2023

Summary

This closes #4481 by implementing noUselessThisAlias.
As discussed in #4481 we diverge from eslint and unicorn by allowing this aliasing where required.

The rule ignores complex cases such as:

function f() {
    const [self] = [this];
    return () => {
        self.g();
    }
}

The rule could be smarter. However, this code is unlikely to exist.

Test Plan

Tests included.

@netlify
Copy link

netlify bot commented Aug 7, 2023

Deploy Preview for docs-rometools ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 0d48ebf
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/64d21f29fcdf830008969033
😎 Deploy Preview https://deploy-preview-4758--docs-rometools.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added A-Website Area: website and documentation A-Linter Area: linter L-JavaScript Langauge: JavaScript A-Project Area: project configuration and loading A-Diagnostic Area: errors and diagnostics labels Aug 7, 2023
@Conaclos Conaclos requested a review from ematipico August 7, 2023 17:04
@Conaclos Conaclos closed this Aug 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Diagnostic Area: errors and diagnostics A-Linter Area: linter A-Project Area: project configuration and loading A-Website Area: website and documentation L-JavaScript Langauge: JavaScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📎 Implement noThisAlias, @typescript-eslint/no-this-alias
1 participant