Skip to content

Add rule for filname case convention#26

Closed
mpfeil wants to merge 9 commits intodevfrom
filename-conventions
Closed

Add rule for filname case convention#26
mpfeil wants to merge 9 commits intodevfrom
filename-conventions

Conversation

@mpfeil
Copy link
Copy Markdown
Contributor

@mpfeil mpfeil commented Apr 28, 2023

Introduces new eslint rules that files should be named kebab case style.

Also all files were renamed violating this rule. Files within the /app/routes folder are ignore because we have some remix.run specific conventions.

This PR is skipping rules for variables because it is pretty hard to configure. So please stick to the convention describe in the issue.

Components and named exports should be named: PascalCase e.g. AlertDialog, DropdownMenu (https://betterprogramming.pub/string-case-styles-camel-pascal-snake-and-kebab-case-981407998841)

⚠️ Also be aware if you create a new component within a new folder don´t name them identically.
For example: You want to include a DatePicker component

You have the following options:

  • Create a file named date-picker.tsx at /app/components
    or
  • Create a folder named date-picker at /app/components
  • Create a file called index.tsx within the date-picker folder and export the component inside the index.tsx

Closes #22

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2023 0:19am

@mpfeil mpfeil marked this pull request as ready for review April 28, 2023 12:13
@mpfeil mpfeil requested a review from fab-scm April 28, 2023 12:21
@mpfeil
Copy link
Copy Markdown
Contributor Author

mpfeil commented May 25, 2023

Close in favor of #34

@mpfeil mpfeil closed this May 25, 2023
@mpfeil mpfeil deleted the filename-conventions branch May 30, 2023 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant