Add Prettier

This commit is contained in:
Kalle (Sendou) 2021-12-02 20:56:38 +02:00
parent da954fb532
commit 30459016c0
7 changed files with 30 additions and 8 deletions

1
.prettierignore Normal file
View File

@ -0,0 +1 @@
build

View File

@ -12,8 +12,6 @@
"ignorePseudoClasses": ["global"]
}
],
"selector-class-pattern": [
"[a-z-_]+"
]
"selector-class-pattern": ["[a-z-_]+"]
}
}

View File

@ -4,11 +4,13 @@ Note: This is the WIP Splatoon 3 version of the site. To see the current live ve
Prerequisites: [Node.js 16.13](https://nodejs.org/en/)
1) Run `npm i` to install the dependencies.
2) Make a copy of `.env.example` that's called `.env` and fill it with values.
1. Run `npm i` to install the dependencies.
2. Make a copy of `.env.example` that's called `.env` and fill it with values.
- You can check [Prisma's guide](https://www.prisma.io/dataguide/postgresql/setting-up-a-local-postgresql-database) on how to get PostgreSQL set up and running locally.
- Run `npm run seed` to seed the database with some test data.
3) Run `npm run dev` to run both the server and frontend.
3. Run `npm run dev` to run both the server and frontend.
## Commands

View File

@ -19,4 +19,4 @@
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
};

19
package-lock.json generated
View File

@ -37,6 +37,7 @@
"@types/react-dom": "^17.0.11",
"concurrently": "^6.4.0",
"cypress": "^9.1.0",
"prettier": "2.5.0",
"prisma": "^3.6.0",
"stylelint": "^14.1.0",
"stylelint-config-idiomatic-order": "^8.1.0",
@ -6057,6 +6058,18 @@
"integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==",
"dev": true
},
"node_modules/prettier": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.0.tgz",
"integrity": "sha512-FM/zAKgWTxj40rH03VxzIPdXmj39SwSjwG0heUcNFwI+EMZJnY93yAiKXM3dObIKAM5TA88werc8T/EwhB45eg==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/pretty-bytes": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",
@ -12606,6 +12619,12 @@
"integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==",
"dev": true
},
"prettier": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.0.tgz",
"integrity": "sha512-FM/zAKgWTxj40rH03VxzIPdXmj39SwSjwG0heUcNFwI+EMZJnY93yAiKXM3dObIKAM5TA88werc8T/EwhB45eg==",
"dev": true
},
"pretty-bytes": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",

View File

@ -16,6 +16,7 @@
"seed": "npx prisma db seed",
"seed:reset": "npx prisma migrate reset --force --skip-generate",
"lint:styles": "stylelint \"app/styles/**/*.css\"",
"prettier": "prettier --check .",
"typecheck": "tsc --noEmit",
"cy:open": "npx cypress open",
"cy:run": "npx cypress run"
@ -51,6 +52,7 @@
"@types/react-dom": "^17.0.11",
"concurrently": "^6.4.0",
"cypress": "^9.1.0",
"prettier": "2.5.0",
"prisma": "^3.6.0",
"stylelint": "^14.1.0",
"stylelint-config-idiomatic-order": "^8.1.0",

View File

@ -6,5 +6,5 @@ module.exports = {
browserBuildDirectory: "public/build",
publicPath: "/build/",
serverBuildDirectory: "server/build",
devServerPort: 8002
devServerPort: 8002,
};