Skip to content

Commit

Permalink
Fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Ackuq committed Sep 20, 2023
1 parent 647670f commit f61185a
Show file tree
Hide file tree
Showing 21 changed files with 1,141 additions and 1,085 deletions.
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"jsdom": "22.1.0",
"moment": "2.29.4",
"next": "13.4.19",
"next-themes": "^0.2.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-share": "4.4.1",
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-base/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ const { join } = require("path");

module.exports = {
next: join(__dirname, "next.js"),
node: join(__dirname, "node.js"),
};
12 changes: 12 additions & 0 deletions packages/eslint-config-base/node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
plugins: ["@typescript-eslint"],
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
rules: {
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/consistent-type-imports": "error",
},
};
2 changes: 1 addition & 1 deletion packages/party-data/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": ["@partiguiden/eslint-config-base/next"]
"extends": ["@partiguiden/eslint-config-base/node"]
}
3 changes: 2 additions & 1 deletion packages/party-data/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ async function categorize() {
const standpoints = readNotCategorizedStandpoints();

const subjectChoices = subjects.map((subject) => ({
value: subject.name,
name: subject.name,
value: subject.id,
description: undefined,
}));

Expand Down
1 change: 1 addition & 0 deletions packages/party-data/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ enum Party {
}

export interface Subject {
id: string;
name: string;
relatedSubjects: string[];
}
Expand Down
2 changes: 1 addition & 1 deletion packages/party-data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface PartyData {
export type PartyDataWithoutPartyName = Omit<Standpoint, "party">;

interface SubjectData {
[name: string]: Subject;
[id: string]: Subject;
}

const PARTIES_DIRECTORY = `${__dirname}/parties`;
Expand Down
4 changes: 3 additions & 1 deletion packages/party-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"description": "",
"main": "index.ts",
"scripts": {
"cli": "ts-node cli.ts"
"cli": "ts-node cli.ts",
"typecheck": "tsc --noEmit",
"lint": "eslint --ext .ts,.js"
},
"exports": {
".": "./index.ts",
Expand Down
Loading

0 comments on commit f61185a

Please sign in to comment.