Skip to content

Commit

Permalink
Use ESRF Prettier config
Browse files Browse the repository at this point in the history
  • Loading branch information
axelboc committed Aug 12, 2021
1 parent ad9ea9a commit f2e0151
Show file tree
Hide file tree
Showing 59 changed files with 1,519 additions and 1,527 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/node_modules
/build
.DS_Store
node_modules/

/build/
.env.local
.env.*.local
*.swp

npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.log
Thumbs.db
.DS_Store
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build/
/yarn.lock
12 changes: 12 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"semi": true,
"singleQuote": true,
"overrides": [
{
"files": "*.md",
"options": {
"proseWrap": "always"
}
}
]
}
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

20 changes: 20 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
MIT License

Copyright (c) 2020 PaNOSC

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Local setup

Docker is used to start a local Search API database, seeded with `searchapi/db.json`.
Docker is used to start a local Search API database, seeded with
`searchapi/db.json`.

```
yarn install
Expand Down
46 changes: 16 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
"name": "panosc-frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"lint": "run-p lint:*",
"lint:eslint": "eslint \"**/*.{ts,tsx,js,jsx}\" --max-warnings=0",
"lint:prettier": "prettier --check ."
},
"dependencies": {
"@react-hook/window-size": "^3.0.7",
"@rebass/forms": "^4.0.6",
Expand All @@ -26,28 +33,24 @@
"swr": "^0.5.6",
"zustand": "^3.0.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"storybook": "start-storybook -p 6006 -s public",
"build-storybook": "build-storybook -s public"
"devDependencies": {
"eslint": "^7.32.0",
"eslint-plugin-better-styled-components": "^1.1.2",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-react-hooks": "^4.0.8",
"npm-run-all": "^4.1.5",
"prettier": "^2.3.2",
"typescript": "^3.9.6"
},
"eslintConfig": {
"extends": [
"react-app",
"prettier"
"react-app"
],
"plugins": [
"prettier",
"better-styled-components",
"import"
],
"rules": {
"prettier/prettier": [
"error"
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"better-styled-components/sort-declarations-alphabetically": 2,
Expand Down Expand Up @@ -78,14 +81,6 @@
]
}
},
"prettier": {
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"bracketSpacing": false,
"arrowParens": "always"
},
"browserslist": {
"production": [
">0.2%",
Expand All @@ -97,14 +92,5 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-better-styled-components": "^1.1.2",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react-hooks": "^4.0.8",
"prettier": "^2.0.5",
"typescript": "^3.9.6"
}
}
12 changes: 6 additions & 6 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap" rel="stylesheet">

<meta
name="description"
content="Open Science Catalogue"
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap"
rel="stylesheet"
/>

<meta name="description" content="Open Science Catalogue" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
Expand Down
Loading

0 comments on commit f2e0151

Please sign in to comment.