Skip to content

Commit 3ec4166

Browse files
committed
chore: update configs and add relevant packages
1 parent bbdc1fc commit 3ec4166

File tree

10 files changed

+1335
-61
lines changed

10 files changed

+1335
-61
lines changed

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build
2+
public
3+
coverage
4+
src/registerServiceWorker.js
5+
cypress/integration/examples

.eslintrc.json renamed to .eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"es2021": true
55
},
66
"extends": [
7-
"plugin:react/recommended",
87
"airbnb",
8+
"plugin:react/recommended",
99
"plugin:@typescript-eslint/recommended",
1010
"prettier",
1111
"plugin:cypress/recommended"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
.env.development.local
1818
.env.test.local
1919
.env.test
20+
.env.prod
2021
.env.production.local
2122

2223
npm-debug.log*

.huskyrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"hooks": {
3+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
4+
"post-checkout": "yarn install",
5+
"pre-commit": "pretty-quick --staged && yarn lint",
6+
"post-commit": "git status",
7+
"post-merge": "yarn install",
8+
"pre-push": "yarn lint && yarn build:react"
9+
}
10+
}

.prettierrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"semi": true,
32
"trailingComma": "all",
3+
"tabWidth": 2,
4+
"semi": true,
45
"singleQuote": true,
5-
"jsxSingleQuote": false,
6-
"printWidth": 80
6+
"jsxSingleQuote": false
77
}

.versionrc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"types": [
3+
{
4+
"type": "feat",
5+
"section": "Features"
6+
},
7+
{
8+
"type": "fix",
9+
"section": "Bug Fixes"
10+
},
11+
{
12+
"type": "test",
13+
"section": "Tests"
14+
},
15+
{
16+
"type": "build",
17+
"section": "Build System"
18+
},
19+
{
20+
"type": "docs",
21+
"section": "Documentation"
22+
},
23+
{
24+
"type": "ci",
25+
"section": "Continuous Integration"
26+
},
27+
{
28+
"type": "chore",
29+
"section": "Chores",
30+
"hidden": true
31+
}
32+
]
33+
}

LICENSE

Lines changed: 661 additions & 0 deletions
Large diffs are not rendered by default.

cypress.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"baseUrl": "http://localhost:3000",
2+
"baseUrl": "http://localhost:3333",
33
"video": false
44
}

package.json

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
2-
"name": "graasp-app-code-review-rewrite",
2+
"name": "graasp-app-code-capsule",
33
"version": "0.1.0",
44
"private": true,
5+
"license": "AGPL-3.0-only",
6+
"author": "React EPFL",
7+
"contributors": [
8+
"Juan Carlos Farah",
9+
"Basile Spaenlehauer"
10+
],
511
"dependencies": {
612
"@testing-library/cypress": "^8.0.2",
713
"@testing-library/jest-dom": "^5.14.1",
@@ -14,11 +20,11 @@
1420
"react": "^18.1.0",
1521
"react-dom": "^18.1.0",
1622
"react-scripts": "5.0.1",
17-
"typescript": "^4.4.2",
18-
"web-vitals": "^2.1.0"
23+
"typescript": "^4.4.2"
1924
},
2025
"scripts": {
21-
"start": "react-scripts start",
26+
"start": "env-cmd -f ./.env.local react-scripts start",
27+
"start:test": "env-cmd -f ./.env.test react-scripts -r @cypress/instrument-cra start",
2228
"build": "react-scripts build",
2329
"test": "react-scripts test",
2430
"eject": "react-scripts eject",
@@ -27,27 +33,16 @@
2733
"hooks:install": "husky install",
2834
"hooks:uninstall": "husky uninstall",
2935
"lint": "eslint .",
30-
"test:once": "yarn test:ci",
31-
"test:ci": "env-cmd -f ./.env.test cypress run"
36+
"test:once": "concurrently -k -s first \"yarn start:test\" \"wait-on http://localhost:3333 && yarn test:ci\" ",
37+
"test:ci": "env-cmd -f ./.env.test cypress run --headless"
3238
},
33-
"browserslist": {
34-
"production": [
35-
">0.2%",
36-
"not dead",
37-
"not op_mini all"
38-
],
39-
"development": [
40-
"last 1 chrome version",
41-
"last 1 firefox version",
42-
"last 1 safari version"
43-
]
44-
},
45-
"packageManager": "[email protected]",
4639
"devDependencies": {
4740
"@commitlint/cli": "16.1.0",
4841
"@commitlint/config-conventional": "16.0.0",
42+
"@cypress/instrument-cra": "^1.4.0",
4943
"@typescript-eslint/eslint-plugin": "^5.22.0",
5044
"@typescript-eslint/parser": "^5.22.0",
45+
"concurrently": "^7.1.0",
5146
"cypress": "^9.6.0",
5247
"eslint": "^8.14.0",
5348
"eslint-config-airbnb": "^19.0.4",
@@ -61,6 +56,20 @@
6156
"eslint-plugin-react-hooks": "^4.5.0",
6257
"husky": "^7.0.4",
6358
"prettier": "^2.6.2",
64-
"pretty-quick": "^3.1.3"
65-
}
59+
"pretty-quick": "^3.1.3",
60+
"standard-version": "^9.3.2"
61+
},
62+
"browserslist": {
63+
"production": [
64+
">0.2%",
65+
"not dead",
66+
"not op_mini all"
67+
],
68+
"development": [
69+
"last 1 chrome version",
70+
"last 1 firefox version",
71+
"last 1 safari version"
72+
]
73+
},
74+
"packageManager": "[email protected]"
6675
}

0 commit comments

Comments
 (0)