Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Switch to npm #592

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 0 additions & 59 deletions client/.eslintrc

This file was deleted.

11 changes: 4 additions & 7 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
FROM node:20-alpine as build
ENV YARN_VERSION 4.0.1
RUN yarn policies set-version $YARN_VERSION
WORKDIR /app
RUN yarn config set httpTimeout 300000
COPY package.json ./
COPY yarn.lock ./
RUN yarn
COPY package-lock.json ./
RUN npm install

ARG SERVER_HOST
ARG KEYCLOAK_HOST
Expand All @@ -16,8 +13,8 @@ ENV REACT_APP_KEYCLOAK_HOST $KEYCLOAK_HOST
ENV REACT_APP_KEYCLOAK_REALM_NAME $KEYCLOAK_REALM_NAME

COPY . ./
RUN yarn install
RUN yarn build
RUN npm install
RUN npm run build

FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
Expand Down
91 changes: 91 additions & 0 deletions client/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
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(
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended"
)), {
files: [
"src/**/*.js",
"src/**/*.jsx",
"src/**/*.ts",
"src/**/*.tsx",
],

plugins: {
"@typescript-eslint": fixupPluginRules(typescriptEslint),
react: fixupPluginRules(react),
"react-hooks": fixupPluginRules(reactHooks),
},

languageOptions: {
globals: {
...globals.browser,
...globals.jest,
},

parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",

parserOptions: {
ecmaFeatures: {
jsx: true,
},

project: ["tsconfig.json"],
},
},

settings: {
react: {
version: "detect",
},
},

rules: {
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],

"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/return-await": "off",

"max-len": ["warn", {
code: 160,
ignoreComments: true,
ignoreUrls: true,
}],

"react/react-in-jsx-scope": "off",

"react/jsx-filename-extension": [1, {
extensions: [".tsx", ".jsx"],
}],

"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",

"prettier/prettier": ["error", {
endOfLine: "auto",
}]
},
}];
Loading