Skip to content

Commit

Permalink
Bump Prettier (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
krystof-k authored Jan 31, 2024
1 parent c38f54f commit 4511f7d
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 46 deletions.
4 changes: 2 additions & 2 deletions frontend/.env.preview
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VITE_DEFAULT_LOCALE=sk
VITE_FALLBACK_LOCALE=sk
VITE_DEFAULT_LOCALE=sk
VITE_FALLBACK_LOCALE=sk
3 changes: 2 additions & 1 deletion frontend/.prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
singleQuote: true
endOfLine: lf
overrides:
- files: ['.env', '.env.*']
options:
parser: 'sh'
plugins:
- prettier-plugin-sh
4 changes: 2 additions & 2 deletions frontend/api/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const app: Express = express();
const PUBLIC_URL = process.env.PUBLIC_URL
? process.env.PUBLIC_URL
: process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: null;
? `https://${process.env.VERCEL_URL}`
: null;
const OAUTH_CALLBACK_URL = process.env.OAUTH_CALLBACK_URL || PUBLIC_URL;

if (!PUBLIC_URL) {
Expand Down
4 changes: 2 additions & 2 deletions frontend/cypress/e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"isolatedModules": false,
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress"]
}
"types": ["cypress"],
},
}
4 changes: 2 additions & 2 deletions frontend/docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ If you need to work just with the frontend, the easiest way is to run just Vue f
```sh
DATA_PROXY=https://volebnikalkulacka.cz
API_PROXY=https://volebnikalkulacka.cz

```

Expand Down Expand Up @@ -89,7 +89,7 @@ To run also backend serverless functions locally, you can use [Vercel CLI](https

```sh

DATABASE_NAME=defaultdb
DATABASE_URL_BASE=postgresql://john-doe:HUVAkcJHcpffDZuSuQLmwN@john-doe-development-5467.7tc.cockroachlabs.cloud:26257
DATABASE_URL=${DATABASE_URL_BASE}/${DATABASE_NAME}
Expand Down
32 changes: 16 additions & 16 deletions frontend/package-lock.json

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

4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@types/seedrandom": "^3.0.4",
"@vercel/node": "^2.6.3",
"@vitejs/plugin-vue": "^4.0.0",
"@vue/eslint-config-prettier": "^8.0.0",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^11.0.0",
"@vue/test-utils": "^2.0.2",
"@vue/tsconfig": "^0.4.0",
Expand All @@ -85,7 +85,7 @@
"passport-google-oauth20": "^2.0.0",
"passport-magic-login": "^1.2.2",
"prettier": "^3.0.0",
"prettier-plugin-sh": "^0.13.1",
"prettier-plugin-sh": "^0.14.0",
"prisma": "^5.0.0",
"sass": "^1.54.3",
"sass-loader": "^13.0.2",
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/common/dataFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ export const deprecatedFetchCalculator = async (key: string) => {
answer.answer === true
? 'yes'
: answer.answer === false
? 'no'
: answer.answer === null
? 'dont_know'
: (() => {
throw new Error(`Unexpected answer value: ${answer.answer}`);
})();
? 'no'
: answer.answer === null
? 'dont_know'
: (() => {
throw new Error(`Unexpected answer value: ${answer.answer}`);
})();

transformedCandidatesAnswers.push({
id: answer.questionId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const classes = ['status-bar-primary', 'status-bar-secondary'];
question.answer === UserAnswerEnum.yes
? classes[0]
: question.answer === UserAnswerEnum.no
? classes[1]
: '',
? classes[1]
: '',
index === currentQuestion ? 'active' : '',
]"
></div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/recap/RecapPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const handleShowResultsClick = () => {
const availableTags: Set<string> = new Set(['All']);
const selectedTag = ref('All');
electionStore.calculator?.questions.forEach(
(q) => q.tags?.forEach((tag) => availableTags.add(tag)),
electionStore.calculator?.questions.forEach((q) =>
q.tags?.forEach((tag) => availableTags.add(tag)),
);
const handleStarClick = (index: number) => {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/result/ResultCategory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const visibleCandidates = computed(() =>
isExpanded.value
? props.result.length
: props.maxVisibleCandidates > props.result.length
? props.result.length
: props.maxVisibleCandidates,
? props.result.length
: props.maxVisibleCandidates,
);
console.debug(visibleCandidates.value);
</script>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/server/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export async function authUser(
const PUBLIC_URL = process.env.PUBLIC_URL
? process.env.PUBLIC_URL
: process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: null;
? `https://${process.env.VERCEL_URL}`
: null;
if (!tokenString) {
return null;
}
Expand Down
10 changes: 5 additions & 5 deletions frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"files": [],
"references": [
{
"path": "./tsconfig.node.json"
"path": "./tsconfig.node.json",
},
{
"path": "./tsconfig.vitest.json"
"path": "./tsconfig.vitest.json",
},
{
"path": "./tsconfig.app.json"
}
]
"path": "./tsconfig.app.json",
},
],
}

0 comments on commit 4511f7d

Please sign in to comment.