Skip to content

Commit cce8dea

Browse files
authored
Merge pull request #25 from USTakAssociation/dep-updates-and-lint-fixes
Update dependencies and linting fixes
2 parents 99b1d65 + 7a8df4e commit cce8dea

38 files changed

+4477
-3321
lines changed

api/.env renamed to api/.env.example

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
PORT=3004
2-
DB_NAME=irms
3-
DB_PATH=/playtakdb
2+
DB_PATH=../playtakdb
43
NODE_ENV=local
54
APP_ENV=Local
65
CORS_DOMAIN='*'
7-
ANON_DB_PATH=/playtakdb/games_anon.db
6+
ANON_DB_PATH=../playtakdb/games_anon.db
87
DIST_PATH=dist/
98
PREVIOUS_FILE=previous.txt
109
RATING_OUTPUT_PATH=dist/

api/.eslintrc

Lines changed: 0 additions & 36 deletions
This file was deleted.

api/.eslintrc.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

api/.prettierrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"singleQuote": true,
3-
"trailingComma": "all",
3+
"trailingComma": "none",
44
"useTabs": true,
5-
"tabWidth": 4
5+
"tabWidth": 4,
6+
"printWidth": 120
67
}

api/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine3.21 AS development
1+
FROM node:22-alpine3.21 AS development
22
WORKDIR /usr/src/app
33

44
# Copy package files

api/eslint.config.mjs

Lines changed: 49 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,67 @@
1-
import typescriptEslintEslintPlugin from "@typescript-eslint/eslint-plugin";
2-
import globals from "globals";
3-
import tsParser from "@typescript-eslint/parser";
4-
import path from "node:path";
5-
import { fileURLToPath } from "node:url";
6-
import js from "@eslint/js";
7-
import { FlatCompat } from "@eslint/eslintrc";
1+
import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';
2+
import globals from 'globals';
3+
import tsParser from '@typescript-eslint/parser';
4+
import path from 'node:path';
5+
import { fileURLToPath } from 'node:url';
6+
import js from '@eslint/js';
7+
import { FlatCompat } from '@eslint/eslintrc';
88

99
const __filename = fileURLToPath(import.meta.url);
1010
const __dirname = path.dirname(__filename);
1111
const compat = new FlatCompat({
1212
baseDirectory: __dirname,
1313
recommendedConfig: js.configs.recommended,
14-
allConfig: js.configs.all
14+
allConfig: js.configs.all,
1515
});
1616

17-
export default [{
18-
ignores: ["**/.eslintrc.js"],
19-
}, ...compat.extends("plugin:@typescript-eslint/recommended"), {
20-
plugins: {
21-
"@typescript-eslint": typescriptEslintEslintPlugin,
17+
export default [
18+
{
19+
ignores: ['**/eslint.config.mjs'],
2220
},
23-
24-
languageOptions: {
25-
globals: {
26-
...globals.node,
27-
...globals.jest,
21+
...compat.extends(
22+
'plugin:@typescript-eslint/recommended',
23+
'plugin:prettier/recommended',
24+
),
25+
{
26+
plugins: {
27+
'@typescript-eslint': typescriptEslintPlugin,
2828
},
2929

30-
parser: tsParser,
31-
ecmaVersion: 5,
32-
sourceType: "module",
30+
languageOptions: {
31+
globals: {
32+
...globals.node,
33+
...globals.jest,
34+
},
3335

34-
parserOptions: {
35-
project: "tsconfig.json",
36-
tsconfigRootDir: "./",
37-
},
38-
},
36+
parser: tsParser,
37+
ecmaVersion: 5,
38+
sourceType: 'module',
3939

40-
rules: {
41-
"@typescript-eslint/interface-name-prefix": "off",
42-
"@typescript-eslint/explicit-function-return-type": "off",
43-
"@typescript-eslint/explicit-module-boundary-types": "off",
44-
"@typescript-eslint/no-explicit-any": "off",
45-
"@typescript-eslint/no-unused-expressions": "off",
46-
"eol-last": "off",
47-
"brace-style": "off",
48-
"comma-dangle": "off",
49-
"comma-spacing": "off",
50-
eqeqeq: "off",
51-
indent: "off",
52-
"key-spacing": "off",
53-
"keyword-spacing": "off",
54-
"max-len": "off",
55-
"no-ex-assign": "off",
56-
"no-extra-boolean-cast": "off",
57-
"no-floating-decimal": "off",
58-
"no-multi-spaces": "off",
59-
"no-throw-literal": "off",
60-
"no-unreachable": "off",
61-
radix: "off",
62-
"quote-props": "off",
63-
quotes: "off",
64-
"space-before-function-paren": "off",
65-
"space-in-parens": "off",
66-
"space-infix-ops": "off",
67-
"space-unary-ops": "off",
68-
"spaced-comment": "off",
69-
indent: ["warn", "tab", {
70-
SwitchCase: 1,
40+
parserOptions: {
41+
project: path.resolve(__dirname, 'tsconfig.json'),
42+
},
43+
},
7144

72-
ignoredNodes: [
73-
"FunctionExpression > .params[decorators.length > 0]",
45+
rules: {
46+
'@typescript-eslint/interface-name-prefix': 'off',
47+
'@typescript-eslint/explicit-function-return-type': 'off',
48+
'@typescript-eslint/explicit-module-boundary-types': 'off',
49+
'@typescript-eslint/no-explicit-any': 'off',
50+
indent: [
51+
'error',
52+
'tab',
53+
{
54+
SwitchCase: 1,
55+
flatTernaryExpressions: false,
56+
ignoredNodes: [
57+
'FunctionExpression[params]:has(Identifier[decorators])',
58+
"FunctionExpression > .params[decorators.length > 0]",
7459
"FunctionExpression > .params > :matches(Decorator, :not(:first-child))",
7560
"ClassBody.body > PropertyDefinition[decorators.length > 0] > .key",
61+
],
62+
},
7663
],
77-
}],
64+
'comma-dangle': 'off',
65+
},
7866
},
79-
}];
67+
];

0 commit comments

Comments
 (0)