Add prettier

This commit is contained in:
Marcus Blättermann 2022-11-10 00:55:34 +01:00
parent abcb44e918
commit b473ff528a
No known key found for this signature in database
GPG Key ID: A1E1F04008AC450D
5 changed files with 62 additions and 2 deletions

1
website/.prettierignore Normal file
View File

@ -0,0 +1 @@
.next

37
website/.prettierrc Normal file
View File

@ -0,0 +1,37 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 4,
"printWidth": 100,
"overrides": [
{
"files": "*.sass",
"options": {
"printWidth": 999
}
},
{
"files": "*.mdx",
"options": {
"tabWidth": 2,
"printWidth": 80,
"proseWrap": "always"
}
},
{
"files": ["package.json", "package-lock.json"],
"options": {
"tabWidth": 4,
"printWidth": 80,
"proseWrap": "always"
}
},
{
"files": "*.html",
"options": {
"htmlWhitespaceSensitivity": "strict"
}
}
]
}

View File

@ -1,3 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "unifiedjs.vscode-mdx"]
"recommendations": ["dbaeumer.vscode-eslint", "unifiedjs.vscode-mdx", "esbenp.prettier-vscode"]
}

View File

@ -17,6 +17,7 @@
"eslint": "8.27.0",
"eslint-config-next": "13.0.2",
"next": "13.0.2",
"prettier": "^2.7.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.8.4"
@ -3991,6 +3992,20 @@
"node": ">= 0.8.0"
}
},
"node_modules/prettier": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=10.13.0"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/prop-types": {
"version": "15.8.1",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
@ -7832,6 +7847,11 @@
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
"integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g=="
},
"prettier": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g=="
},
"prop-types": {
"version": "15.8.1",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",

View File

@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"prettier": "prettier . --write"
},
"dependencies": {
"@mdx-js/loader": "^2.1.5",
@ -18,6 +19,7 @@
"eslint": "8.27.0",
"eslint-config-next": "13.0.2",
"next": "13.0.2",
"prettier": "^2.7.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.8.4"