Merge branch 'update-packages' into 'master'

Update dependencies

See merge request sahkoinsinoorikilta/vtmk/web2.0-frontend!101
This commit is contained in:
Aarni Halinen
2022-04-10 21:30:42 +00:00
12 changed files with 5082 additions and 5718 deletions
+5 -1
View File
@@ -3,7 +3,7 @@ module.exports = {
"eslint:recommended",
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
// "airbnb/hooks",
"plugin:import/recommended",
"plugin:@typescript-eslint/recommended",
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
@@ -36,6 +36,10 @@ module.exports = {
"react/jsx-one-expression-per-line": "off",
"react/require-default-props": "off",
"react/default-props-match-prop-types": "off",
"react/function-component-definition": ["error", {
namedComponents: "arrow-function",
unnamedComponents: "arrow-function",
}],
// Temp
"react/no-array-index-key": "warn",
"jsx-a11y/label-has-associated-control": "off",
+5026 -5668
View File
File diff suppressed because it is too large Load Diff
+33 -32
View File
@@ -34,58 +34,59 @@
"prepare": "husky install"
},
"devDependencies": {
"@types/jest": "^27.0.1",
"@types/js-cookie": "^2.2.7",
"@types/jest": "^27.4.1",
"@types/js-cookie": "^3.0.1",
"@types/react": "^17.0.19",
"@types/react-beautiful-dnd": "^13.1.1",
"@types/react-beautiful-dnd": "^13.1.2",
"@types/react-csv": "^1.1.2",
"@types/react-dom": "^17.0.9",
"@types/shortid": "^0.0.29",
"@types/styled-components": "^5.1.12",
"@typescript-eslint/eslint-plugin": "^4.29.2",
"@typescript-eslint/parser": "^4.29.2",
"babel-plugin-styled-components": "^1.13.2",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-airbnb-typescript": "^13.0.0",
"eslint-config-next": "^12.1.0",
"husky": "^7.0.1",
"jest": "^27.1.0",
"next-sitemap": "^2.4.2",
"@types/styled-components": "^5.1.25",
"@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.18.0",
"babel-plugin-styled-components": "^2.0.7",
"eslint": "^8.13.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-next": "^12.1.4",
"eslint-plugin-import": "^2.26.0",
"husky": "^7.0.4",
"jest": "^27.5.1",
"next-sitemap": "^2.5.19",
"npm-run-all": "^4.1.5",
"postcss-jsx": "^0.36.4",
"postcss-syntax": "^0.36.2",
"stylelint": "^14.2.0",
"stylelint-config-recommended": "^6.0.0",
"stylelint-config-styled-components": "^0.1.1",
"testcafe": "^1.18.3",
"ts-jest": "^27.0.5",
"typescript": "^4.3.5"
"testcafe": "^1.18.5",
"ts-jest": "^27.1.4",
"typescript": "^4.6.3"
},
"dependencies": {
"@next/bundle-analyzer": "^12.1.0",
"@rjsf/core": "^3.2.1",
"@sentry/nextjs": "^6.17.9",
"axios": "^0.26.0",
"date-fns": "^2.23.0",
"@next/bundle-analyzer": "^12.1.4",
"@rjsf/core": "^4.1.1",
"@sentry/nextjs": "^6.19.6",
"axios": "^0.26.1",
"date-fns": "^2.28.0",
"fast-deep-equal": "^3.1.3",
"js-cookie": "^3.0.0",
"js-cookie": "^3.0.1",
"lodash": "^4.17.21",
"next": "^12.1.0",
"next": "^12.1.4",
"normalize.css": "^8.0.1",
"react": "^17.0.2",
"react-beautiful-dnd": "^13.1.0",
"react-csv": "^2.0.3",
"react-csv": "^2.2.2",
"react-dom": "^17.0.2",
"react-is": "^17.0.2",
"react-markdown": "^7.0.0",
"react-markdown": "^8.0.2",
"react-mde": "^11.5.0",
"react-toastify": "^7.0.4",
"rehype-raw": "^6.0.0",
"rehype-sanitize": "^5.0.0",
"sharp": "^0.30.1",
"react-toastify": "^8.2.0",
"rehype-raw": "^6.1.1",
"rehype-sanitize": "^5.0.1",
"sharp": "^0.30.3",
"shortid": "^2.2.16",
"styled-components": "^5.3.0",
"swr": "^0.5.6"
"styled-components": "^5.3.5",
"swr": "^1.2.2"
}
}
+1
View File
@@ -1,3 +1,4 @@
/* eslint-disable react/no-invalid-html-attribute */
import React from "react";
const Icons = (): JSX.Element => (
+3 -3
View File
@@ -28,13 +28,13 @@ const generateFetchParams = (id = "", options: Options = {}) => {
};
interface FetchArguments {
initialData?: Event | Event[],
fallbackData?: Event | Event[],
id?: string;
options?: Options
}
const useFetchEvents = ({
initialData,
fallbackData,
id = "",
options = {},
}: FetchArguments) => {
@@ -46,7 +46,7 @@ const useFetchEvents = ({
configRef.current = config;
}
const { data, error } = useSWR([url, configRef.current], fetcher, { initialData });
const { data, error } = useSWR([url, configRef.current], fetcher, { fallbackData });
return {
data: data?.results || data,
error,
+3 -3
View File
@@ -25,13 +25,13 @@ const generateFetchParams = (id = "", options: Options = {}) => {
};
interface FetchArguments {
initialData?: Post | Post[],
fallbackData?: Post | Post[],
id?: string;
options?: Options
}
const useFetchFeed = ({
initialData,
fallbackData,
id = "",
options = {},
}: FetchArguments) => {
@@ -43,7 +43,7 @@ const useFetchFeed = ({
configRef.current = config;
}
const { data, error } = useSWR([url, configRef.current], feedFetcher, { initialData });
const { data, error } = useSWR([url, configRef.current], feedFetcher, { fallbackData });
return {
data: data?.results || data,
error,
+3 -3
View File
@@ -28,13 +28,13 @@ const generateFetchParams = (id = "", options: Options = {}) => {
};
interface FetchArguments {
initialData?: JobAd | JobAd[],
fallbackData?: JobAd | JobAd[],
id?: string;
options?: Options;
}
const useFetchJobAds = ({
initialData,
fallbackData,
id = "",
options = {},
}: FetchArguments) => {
@@ -46,7 +46,7 @@ const useFetchJobAds = ({
configRef.current = config;
}
const { data, error } = useSWR([url, configRef.current], jobAdFetcher, { initialData });
const { data, error } = useSWR([url, configRef.current], jobAdFetcher, { fallbackData });
return {
data: data?.results || data,
error,
+2 -2
View File
@@ -24,8 +24,8 @@ interface InitialProps {
}
const InEnglishPage: NextPage<InitialProps> = ({ initialEvents, initialFeed }) => {
const eventResult = useFetchEvents({ initialData: initialEvents, options: eventOptions });
const feedResult = useFetchFeed({ initialData: initialFeed, options: feedOptions });
const eventResult = useFetchEvents({ fallbackData: initialEvents, options: eventOptions });
const feedResult = useFetchFeed({ fallbackData: initialFeed, options: feedOptions });
return (
<>
+2 -2
View File
@@ -24,8 +24,8 @@ interface InitialProps {
}
const FrontPage: NextPage<InitialProps> = ({ initialEvents, initialFeed }) => {
const eventResult = useFetchEvents({ initialData: initialEvents, options: eventOptions });
const feedResult = useFetchFeed({ initialData: initialFeed, options: feedOptions });
const eventResult = useFetchEvents({ fallbackData: initialEvents, options: eventOptions });
const feedResult = useFetchFeed({ fallbackData: initialFeed, options: feedOptions });
return (
<>
+2 -2
View File
@@ -16,8 +16,8 @@ interface InitialProps {
}
const ActualPage: NextPage<InitialProps> = ({ initialEvents, initialFeed }) => {
const eventResult = useFetchEvents({ initialData: initialEvents });
const feedResult = useFetchFeed({ initialData: initialFeed });
const eventResult = useFetchEvents({ fallbackData: initialEvents });
const feedResult = useFetchFeed({ fallbackData: initialFeed });
return (
<>
+1 -1
View File
@@ -24,7 +24,7 @@ const SignUpPage: NextPage<InitialProps> = ({ initialForm }) => {
const router = useRouter();
const id = String(initialForm?.id ?? "");
const URL = `${FORM_URL}${id}/`;
const { data, error } = useSWR<SignupForm>(URL, (url) => axios.get(url).then((res) => res.data), { initialData: initialForm });
const { data, error } = useSWR<SignupForm>(URL, (url) => axios.get(url).then((res) => res.data), { fallbackData: initialForm });
if (error) {
console.error(error);
+1 -1
View File
@@ -13,7 +13,7 @@ interface InitialProps {
const CorporatePage: NextPage<InitialProps> = ({ initialJobAds }) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { data, error } = useFetchJobAds({ initialData: initialJobAds });
const { data, error } = useFetchJobAds({ fallbackData: initialJobAds });
return (
<>
<Head>