Closed retrokiller543 closed 1 month ago
frontend/
src/
components/
Button.vue
views/
Home.vue AboutUs.vue
stores/
userStore.js
router/
index.js
assets/
images/ fonts/
camelCase: createUser
, handleClick
, userDetails
, getUserInfo
PascalCase: HeaderComponent
, CreateUser.vue
kebab-case: create-user
, @user-clicked
UPPER_SNAKE_CASE: API_KEY
, MAX_RETRIES
HTML
create-user
JavaScript
createUser
Components
CreateUser.vue
CSS
font-size: 16px;
HeaderComponent
, MainContent
, FooterComponent
buttonClass
, handleClick
, authButtons
size
prop can accept small
, medium
, or large
.
props: {
size: {
type: String,
validator(value) {
return ['small', 'medium', 'large'].includes(value);
}
}
}
Relative paths for components within the same folder. Absolute paths (using aliases) for imports from different directories. Example:
import Button from '@/components/Button.vue';
File Structure: Organize Vue files logically. Code Structure: Follow the order of HTML, JavaScript, and CSS. Naming Conventions: Use distinct naming conventions for different elements to avoid confusion. Formatting: Ensure code style consistency using ESLint and Prettier.
Basic Outline
You need to discuss how you are going to work with the code and come to an agreement on what each of you should do. For example one of you focus on the login page while the other person makes the landing page.
Coding Conventions
When coding in a team its really important that everyone follows a common set of coding conventions, this makes it easier to work with other peoples code. A good starting ground is to see what are the conventions of the language used, for javascript its common to use
camelCase
as the naming convention.Try to setup some OCD guidelines that everyone can agree on, for example should everything be as compact as possible or can it be more spaced out for better readability.