mirror of
https://github.com/koodiklinikka/palkkakysely.git
synced 2026-03-16 01:04:33 +00:00
Run prettier
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -2,9 +2,9 @@ name: Build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
#schedule:
|
#schedule:
|
||||||
# Update automatically on weekdays during work hours
|
# Update automatically on weekdays during work hours
|
||||||
#- cron: '0 10,13,16 * * 1-5'
|
#- cron: '0 10,13,16 * * 1-5'
|
||||||
@@ -34,7 +34,7 @@ jobs:
|
|||||||
- run: yarn build -- --base=/palkkakysely/analysaattori/
|
- run: yarn build -- --base=/palkkakysely/analysaattori/
|
||||||
working-directory: analysaattori
|
working-directory: analysaattori
|
||||||
env:
|
env:
|
||||||
GENERATE_SOURCEMAP: 'false'
|
GENERATE_SOURCEMAP: "false"
|
||||||
- run: cp -a analysaattori/dist ./out/analysaattori
|
- run: cp -a analysaattori/dist ./out/analysaattori
|
||||||
- run: ls -laR out
|
- run: ls -laR out
|
||||||
- run: touch out/.nojekyll
|
- run: touch out/.nojekyll
|
||||||
|
|||||||
@@ -12,3 +12,7 @@ repos:
|
|||||||
rev: 23.9.1
|
rev: 23.9.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
|
rev: v3.0.3
|
||||||
|
hooks:
|
||||||
|
- id: prettier
|
||||||
|
|||||||
2
.prettierignore
Normal file
2
.prettierignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# prettier doesn't understand jinja, the poor thing
|
||||||
|
template/*.html
|
||||||
@@ -1,11 +1,17 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="./favicon.ico" />
|
<link rel="icon" href="./favicon.ico" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="description" content="Web site created using create-react-app" />
|
<meta
|
||||||
<script src="https://cdn.plot.ly/plotly-latest.min.js" charset="utf-8"></script>
|
name="description"
|
||||||
|
content="Web site created using create-react-app"
|
||||||
|
/>
|
||||||
|
<script
|
||||||
|
src="https://cdn.plot.ly/plotly-latest.min.js"
|
||||||
|
charset="utf-8"
|
||||||
|
></script>
|
||||||
<title>Palkka-analysaattori</title>
|
<title>Palkka-analysaattori</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
import React from 'react';
|
import React from "react";
|
||||||
import PivotTableUI from 'react-pivottable/PivotTableUI';
|
import PivotTableUI from "react-pivottable/PivotTableUI";
|
||||||
import 'react-pivottable/pivottable.css';
|
import "react-pivottable/pivottable.css";
|
||||||
import TableRenderers from 'react-pivottable/TableRenderers';
|
import TableRenderers from "react-pivottable/TableRenderers";
|
||||||
import createPlotlyComponent from 'react-plotly.js/factory';
|
import createPlotlyComponent from "react-plotly.js/factory";
|
||||||
import createPlotlyRenderers from 'react-pivottable/PlotlyRenderers';
|
import createPlotlyRenderers from "react-pivottable/PlotlyRenderers";
|
||||||
import useSWR from "swr/esm";
|
import useSWR from "swr/esm";
|
||||||
|
|
||||||
const Plot = createPlotlyComponent(window.Plotly);
|
const Plot = createPlotlyComponent(window.Plotly);
|
||||||
const PlotlyRenderers = createPlotlyRenderers(Plot);
|
const PlotlyRenderers = createPlotlyRenderers(Plot);
|
||||||
const renderers = Object.assign({}, TableRenderers, PlotlyRenderers);
|
const renderers = Object.assign({}, TableRenderers, PlotlyRenderers);
|
||||||
|
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const qs = new URLSearchParams(window.location.search);
|
const qs = new URLSearchParams(window.location.search);
|
||||||
const [pivotState, setPivotState] = React.useState({});
|
const [pivotState, setPivotState] = React.useState({});
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import React from 'react';
|
import React from "react";
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from "react-dom";
|
||||||
import App from './App';
|
import App from "./App";
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<App />
|
<App />
|
||||||
</React.StrictMode>,
|
</React.StrictMode>,
|
||||||
document.getElementById('root')
|
document.getElementById("root"),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": ["dom", "dom.iterable", "esnext"],
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
@@ -20,7 +16,5 @@
|
|||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "react-jsx"
|
"jsx": "react-jsx"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src"]
|
||||||
"src"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,18 @@
|
|||||||
body {
|
body {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
font: 18px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
font:
|
||||||
|
18px/1.5 -apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
"Segoe UI",
|
||||||
|
Roboto,
|
||||||
|
"Helvetica Neue",
|
||||||
|
Arial,
|
||||||
|
"Noto Sans",
|
||||||
|
sans-serif,
|
||||||
|
"Apple Color Emoji",
|
||||||
|
"Segoe UI Emoji",
|
||||||
|
"Segoe UI Symbol",
|
||||||
|
"Noto Color Emoji";
|
||||||
}
|
}
|
||||||
|
|
||||||
body.static-body {
|
body.static-body {
|
||||||
@@ -17,12 +29,15 @@ body.table-body table {
|
|||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.table-body td, body.table-body th {
|
body.table-body td,
|
||||||
|
body.table-body th {
|
||||||
padding: 0.3em;
|
padding: 0.3em;
|
||||||
border: 1px solid #999;
|
border: 1px solid #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, h2, h3 {
|
h1,
|
||||||
|
h2,
|
||||||
|
h3 {
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,15 +52,15 @@ a:visited {
|
|||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
body {
|
body {
|
||||||
color: white;
|
color: white;
|
||||||
background: #444
|
background: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:link {
|
a:link {
|
||||||
color: #5bf
|
color: #5bf;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:visited {
|
a:visited {
|
||||||
color: #ccf
|
color: #ccf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user