Skip to content

Commit

Permalink
Add a custom rule to prevent colors from being hardcoded outside of t…
Browse files Browse the repository at this point in the history
…heme (#288)

* Add a custom rule to prevent colors from being hardcoded in ESLint

* Refactor colors

* Create packages folder and fix colors

* Remove external dependency for css alphabetical order linting

* Fix install with yarn

---------

Co-authored-by: Charles Bochet <[email protected]>
  • Loading branch information
FelixMalfait and charlesBochet authored Jun 14, 2023
1 parent bf6fb0b commit 31f3950
Show file tree
Hide file tree
Showing 61 changed files with 31,490 additions and 62,652 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"ghcr.io/devcontainers-contrib/features/jshint:2": {}
},
"forwardPorts": [3000, 3001, 5432],
"postCreateCommand": "cd front && npm install && cd ../server && npm install"
"postCreateCommand": "cd front && yarn && cd ../server && yarn"
}
13 changes: 1 addition & 12 deletions .github/workflows/ci-chromatic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,14 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Front / Write .env
run: |
cd front
touch .env
echo "REACT_APP_API_URL: $REACT_APP_API_URL" >> .env
echo "REACT_APP_AUTH_URL: $REACT_APP_AUTH_URL" >> .env
- name: Front / Install Dependencies
run: cd front && npm install
run: cd front && yarn
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/ci-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Docs / Install Dependencies
run: cd docs && npm install
run: cd docs && yarn
- name: Docs / Build Documentation
run: cd docs && npm run build
run: cd docs && yarn build
21 changes: 5 additions & 16 deletions .github/workflows/ci-front.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,25 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Front / Write .env
run: |
cd front
touch .env
echo "REACT_APP_API_URL: $REACT_APP_API_URL" >> .env
echo "REACT_APP_AUTH_URL: $REACT_APP_AUTH_URL" >> .env
- name: Front / Install Dependencies
run: cd front && npm install
run: cd front && yarn
- name: Front / Install Playwright
run: cd front && npx playwright install --with-deps
- name: Front / Run linter
run: cd front && npm run lint
run: cd front && yarn lint
- name: Front / Build Storybook
run: cd front && npm run build-storybook --quiet
run: cd front && yarn build-storybook --quiet
- name: Front / Run storybook tests
run: |
cd front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --silent --port 6006" \
"npm run coverage"
"yarn coverage"
- name: Front / Run jest tests
run: |
cd front && npm run test
cd front && yarn test
17 changes: 3 additions & 14 deletions .github/workflows/ci-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Server / Install Dependencies
run: cd server && npm install
run: cd server && yarn install
- name: Server / Run linter
run: cd server && npm run lint
run: cd server && yarn lint
- name: Server / Run jest tests
run: |
cd server && npm run test
cd server && yarn test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/**/.env
.DS_Store
.DS_Store
node_modules/
12 changes: 6 additions & 6 deletions docs/docs/dev-docs/getting-started/local-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ Most default value should work out of the box, but don't forget to update the da
On the frontend:
```
cd front
npm install
yarn
```

On the server side:
```
cd server
npm install
npm run prisma:migrate
yarn
yarn prisma:migrate
```
You can also add `npm run prisma:seed` to seed the database with mock data.
You can also add `yarn prisma:seed` to seed the database with mock data.

### 5. Auth Setup
Right now the only way to authenticate yourself is to setup Google Sign-in in `server/.env`
Expand All @@ -107,10 +107,10 @@ We will add an easier option soon.
On the frontend:
```
cd front
npm run start
yarn start
```
On the server side:
```
cd server
npm run start
yarn start
```
Loading

0 comments on commit 31f3950

Please sign in to comment.