Skip to content

camelcase lint error on module import when deconstructing #6755

@lordgiotto

Description

@lordgiotto

ESLint version:

3.1.1


Rule:

"camelcase": [2, { "properties": "never" }]


Problem

Lint fails on module import when deconstructing properties and aliasing.

// this cause lint error
import { no_camel_case_prop as CamelCaseProp } from 'external-module';

But with 186e8f0 that rule should ignore camelcase during deconstructing.

(I know that import deconstructing is not a real object deconstructing, but probably it should follow the same rule)

For now I have to workaround this issue this way:

// this not cause lint error
import * as externalModule from 'external-module';
externalModule.no_camel_case_prop

Thank you :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyruleRelates to ESLint's core rules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions