Skip to content

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

@mjbvz

Description

@mjbvz

From @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions