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

Closed
BlackHole1 opened this issue Jun 6, 2021 · 5 comments · Fixed by #1003
Closed

[refactor]: adjustment of file name specification #714

BlackHole1 opened this issue Jun 6, 2021 · 5 comments · Fixed by #1003
Assignees
Labels
good first issue Good for newcomers question Further information is requested

Comments

@BlackHole1
Copy link
Collaborator

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
@BlackHole1 BlackHole1 added good first issue Good for newcomers question Further information is requested labels Jun 6, 2021
@hyrious
Copy link
Member

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
Collaborator Author

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

@hyrious
Copy link
Member

hyrious commented Jun 7, 2021

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

It should be kebab-case.

@BlackHole1
Copy link
Collaborator Author

@crimx @Cheerego7 What do you guys think?

@crimx
Copy link
Member

crimx commented Oct 15, 2021

I agree with @hyrious .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants