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

chore: new file naming convention #514

Closed
wants to merge 1 commit into from
Closed

Conversation

gaboesquivel
Copy link
Contributor

@gaboesquivel gaboesquivel commented Sep 5, 2023

  • use lowercase dash separated file names
  • use file type prefixes

Lowercase, dash-separated folder names, such as components/auth-wizard. Within these folders, adhere to consistent file naming conventions, including extensions like:

  • .config.ts
  • .test.ts
  • .context.tsx
  • .type.ts
  • .service.ts
  • .lib.ts
  • .page.tsx (with the file name matching the route name, e.g., dashboard.page.tsx)
  • .hook.ts (optional, hooks following the use-something pattern are easy to identify as such)

Eg: import { NftItem } from './nft-item

└── nft-item
    ├── index.ts   ( exports )
    ├── nft-item.tsx
    ├── nft-item-header.tsx
    ├── nft-item-footer.tsx
    ├── nft-item-main.tsx
    ├── use-nft-item.ts
    ├── nft-item.type.ts
    ├── nft-item.context.tsx
    └── nft-item.test.tsx

github checkout action fails due this issue. #514

https://dev.to/peaceiris/the-case-sensitivity-of-the-github-actions-runner-3e9f

I suppose once this is merged the next pr will work well. All tests are passing locally.

image

@netlify
Copy link

netlify bot commented Sep 5, 2023

Deploy Preview for contracts-ui failed.

Name Link
🔨 Latest commit 5c910a7
🔍 Latest deploy log https://app.netlify.com/sites/contracts-ui/deploys/64f6868deacb760008937422

@cypress
Copy link

cypress bot commented Sep 5, 2023

Passing run #228 ↗︎

0 61 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

chore: new file naming convention
Project: Contracts UI Commit: 5c910a78e2
Status: Passed Duration: 02:06 💡
Started: Sep 5, 2023 1:59 AM Ended: Sep 5, 2023 2:01 AM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@gaboesquivel gaboesquivel changed the title chore: use lowercase dash separated file names chore: new file naming convention Sep 5, 2023
Copy link
Contributor

@statictype statictype left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the problem is that the project doesn't build for production.
if you run yarn build locally you get hints as to why that happens

@statictype statictype closed this Oct 31, 2023
@peetzweg peetzweg deleted the file-naming branch April 15, 2024 10:46
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.

2 participants