Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewgdewar committed Sep 27, 2023
1 parent f223ebf commit 6906d58
Show file tree
Hide file tree
Showing 37 changed files with 12,013 additions and 9,253 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.14.0
v18.12.1
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"editor.detectIndentation": false,
"[typescriptreact]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"[javascript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
Expand Down
47 changes: 27 additions & 20 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
require.extensions['.css'] = () => undefined;

module.exports = {
presets: [['@babel/env', { modules: 'commonjs' }], '@babel/react'],
plugins: [
'@babel/plugin-transform-runtime',
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-proposal-class-properties',
[
'transform-imports',
{
'@patternfly/react-icons': {
transform: (importName) =>
`@patternfly/react-icons/dist/js/icons/${importName
.split(/(?=[A-Z])/)
.join('-')
.toLowerCase()}`,
preventFullImport: true,
},
},
'react-icons',
env: {
test: {
plugins: ['@babel/plugin-transform-modules-commonjs']
}
},
presets: [
['@babel/preset-env', { modules: 'commonjs' }],
'@babel/react',
'@babel/preset-typescript'
],
plugins: [
'@babel/plugin-transform-object-rest-spread',
'@babel/plugin-transform-runtime',
[
'transform-imports',
{
'@patternfly/react-icons': {
transform: (importName) =>
`@patternfly/react-icons/dist/js/icons/${importName
.split(/(?=[A-Z])/)
.join('-')
.toLowerCase()}`,
preventFullImport: true,
},
},
'react-icons',
],
],
],
};
4 changes: 2 additions & 2 deletions config/setupTests.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { mockInsights } from 'insights-common-typescript-dev';
// import { mockInsights } from 'insights-common-typescript-dev';
import React from 'react';

declare const global;
global.React = React;
mockInsights();
// mockInsights();
8 changes: 6 additions & 2 deletions fec.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ module.exports = {
*/
plugins: [],
moduleFederation: {
exclude: ['react-router-dom'],
shared: [{ 'react-router-dom': { singleton: true } }],
exclude: [
'react-router-dom'
],
shared: [
{ 'react-router-dom': { singleton: true, version:'5.3.3' } }
],
},
};
5 changes: 3 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
preset: 'ts-jest',
preset: 'ts-jest/presets/js-with-babel',
testEnvironment: 'jsdom',
coverageDirectory: './coverage',
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!**/node_modules/**', '!test/**'],
collectCoverageFrom: ['src/**/*.test.{ts,tsx}', '!**/node_modules/**', '!test/**'],
coveragePathIgnorePatterns: [],
setupFiles: ['<rootDir>/config/setupTests.ts'],
setupFilesAfterEnv: ['<rootDir>/config/setupTestFramework.ts'],
Expand All @@ -11,4 +11,5 @@ module.exports = {
'\\.(svg)$': 'identity-obj-proxy',
'\\.(css|scss)$': 'identity-obj-proxy',
},
transformIgnorePatterns: [ 'node_modules/(?!@redhat-cloud-services|@openshift|lodash-es|uuid)' ],
};
Loading

0 comments on commit 6906d58

Please sign in to comment.