Skip to content
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
18 changes: 15 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,39 @@ module.exports = {
env: {
browser: true,
es2021: true,
"jest/globals": true,
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"standard",
"prettier",
"plugin:jest/all",
"plugin:json/recommended",
"plugin:storybook/recommended",
],
parserOptions: {
ecmaVersion: 12,
project: ["tsconfig.json"],
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: "module",
},
plugins: ["react", "react-hooks", "prettier", "jest", "json"],
rules: {
"react/prop-types": [2, { ignore: ["children"] }],
"react/prop-types": [
2,
{
ignore: ["children"],
},
],
"jest/no-hooks": "off",
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error",
},
settings: {
react: {
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14"
node-version: "16"
- run: npm ci
- run: npm run prettier-ci
- run: npm run lint
Expand All @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14"
node-version: "16"
- run: npm ci
- run: npm run storybook-ci
test:
Expand All @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14"
node-version: "16"
- run: npm ci
- name: Increase system file watchers
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
10 changes: 6 additions & 4 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
module.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/preset-create-react-app",
"@storybook/addon-actions",
"@storybook/addon-links",
"@storybook/addon-storysource",
"@storybook/addon-essentials",
"@storybook/addon-knobs/register",
"@storybook/addon-interactions",
"@storybook/preset-create-react-app",
],
framework: "@storybook/react",
core: {
builder: "@storybook/builder-webpack5",
},
};
6 changes: 2 additions & 4 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React, { Suspense } from "react";
import { addParameters, addDecorator } from "@storybook/react";
import { QueryClient, QueryClientProvider } from "react-query";
import { MINIMAL_VIEWPORTS } from "@storybook/addon-viewport";
import { withKnobs } from "@storybook/addon-knobs";
import StoryRouter from "storybook-react-router";
import { withRouter } from "storybook-addon-react-router-v6";
import { HelmetProvider } from "react-helmet-async";
import UserContextMock from "./UserContextMock";
import { MediaContextProvider } from "config/media";
Expand All @@ -14,8 +13,7 @@ import "../src/index.css";

const queryClient = new QueryClient();

addDecorator(withKnobs);
addDecorator(StoryRouter());
addDecorator(withRouter);
addDecorator((storyFn) => <Suspense fallback="Loading...">{storyFn()}</Suspense>);
addDecorator((storyFn) => <MediaContextProvider>{storyFn()}</MediaContextProvider>);
addDecorator((storyFn) => <HelmetProvider>{storyFn()}</HelmetProvider>);
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 16.16.0
Loading