Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/frontend dependencies updates #235

Draft
wants to merge 35 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
554e17f
update webpack from 4 to 5
Oct 13, 2022
3874df4
fix build error introduced by es2020 syntax
Oct 13, 2022
5c78272
update jest
Oct 13, 2022
4150e3d
update corejs lib
Oct 13, 2022
e6d156a
add missing lib
Oct 13, 2022
45d11ff
exclude node module from css minify
Oct 13, 2022
e75c4ef
fix syntax
Oct 13, 2022
cc37070
Merge branch 'develop' of https://github.com/uwcirg/cosri-patientsear…
Nov 29, 2022
f42171c
fix build error
Nov 29, 2022
8caa8e1
update package json
Nov 29, 2022
0d595fa
fix babel file
Nov 29, 2022
eaa803f
Merge branch 'develop' of https://github.com/uwcirg/cosri-patientsear…
Dec 16, 2024
23c3251
update dependencies, tests, code after updates
Dec 28, 2024
fa943c5
lint fixes
Dec 28, 2024
3de41bc
undo change
Dec 28, 2024
f64c065
fix babel package
Dec 30, 2024
45d8437
add missing dependency
Dec 30, 2024
090bb0f
add missing dependencies
Dec 30, 2024
73d4860
generate new package lock file
Dec 30, 2024
665e8eb
remove unused lib
Dec 31, 2024
40f51e8
use updated lint library
Dec 31, 2024
20d62b9
fix date-io version
Dec 31, 2024
193bb1d
fix babel install
Dec 31, 2024
6488ea3
update dependencies, bug fix
Jan 1, 2025
83b2600
lib updates, code fixes
Jan 7, 2025
1cd2e0a
fix test node version
Jan 7, 2025
7e893e1
code refactor, fix test
Jan 13, 2025
2229244
put old code back
Jan 13, 2025
6d4e1d7
put old code back
Jan 13, 2025
3b956ab
dropdown fix
Jan 14, 2025
6a5a384
Merge branch 'develop' of https://github.com/uwcirg/cosri-patientsear…
Jan 15, 2025
39252c0
update babel-loader
Jan 15, 2025
9caccf8
bug fix, variables fixes
Jan 16, 2025
7a4708d
add null check
Jan 21, 2025
af55fe1
fix return
Jan 22, 2025
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
11 changes: 9 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
"useBuiltIns": "usage",
"corejs": 3,
"targets": {
"browsers": ["> 0.5%", "last 2 versions", "ie >= 10", "edge >= 12", "firefox >= 50", "chrome >= 50", "safari >= 11.1"]
"browsers": ["> 0.25%, not dead"]
}
}]
}],
["@babel/preset-react"]
],
"plugins": [
[
"@babel/plugin-transform-optional-chaining"
],
[
"@babel/plugin-transform-nullish-coalescing-operator"
],
[
"transform-react-jsx"
],
Expand Down
54 changes: 0 additions & 54 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ patientsearch/static/favicon.ico
patientsearch/templates/index.html
report.*
node_modules
patientsearch/**/__snapshots__
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12 as frontend
FROM node:20 as frontend

RUN mkdir /tmp/frontend
WORKDIR /tmp/frontend
Expand Down
5 changes: 0 additions & 5 deletions enzyme.config.js

This file was deleted.

93 changes: 93 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import { fixupPluginRules } from "@eslint/compat";
import globals from "globals";
import babelParser from "@babel/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 [...compat.extends(
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
), {
plugins: {
react,
"react-hooks": fixupPluginRules(reactHooks),
},

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

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

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

settings: {
react: {
pragma: "React",
version: "detect",
fragment: "Fragment",
},

propWrapperFunctions: ["forbidExtraProps", {
property: "freeze",
object: "Object",
}, {
property: "myFavoriteWrapper",
}, {
property: "forbidExtraProps",
exact: true,
}],

componentWrapperFunctions: ["observer", {
property: "styled",
}, {
property: "observer",
object: "Mobx",
}, {
property: "observer",
object: "<pragma>",
}],
},

rules: {
semi: "error",
"react/react-in-jsx-scope": "off",
"react/display-name": "off",
"no-useless-escape": "off",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
},
}, {
files: ["**/__tests__/**/*"],

languageOptions: {
globals: {
...globals.jest,
},
},
}];
7 changes: 5 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ["js", "json", "jsx"],
setupFiles: ["./enzyme.config.js"],
// setupFiles: ["./enzyme.config.js"],
testEnvironment: "jsdom",
testMatch: ["**/__tests__/**/*.js?(x)", "**/?(*.)+(spec|test).js?(x)"],
testPathIgnorePatterns: ["\\\\node_modules\\\\"],
Expand All @@ -10,5 +10,8 @@ module.exports = {
"^[./a-zA-Z0-9$_-]+\\.(png|jpeg|tiff)$": "<rootDir>/patientsearch/src/__mocks__/fileMock.js",
"^[./a-zA-Z0-9$_-]+\\.(css|less|scss)$": "<rootDir>/patientsearch/src/__mocks__/styleMock.js"
},
verbose: true
verbose: true,
// snapshotSerializers: [
// "enzyme-to-json/serializer"
// ]
};
Loading
Loading