Skip to content

Auto import uses camel case for lowercased filenames instead of pascal case which is against airbnb guidelines #20967

Closed

Description

@mjbvz

From Josh Unger (@joshunger) on December 25, 2017 13:47

  • VSCode Version: Code 1.19.1 (0759f77bb8d86658bc935a10a64f6182c5a1eeba, 2017-12-19T09:35:14.671Z)
  • OS Version: Darwin x64 16.7.0
  • Extensions:
Extension Author (truncated) Version
vscode-eslint dba 1.4.3
prettier-vscode esb 1.0.1
intellij-idea-keybindings k-- 0.2.17
debugger-for-chrome msj 4.0.0
vscode-fileutils sle 2.7.1

Steps to Reproduce:

  1. Create a file called 'airbnb-style-guide.js` with the following content -
const AirbnbStyleGuide = {
  es6: {
  },
};

export default AirbnbStyleGuide;
  1. Create a second file and start typing "Air" and notice auto complete.

EXPECTING: import AirbnbStyleGuide from './airbnb-style-guide.js
ACTUAL: import airbnbStyleGuide from "./airbnb-style-guide";

image
dec-25-2017 06-55-28
image

https://github.com/airbnb/javascript#naming--PascalCase-singleton

I'm guessing this is filename guessing since a file called AirbnbStyleGuide.js works correctly.

Reproduces without extensions: Yes/No

Copied from original issue: microsoft/vscode#40810

Activity

  1. added
    VS Code Tracked
    and removed on Jan 2, 2018
  2. ghost added
    Bug
    on Jan 3, 2018
  3. ghost added
    Fixed
    on Jan 3, 2018
  4. ghost closed this as completedin #20987on Jan 3, 2018
  5. locked and limited conversation to collaborators on Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugFixedVS Code Tracked

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions