Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
korih committed Sep 30, 2024
1 parent 72ee1d8 commit 4f05399
Show file tree
Hide file tree
Showing 77 changed files with 4,052 additions and 2,815 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v4.0.3
with:
node-version: '20'
cache: 'npm'

- name: Install Dependencies
run: npm install
- name: Checkout Code
uses: actions/checkout@v2

- name: Lint
run: npx eslint .

- name: Deploy
run: |
git config --global user.name $user_name
git config --global user.email $user_email
git remote set-url origin https://${github_token}@github.com/${repository}
npm run deploy
env:
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
github_token: ${{ secrets.ACTIONS_DEPLOY_ACCESS_TOKEN }}
repository: ${{ github.repository }}
- name: Set up Node.js
uses: actions/setup-node@v4.0.3
with:
node-version: '20'
cache: 'npm'

- name: Install Dependencies
run: npm install

- name: Lint
run: npx eslint .

- name: Deploy
run: |
git config --global user.name $user_name
git config --global user.email $user_email
git remote set-url origin https://${github_token}@github.com/${repository}
npm run deploy
env:
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
github_token: ${{ secrets.ACTIONS_DEPLOY_ACCESS_TOKEN }}
repository: ${{ github.repository }}
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules# Ignore artifacts:
build
coverage
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# AgroBot Website

This is the Agrobot team website. The website was developed with **React**, **Tailwind CSS**, **ThreeJS**, and **GSAP**.
This is the Agrobot team website. The website was developed with **React**, **Tailwind CSS**, **ThreeJS**, and **GSAP**.

Website will be deployed [here](https://ubcagrobot.github.io/AgroBotWebsite/)

# Prerequisites

- `NodeJS` 20+
- `npm` or `pnpm`

# Installation

To setup the project make sure that you have `npm` installed. To get started, you can do the following commands to run the website after cloning it

1. `npm install` to install dependencies
2. `npm run start` to deploy website on local machine

Expand All @@ -19,19 +21,22 @@ After this the website should be deployed on `http://localhost:3000` where you c
# Project Commands

Once the environment is setup you can use some of the following tools to make working on the project easier

1. `npm run build` to compile to website
2. `npm run lint` to lint the project
3. `npm run pretty` to use prettier to format the website

# Contributing

To contribute to the project, you can follow this guideline

1. Create a branch for your feature
2. Add your changes to this new branch
3. Create a Pull Request on this branch
4. If the PR passes the Github Actions and is approved you can merge it to main

## Layout guide:

These rules should be defied or else the site will look like a word doc. Use these as a general guide.

Values in red, tailwind styles in white
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ version: '3'

services:
website:
build:
build:
context: .
dockerfile: Dockerfile
image: website:latest
ports:
- "3000:3000"
- '3000:3000'
44 changes: 23 additions & 21 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import pluginReact from "eslint-plugin-react";
import globals from 'globals'
import pluginJs from '@eslint/js'
import pluginReact from 'eslint-plugin-react'

export default [
{ files: ["**/*.{js,mjs,cjs,jsx}"] },
{ files: ['**/*.{js,mjs,cjs,jsx}'] },
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
pluginReact.configs.flat.recommended,
{

rules: {
// Disable react/no-unknown-property and ignore specific Three.js properties
"react/no-unknown-property": ["off", { ignore: ["dispose", "geometry", "material", "position", "rotation"] }],
'react/no-unknown-property': [
'off',
{ ignore: ['dispose', 'geometry', 'material', 'position', 'rotation'] },
],

// Disable React JSX scope requirement for React 17+
"react/react-in-jsx-scope": "off",
'react/react-in-jsx-scope': 'off',

// Disable global "no-unused-vars" and "no-undef" rules
"no-unused-vars": "off",
"no-undef": "off",
"no-dupe-keys": "off",
"react/prop-types": "off",
"react/display-name": "off",
"react/no-unescaped-entities": "off",
"react/jsx-no-undef": "off",
"no-mixed-spaces-and-tabs": "off",
"no-extra-semi": "off",
'no-unused-vars': 'off',
'no-undef': 'off',
'no-dupe-keys': 'off',
'react/prop-types': 'off',
'react/display-name': 'off',
'react/no-unescaped-entities': 'off',
'react/jsx-no-undef': 'off',
'no-mixed-spaces-and-tabs': 'off',
'no-extra-semi': 'off',

// You can disable or modify other rules here as needed
},
settings: {
react: {
version: "detect",
settings: {
react: {
version: 'detect',
},
},
},
},
];
]
Loading

0 comments on commit 4f05399

Please sign in to comment.