Skip to content

index.{js,ts,jsx,tsx} always on top #128834

@drpicox

Description

@drpicox

When we work with JS or TS, we usually do:

import { symbol } from 'some/folder'

And in the some/folder there is a index.ts that does:

export * from './aThing';
export * from './bThing';
...
export * from './yThing';
export * from './zThing';

The problem, is that when we look at the folder in the Explorer we see the files like:

- some/folder
  - aThing.ts
  - bThing.ts
  - index.ts
  - yThing.ts
  - zThing.ts

It is difficult to spot and edit the index.ts. It is like it has camouflage.

The problem is:

  1. The file follows a different kind of naming (the one forced by node importing rules) from the rest files from the package
  2. It defines what the folder is itself, so it breaks apart the same single concept

The proposal is to reorder the contents of the folder so index.{js,ts,jsx,tsx} is always just below the folder name:

- some/folder
  - index.ts
  - aThing.ts
  - bThing.ts
  - yThing.ts
  - zThing.ts

Metadata

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)file-explorerExplorer widget issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions