Skip to content

Commit

Permalink
Merge pull request #233 from ungdev/dev
Browse files Browse the repository at this point in the history
Shop 2024
  • Loading branch information
DevNono authored Sep 13, 2024
2 parents bb00cfb + 59e8360 commit 4ca1d2d
Show file tree
Hide file tree
Showing 121 changed files with 12,208 additions and 6,497 deletions.
11 changes: 7 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ MAX_MAILS_PER_BATCH=100
# Used to give a discount on tickets
PARTNER_MAILS=utt.fr,utc.fr,utbm.fr

# Etupay credentials and configuration
ETUPAY_ID=
ETUPAY_KEY=
# Stripe credentials and configuration
STRIPE_PRIVATE_KEY=sk_test_andthenaverylongstringoflettersandnumbers

# Toornament credentials
TOORNAMENT_CLIENT_ID=
Expand All @@ -67,4 +66,8 @@ DISCORD_WEBHOOK_TOURNAMENT_OSU=
DISCORD_WEBHOOK_TOURNAMENT_TFT=
DISCORD_WEBHOOK_TOURNAMENT_OPEN=
DISCORD_WEBHOOK_TOURNAMENT_OTHER=
DISCORD_WEBHOOK_CONTACT=
DISCORD_WEBHOOK_CONTACT=

# Some more random variables
API_RATE_LIMIT=12
API_CART_LIFESPAN=3600
123 changes: 0 additions & 123 deletions .eslintrc.json

This file was deleted.

23 changes: 14 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
node-version: [18]
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand All @@ -32,9 +32,9 @@ jobs:
node-version: [18]
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -67,9 +67,9 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand All @@ -80,7 +80,12 @@ jobs:
- run: pnpm pnpx prisma db push
- run: docker exec -i mariadb mysql -utest -ptest arena < seed.sql
- run: pnpm test:coverage
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

deploy-dbdocs:
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
Expand All @@ -94,9 +99,9 @@ jobs:
- test
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
Expand Down
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit ""
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2023 UNG
Copyright (c) 2020-2024 UNG

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Binary file modified assets/badges/back-fullaccess.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/badges/back-orgaprice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/badges/back-restricted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
coverage:
precision: 2
round: down
range: '90...95'
range: '95...100'
status:
patch: off # Disable codecov patches because only the global project coverage matters
project:
default:
target: 85%
target: 95%
157 changes: 157 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable no-underscore-dangle */
import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import prettier from 'eslint-plugin-prettier';
import unicorn from 'eslint-plugin-unicorn';
import security from 'eslint-plugin-security';
import mocha from 'eslint-plugin-mocha';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...fixupConfigRules(
compat.extends(
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'prettier',
'plugin:unicorn/recommended',
),
),
{
plugins: {
'@typescript-eslint': fixupPluginRules(typescriptEslint),
prettier,
unicorn: fixupPluginRules(unicorn),
security: fixupPluginRules(security),
mocha,
},

languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
ecmaVersion: 2018,
sourceType: 'module',
},

rules: {
'arrow-body-style': 'warn',
'eol-last': 'off',
'guard-for-in': 'off',
'no-alert': 'warn',
'no-async-promise-executor': 'off',
'no-await-in-loop': 'off',
'no-console': 'warn',
'no-loop-func': 'off',
'no-restricted-syntax': 'off',
'no-shadow': 'off',
'no-useless-constructor': 'off',
'no-plusplus': 'off',
'object-curly-newline': 'off',
'prefer-destructuring': 'warn',
radix: 'off',
'require-await': 'warn',

'spaced-comment': [
'warn',
'always',
{
exceptions: ['*'],
},
],

'no-continue': 'off',
'no-promise-executor-return': 'off',
'default-param-last': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-shadow': 'warn',
'prettier/prettier': 'warn',
'import/default': 'off',
'import/extensions': 'off',
'import/no-cycle': 'off',
'import/order': 'warn',
'import/prefer-default-export': 'off',
'security/detect-non-literal-regexp': 'off',
'security/detect-object-injection': 'off',
'security/detect-non-literal-fs-filename': 'off',
'unicorn/consistent-function-scoping': 'off',

'unicorn/filename-case': [
'error',
{
case: 'camelCase',
},
],

'unicorn/no-array-callback-reference': 'off',
'unicorn/no-array-reduce': 'off',
'unicorn/no-fn-reference-in-iterator': 'off',
'unicorn/no-process-exit': 'off',
'unicorn/no-reduce': 'off',
'unicorn/no-null': 'off',
'unicorn/number-literal-case': 'off',
'unicorn/numeric-separators-style': 'off',
'unicorn/prefer-set-has': 'off',
'unicorn/prefer-spread': 'warn',
'unicorn/prefer-object-from-entries': 'off',
'unicorn/prefer-node-protocol': 'off',
'unicorn/prefer-module': 'off',
'unicorn/no-await-expression-member': 'off',
'unicorn/prefer-top-level-await': 'off',
'unicorn/prefer-logical-operator-over-ternary': 'off',
'unicorn/text-encoding-identifier-case': 'off',

'unicorn/prevent-abbreviations': [
'error',
{
replacements: {
env: false,
},
},
],
},
},
...compat.extends('plugin:mocha/recommended').map((config) => ({
...config,
files: ['tests/**/*.test.ts'],
})),
{
files: ['tests/**/*.ts'],
rules: {
'mocha/no-mocha-arrows': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'mocha/no-setup-in-describe': 'off',
'mocha/no-exclusive-tests': 'error',
'mocha/no-skipped-tests': 'error',
},
},
{
files: ['tests/setup.ts'],
rules: {
'no-unused-expressions': 'off',
},
},
];
Loading

0 comments on commit 4ca1d2d

Please sign in to comment.