Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor]: adjustment of file name specification #714

Open
BlackHole1 opened this issue Jun 6, 2021 · 4 comments
Open

[refactor]: adjustment of file name specification #714

BlackHole1 opened this issue Jun 6, 2021 · 4 comments

Comments

@BlackHole1
Copy link
Member

@BlackHole1 BlackHole1 commented Jun 6, 2021

Since we don't do any strong checks on the file names, we have the following file name forms:

  1. camelcase
  2. snake_case
  3. kebab-case
  4. Pascalcase

I think we should have a set of specifications to restrict file names.

all I can think of at the moment is:

  • Components: Pascalcase
  • script: kebab-case
  • other: camelcase
@hyrious
Copy link
Member

@hyrious hyrious commented Jun 6, 2021

Corrects:

  • camelCase
  • lowercase
  • PascalCase

IMO, filenames should always be kebab-case, like route-config.ts, to prevent bugs in case-sensitive file systems (linux). One exception is that react components can have PascalCase filenames since you won't occasionally import wrong. In conclusion:

  • Components: PascalCase
  • Everything else: kebab-case
@BlackHole1
Copy link
Member Author

@BlackHole1 BlackHole1 commented Jun 7, 2021

@hyrious what standard should be used for directory names? camelcase?

@hyrious
Copy link
Member

@hyrious hyrious commented Jun 7, 2021

@hyrious what standard should be used for directory names? camelcase?

It should be kebab-case.

@BlackHole1
Copy link
Member Author

@BlackHole1 BlackHole1 commented Jun 7, 2021

@crimx @Cheerego7 What do you guys think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants