Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prettier for formatting files #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
env: { browser: true, es2020: true, node: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
Expand Down
16 changes: 16 additions & 0 deletions site/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "npm run lint && npm run format && vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"aws_deploy": "python3 scripts/deploy.py",
"preview": "vite preview"
"preview": "vite preview",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\""
},
"dependencies": {
"@geoarrow/geoarrow-wasm": "^0.2.0-beta.4",
Expand All @@ -29,7 +30,8 @@
"eslint-plugin-react-refresh": "^0.4.5",
"infima": "0.2.0-alpha.43",
"vite": "^5.2.8",
"vite-plugin-svgr": "^4.2.0"
"vite-plugin-svgr": "^4.2.0",
"prettier": "^3.2.5"
},
"volta": {
"node": "20.11.1"
Expand Down
25 changes: 13 additions & 12 deletions site/src/App.css
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
#root {
width:100%;
width: 100%;
}

.map {
width:100vw;
height:80vh;
position:relative;
width: 100vw;
height: 80vh;
position: relative;
}

.wordmark {
display:flex;
flex-direction:row;
display: flex;
flex-direction: row;
align-items: center;
}

.header,.footer {
.header,
.footer {
display: flex;
flex-direction:row;
flex-direction: row;
align-items: center;
justify-content:space-between;
width:100%;
justify-content: space-between;
width: 100%;
}

.footer {
height: 20vh;
}

.downloadBar {
.downloadBar {
display: flex;
flex-direction: row;
justify-content: end;
}

.logo {
height: 2em;
padding: .5em;
padding: 0.5em;
will-change: filter;
transition: filter 300ms;
}
Expand Down
2 changes: 1 addition & 1 deletion site/src/CustomControls.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.custom-controls {
position: fixed;
z-index: 10;
display:flex;
display: flex;
flex-direction: row;
color: black;
margin: 4px;
Expand Down
10 changes: 5 additions & 5 deletions site/src/DownloadCatalog.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions site/src/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import PropTypes from 'prop-types';
export default function Footer({mode}) {
import PropTypes from "prop-types";
export default function Footer({ mode }) {
return (
<>
<div className={`footer ${mode}`}>
<p className="read-the-docs">
Head on over to{' '}
<a href="https://docs.overturemaps.org/how-to" target="_blank">
{' '}
the documentation
</a>{' '}
to learn more
</p>
<div className={`footer ${mode}`}>
<p className="read-the-docs">
Head on over to{" "}
<a href="https://docs.overturemaps.org/how-to" target="_blank">
{" "}
the documentation
</a>{" "}
to learn more
</p>
</div>
</>
);
}

Footer.propTypes = {
mode: PropTypes.string.isRequired
}
mode: PropTypes.string.isRequired,
};
9 changes: 5 additions & 4 deletions site/src/InspectorPanel.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.inspector-panel {
max-width: 400px;
display:flex;
flex-direction:column;
display: flex;
flex-direction: column;
background-color: rgba(255, 255, 255, 0.9);
color: black;
box-shadow: 0 2px 4px white;
Expand All @@ -15,7 +15,7 @@
border-color: rgba(15, 15, 15, 0.8);
max-height: 80%;
overflow-y: scroll;
position:relative;
position: relative;

@media (max-width: 768px) {
max-height: 50%;
Expand All @@ -25,7 +25,8 @@
background-color: rgba(255, 255, 255, 0.95);
}

table th, table td {
table th,
table td {
padding: 0;
}

Expand Down
6 changes: 5 additions & 1 deletion site/src/InspectorPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ function InspectorPanel({ entity }) {
</tbody>
</table>
<p>
<a href="https://docs.overturemaps.org/schema/" target="_blank" rel="noreferrer noopener">
<a
href="https://docs.overturemaps.org/schema/"
target="_blank"
rel="noreferrer noopener"
>
Overture Schema Reference
</a>
</p>
Expand Down
Loading