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

[CORL-2451]: Update to React 18 #4056

Merged
merged 13 commits into from
Sep 27, 2022
  •  
  •  
  •  
12 changes: 10 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const typescriptEslintRecommended = require("@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended")
.overrides[0];
const typescriptEslintRecommended =
require("@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended")
.overrides[0];
const typescriptRecommended = require("@typescript-eslint/eslint-plugin/dist/configs/recommended.js");
const typescriptRecommendedTypeChecking = require("@typescript-eslint/eslint-plugin/dist/configs/recommended-requiring-type-checking.js");
const typescriptEslintPrettier = require("eslint-config-prettier/@typescript-eslint");
Expand Down Expand Up @@ -182,10 +183,17 @@ module.exports = {
"plugin:jsdoc/recommended",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"prettier",
],
parserOptions: {
ecmaVersion: 2018,
},
settings: {
react: {
version: "detect",
},
},
rules: {
"arrow-body-style": "off",
"arrow-parens": ["off", "as-needed"],
Expand Down
38 changes: 37 additions & 1 deletion config/jest/client.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
const path = require("path");

const d3Pkgs = [
"d3",
"d3-array",
"d3-axis",
"d3-brush",
"d3-chord",
"d3-color",
"d3-contour",
"d3-delaunay",
"d3-dispatch",
"d3-drag",
"d3-dsv",
"d3-ease",
"d3-fetch",
"d3-force",
"d3-format",
"d3-geo",
"d3-hierarchy",
"d3-interpolate",
"d3-path",
"d3-polygon",
"d3-quadtree",
"d3-random",
"d3-scale",
"d3-scale-chromatic",
"d3-selection",
"d3-shape",
"d3-time",
"d3-time-format",
"d3-timer",
"d3-transition",
"d3-zoom",
];
Comment on lines +3 to +35
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is cool, didn't know we were using d3 in places! 👍


module.exports = {
displayName: "client",
rootDir: "../../",
Expand All @@ -23,7 +57,9 @@ module.exports = {
"<rootDir>/config/jest/fileTransform.js",
},
transformIgnorePatterns: [
"[/\\\\]node_modules[/\\\\](?!(fluent|react-relay-network-modern|@coralproject/rte/lib)[/\\\\]).+\\.(js|jsx|mjs|ts|tsx)$",
`[/\\\\]node_modules[/\\\\](?!(fluent|react-relay-network-modern|@coralproject/rte/lib|internmap|${d3Pkgs.join(
"|"
)})[/\\\\]).+\\.(js|jsx|mjs|ts|tsx)$`,
],
moduleNameMapper: {
"^coral-account/(.*)$": "<rootDir>/src/core/client/account/$1",
Expand Down
Loading