Skip to content

Commit

Permalink
chore: update linter and formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Gijsdeman committed Feb 25, 2025
1 parent 5532ed1 commit e960471
Show file tree
Hide file tree
Showing 129 changed files with 25,282 additions and 24,876 deletions.
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

33 changes: 7 additions & 26 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import'],
extends: ['airbnb-typescript/base'],
ignorePatterns: ['dist', 'node_modules'],
rules: {
'linebreak-style': ['error', 'unix'],
'lines-between-class-members': [
Expand All @@ -19,31 +19,12 @@ module.exports = {
'@typescript-eslint/no-unused-vars': ['warn'],
'arrow-body-style': 'off',
'import/no-cycle': 'off',
'indent': 'off',
'@typescript-eslint/no-redeclare': 'off',
'@typescript-eslint/indent': [
'error',
2,
{
'ignoredNodes': [
'FunctionExpression > .params[decorators.length > 0]',
'FunctionExpression > .params > :matches(Decorator, :not(:first-child))',
'ClassBody.body > PropertyDefinition[decorators.length > 0] > .key'
]
},
],
"import/extensions": [
"error",
"always",
{
"ts": "never",
"tsx": "never",
"js": "never",
"jsx": "never"
}
],
},
parserOptions: {
project: ['./tsconfig.eslint.json'],
'linebreak-style': ['error', 'windows'],
},
overrides: [
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs'],
},
],
};
61 changes: 30 additions & 31 deletions .github/ISSUE_TEMPLATE/1-bug-report.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
name: "Bug Report"
name: 'Bug Report'
description: Report a bug found while using ParelPracht.
title: "[Bug]: "
labels: ["Type: Bug", "Status: Triage"]
title: '[Bug]: '
labels: ['Type: Bug', 'Status: Triage']
body:
- type: textarea
id: current-behavior
attributes:
label: Current behaviour
description: A description of what is currently happening, including screenshots and other useful information (**DO NOT INCLUDE PRIVATE INFORMATION**).
placeholder: Currently...
validations:
required: true
- type: textarea
id: desired-behavior
attributes:
label: Desired behaviour
description: A clear description of what you think should happen.
placeholder: In this situation, I expected ...
- type: textarea
id: reproduction
attributes:
label: Steps to reproduce
description: Clearly describe which steps or actions you have taken to arrive at the problem. If you have some experience with the code, please link to the specific pieces of code.
placeholder: I did X, then Y, before arriving at Z, when ERROR ...
validations:
required: true
- type: textarea
id: other
attributes:
label: Other information
description: Any other details?

- type: textarea
id: current-behavior
attributes:
label: Current behaviour
description: A description of what is currently happening, including screenshots and other useful information (**DO NOT INCLUDE PRIVATE INFORMATION**).
placeholder: Currently...
validations:
required: true
- type: textarea
id: desired-behavior
attributes:
label: Desired behaviour
description: A clear description of what you think should happen.
placeholder: In this situation, I expected ...
- type: textarea
id: reproduction
attributes:
label: Steps to reproduce
description: Clearly describe which steps or actions you have taken to arrive at the problem. If you have some experience with the code, please link to the specific pieces of code.
placeholder: I did X, then Y, before arriving at Z, when ERROR ...
validations:
required: true
- type: textarea
id: other
attributes:
label: Other information
description: Any other details?
42 changes: 21 additions & 21 deletions .github/ISSUE_TEMPLATE/2-feature-request.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: "Feature Request"
name: 'Feature Request'
description: Suggest a feature or enhancement to improve ParelPracht.
labels: ["Type: Idea"]
labels: ['Type: Idea']
body:
- type: textarea
id: feature
attributes:
label: What would you like?
description: A clear description of the feature or enhancement wanted.
placeholder: I'd like to be able to...
validations:
required: true
- type: textarea
id: reason
attributes:
label: Why is this needed?
description: A clear description of why this would be useful to have.
placeholder: I want this because...
- type: textarea
id: other
attributes:
label: Other information
placeholder: Any other details?
- type: textarea
id: feature
attributes:
label: What would you like?
description: A clear description of the feature or enhancement wanted.
placeholder: I'd like to be able to...
validations:
required: true
- type: textarea
id: reason
attributes:
label: Why is this needed?
description: A clear description of why this would be useful to have.
placeholder: I want this because...
- type: textarea
id: other
attributes:
label: Other information
placeholder: Any other details?
15 changes: 7 additions & 8 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
version: 2
updates:
- package-ecosystem: "npm"
- package-ecosystem: 'npm'
directories:
- "."
- '.'
schedule:
interval: "weekly"
target-branch: "develop"
interval: 'weekly'
target-branch: 'develop'
assignees:
- "LuukBlankenstijn"
- 'LuukBlankenstijn'
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]

- dependency-name: '*'
update-types: ['version-update:semver-major']
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
build-and-lint:
uses: GEWIS/actions/.github/workflows/lint-and-build-yarn.yml@v1
with:
node-version: "20.x"
node-version: '20.x'
lint: true
format: false
build: true
7 changes: 3 additions & 4 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Semantic release
on:
push:
branches:
- main-todo
- main-todo

jobs:
versioning:
Expand All @@ -16,10 +16,9 @@ jobs:
with:
projects: "['.']"
version: ${{ needs.versioning.outputs.next-version }}
docker-registry: "abc.docker-registry.gewis.nl"
docker-registry: 'abc.docker-registry.gewis.nl'
docker-paths: "['crm/parelpracht/server']"
github-registry: "false"
github-registry: 'false'
secrets:
REGISTRY_USERNAME: ${{ secrets.SVC_GH_PARELPRACHT_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.SVC_GH_PARELPRACHT_PWD }}

8 changes: 8 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { prettierConfig } from '@gewis/prettier-config';

/**
* @type {import("prettier").Config}
*/
export default {
...prettierConfig,
};
50 changes: 24 additions & 26 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229
},
{
"type": "node",
"request": "launch",
"name": "Debug",
"program": "${workspaceRoot}/dist/index.js",
"smartStep": true,
"outFiles": [
"../dist/**/*.js"
],
"preLaunchTask": "npm: build",
"protocol": "inspector"
}
]
}
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229
},
{
"type": "node",
"request": "launch",
"name": "Debug",
"program": "${workspaceRoot}/dist/index.js",
"smartStep": true,
"outFiles": ["../dist/**/*.js"],
"preLaunchTask": "npm: build",
"protocol": "inspector"
}
]
}
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodeLinker: node-modules
nodeLinker: node-modules
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ automating the generation of contracts, proposals and invoices.
This is the back-end of ParelPracht. The front-end can be found [here](https://github.com/GEWIS/parelpracht-client).

## Development

1. Clone the repository with `git clone git@github.com:GEWIS/parelpracht-server`
2. Install the dependencies with `npm install`.
3. Copy `.env.example` to `.env` and add the remaining environment variables.
Expand All @@ -25,6 +26,7 @@ docker-compose-mariadb.yaml up -d`. The environment variables in the
`.env.example` are adjusted to use this container configuration.

## Setup

When running the application, you will first need to create a superuser. This is
done with the `/setup` endpoint.

Expand All @@ -37,6 +39,7 @@ production, an actual mail will be send with the confirmation link to the
indicated email address.

## Copyright

Copyright © 2022 The 39th board of GEWIS - Some rights reserved. Created by Roy
Kakkenberg, Koen de Nooij, Jealy van den Aker, Max Opperman, Wouter van der
Heijden en Irne Verwijst. You can use our software freely within the limits of
Expand All @@ -45,4 +48,5 @@ time in it, so we ask you to leave our copyright mark in place when modifying
our software. Of course, you are free to add your own.

## License

[GNU AGPLv3](./LICENSE)
3 changes: 1 addition & 2 deletions docker-compose-mariadb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ services:
MARIADB_ROOT_PASSWORD: parelpracht
MARIADB_DATABASE: parelpracht
ports:
- "3306:3306"

- '3306:3306'
1 change: 0 additions & 1 deletion nodemon.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{
"exec": "ts-node src/index.ts",
"watch": ["src"],
Expand Down
22 changes: 11 additions & 11 deletions ormconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"entities": ["dist/entity/**/*.js"],
"migrations": ["dist/migration/**/*.js"],
"subscribers": ["dist/subscriber/**/*.js"],
"cli": {
"entitiesDir": "src/entity",
"migrationsDir": "src/migration",
"subscribersDir": "src/subscriber"
},
"insecureAuth": true
}
{
"entities": ["dist/entity/**/*.js"],
"migrations": ["dist/migration/**/*.js"],
"subscribers": ["dist/subscriber/**/*.js"],
"cli": {
"entitiesDir": "src/entity",
"migrationsDir": "src/migration",
"subscribersDir": "src/subscriber"
},
"insecureAuth": true
}
Loading

0 comments on commit e960471

Please sign in to comment.