0.3.2 • Published 1 year ago
oaf2-test v0.3.2
Oro ReactJS Starter
This is a template repository with setup of all basic tools which we usually need in our frontend web applications.
What's inside?
Hooks to maintain code sanity
- ESLint with Airbnb guidelines (ES12 + ReactJS)
- Husky as pre-commit hook
- GitCZ as commitzen
- Typescript
- VS-Code config and Prettier settings
Tools to make life easier
How to use?
Installation
Clone the repo and run these commands
npm install
npm run husky-install
Setup completed
Advice on making commits
To make your commits more beautiful and structured, we recommend using git-cz commitzen. Just run this to make a commit
git add .
npm run commit // OR just run => git cz
Rules for naming files & folders along with the structure we follow
Advicable to read naming nomenclature from Airbnb React/JSX Style Guide
- Always use
kebab-case
for naming folders, except naming components. This is because we would be naming components based in their folder names and we want them inPascalCase
only. - For files, we use a defauly
camelCase
convention with these exceptions:- Component files in
PascalCase
- Wrapper component files in
withCamelCase
always starting with awith
. - Test files in
kebab-case
- Component files in
/src
/assets
/images
/files
...
/components
/PascalCaseComponentName
index.tsx
component-name.test.tsx
/contexts
/name-context
index.tsx
interfaces.ts
name-context.test.tsx
/interfaces
groupName.ts
/lib
libraryName.ts
/pages
/PascalCaseComponentName
index.tsx
component-name.test.tsx
/utils
constants.ts
helper.ts
/components
/PascalCaseComponentName
index.tsx
component-name.test.tsx
/routes
index.tsx
PrivateRoutes.tsx
ApplicationRoutes.tsx
/services
/group-name
actionServiceName.ts
/styles
index.css
/utils
constants.ts
helper.ts
/wrappers
withWrapperName.ts
index.tsx