Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Ignore certain variables when using --noUnusedLocals #13048

Copy link
Copy link
@alinhle

Description

@alinhle
Issue body actions

I want to use destructuring of objects while being able to ignore certain parameters. But with --noUnusedLocals I get an error.

const {
  children,
  active: _a,
  ...rest,
} = props;
'_a' is declared but never used.

I formerly used the tslint rule no-unsued-variable which supported ignoring any variable having a certain pattern, e.g. any name starting with a _. As tslint deprecated no-unsued-variable in favor of noUnusedLocals I cannot rely on tslint anymore.

Is this something which can be supported, or do I need to port over something like lodash.omit?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already createdAn existing issue was already created

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.