Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@ module.exports = {
'consistent-return': 'warn',
eqeqeq: 'warn',
'react/jsx-one-expression-per-line': 'off',
// Rules relaxed for Node/CRA 5 upgrade compatibility
'no-undef': 'off', // TypeScript handles this via type checking
'no-redeclare': 'off',
'no-use-before-define': 'off',
'no-promise-executor-return': 'off',
'no-param-reassign': ['error', { props: false }],
'default-param-last': 'warn',
'arrow-body-style': 'warn',
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: ['craco.config.js'] },
],
'react/require-default-props': 'off',
'react/default-props-match-prop-types': 'off',
'react/function-component-definition': 'off',
'react/no-array-index-key': 'warn',
'react/jsx-no-useless-fragment': 'warn',
'react/jsx-no-bind': 'warn',
'react/no-unused-prop-types': 'warn',
'react/no-unstable-nested-components': 'warn',
},
settings: {
'import/resolver': {
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.19.2
20.19.0
28 changes: 0 additions & 28 deletions .rescriptsrc.js

This file was deleted.

73 changes: 73 additions & 0 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
const webpack = require('webpack');

module.exports = {
babel: {
plugins: [
'react-require',
[
'babel-plugin-formatjs',
{
idInterpolationPattern: '[sha512:contenthash:base64:6]',
ast: true,
},
],
],
},
eslint: {
enable: true,
configure: {
extends: ['react-app'],
plugins: ['eslint-plugin-formatjs'],
rules: {
'formatjs/enforce-default-message': 'error',
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': 'warn',
'default-param-last': 'warn',
'arrow-body-style': 'warn',
'react/jsx-no-useless-fragment': 'warn',
'react/jsx-no-bind': 'warn',
'react/function-component-definition': 'warn',
'no-undef': 'off',
},
},
pluginOptions: (eslintOptions) => {
eslintOptions.failOnError = false;
return eslintOptions;
},
},
webpack: {
configure: (webpackConfig) => {
webpackConfig.resolve.alias = {
...webpackConfig.resolve.alias,
'process/browser': require.resolve('process/browser.js'),
};
webpackConfig.resolve.fallback = {
...webpackConfig.resolve.fallback,
stream: require.resolve('stream-browserify'),
crypto: require.resolve('crypto-browserify'),
assert: require.resolve('assert'),
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
os: require.resolve('os-browserify/browser'),
url: require.resolve('url'),
buffer: require.resolve('buffer'),
fs: false,
path: false,
net: false,
tls: false,
child_process: false,
vm: require.resolve('vm-browserify'),
};
webpackConfig.plugins = [
...webpackConfig.plugins,
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
}),
];
// Ignore source-map warnings from node_modules
webpackConfig.ignoreWarnings = [/Failed to parse source map/];
return webpackConfig;
},
},
};
12 changes: 8 additions & 4 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
directory = "netlify/functions"

[context.production.environment]
NODE_VERSION = "14.19.2"
NODE_VERSION = "20.19.0"
CI = "false"
[context.deploy-preview.environment]
NODE_VERSION = "14.19.2"
NODE_VERSION = "20.19.0"
CI = "false"
[context.branch-deploy.environment]
NODE_VERSION = "14.19.2"
NODE_VERSION = "20.19.0"
CI = "false"
[context.dev.environment]
NODE_VERSION = "14.19.2"
NODE_VERSION = "20.19.0"
CI = "false"
197 changes: 120 additions & 77 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,88 +5,95 @@
"dependencies": {
"@chainsafe/bls": "^2.0.0",
"@chainsafe/ssz": "^0.6.7",
"@ethersproject/providers": "^5.0.0-beta.151",
"@ethersproject/units": "^5.0.0-beta.132",
"@rescripts/cli": "^0.0.15",
"@rescripts/rescript-env": "^0.0.12",
"@types/numeral": "^0.0.28",
"@craco/craco": "^7.1.0",
"@ethersproject/providers": "^5.7.2",
"@ethersproject/units": "^5.7.0",
"@types/numeral": "^2.0.5",
"@types/react-animate-on-scroll": "^2.1.2",
"@types/react-copy-to-clipboard": "^4.3.0",
"@types/react-helmet": "^6.1.0",
"@types/react-scroll": "^1.5.4",
"@types/react-tooltip": "^3.11.0",
"@types/react-copy-to-clipboard": "^5.0.7",
"@types/react-helmet": "^6.1.11",
"@types/react-scroll": "^1.8.10",
"@types/react-tooltip": "^4.2.4",
"@web3-react/abstract-connector": "6.0.7",
"@web3-react/core": "^6.0.7",
"@web3-react/fortmatic-connector": "^6.0.7",
"@web3-react/core": "^6.1.9",
"@web3-react/fortmatic-connector": "^6.1.6",
"@web3-react/injected-connector": "6.0.7",
"@web3-react/types": "^6.0.7",
"animate.css": "^3.7.2",
"animate.css": "^4.1.1",
"animate.css-react": "^1.0.0",
"axios": "^0.21.2",
"babel-plugin-formatjs": "^9.0.4",
"babel-plugin-react-require": "^3.1.3",
"bignumber.js": "^9.0.0",
"axios": "^1.7.9",
"babel-plugin-formatjs": "^10.5.16",
"babel-plugin-react-require": "^4.0.3",
"bignumber.js": "^9.1.2",
"d3": "^5.16.0",
"eslint-plugin-formatjs": "^2.12.0",
"eslint-plugin-formatjs": "^5.2.5",
"ethereumjs-util": "^7.1.5",
"fortmatic": "^2.0.5",
"grommet": "^2.10.0",
"grommet-controls": "^2.0.4",
"grommet-icons": "^4.4.0",
"fortmatic": "^2.4.0",
"grommet": "^2.38.1",
"grommet-icons": "^4.12.1",
"history": "^4.10.1",
"lodash": "^4.17.21",
"numeral": "^2.0.6",
"react": "^16.12.0",
"react-animate-on-scroll": "^2.1.5",
"react": "^17.0.2",
"react-animate-on-scroll": "^2.1.9",
"react-animated-css": "^1.2.1",
"react-copy-to-clipboard": "^5.0.2",
"react-dom": "^16.12.0",
"react-dropzone": "^10.2.1",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^17.0.2",
"react-dropzone": "^14.3.5",
"react-helmet": "^6.1.0",
"react-intl": "^5.10.16",
"react-redux": "^7.1.3",
"react-router-dom": "^5.1.2",
"react-router-hash-link": "^2.0.0",
"react-scripts": "^3.4.0",
"react-scroll": "^1.7.16",
"react-tooltip": "^4.1.3",
"redux": "^4.0.5",
"styled-components": "^5.0.0",
"tiny-invariant": "^1.1.0",
"typescript": "^3.8.3",
"web3": "^1.7.5",
"web3-utils": "^1.2.6",
"yarn": "^1.22.13"
"react-intl": "^6.8.7",
"react-redux": "^8.1.3",
"react-router-dom": "^5.3.4",
"react-router-hash-link": "^2.4.3",
"react-scripts": "5.0.1",
"react-scroll": "^1.9.0",
"react-tooltip": "^4.5.1",
"redux": "^4.2.1",
"styled-components": "^5.3.11",
"tiny-invariant": "^1.3.3",
"typescript": "^4.9.5",
"web3": "^1.10.4",
"web3-utils": "^1.10.4"
},
"devDependencies": {
"@formatjs/cli": "^3.0.5",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@types/d3": "^5.7.2",
"@types/jest": "^24.0.0",
"@types/lodash": "^4.14.149",
"@types/node": "^12.0.0",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"@types/react-redux": "^7.1.7",
"@types/react-router-dom": "^5.1.3",
"@types/react-router-hash-link": "^2.4.5",
"@types/styled-components": "^4.4.2",
"@typescript-eslint/eslint-plugin": "^2.24.0",
"@typescript-eslint/parser": "^2.24.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^2.5.0",
"husky": "^4.2.3",
"lint-staged": "^10.0.8",
"prettier": "1.19.1",
"tslint-plugin-prettier": "^2.2.0"
"@formatjs/cli": "^6.3.12",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^14.5.2",
"@types/d3": "^5.16.0",
"@types/jest": "^29.5.14",
"@types/lodash": "^4.17.13",
"@types/node": "^20.17.12",
"@types/react": "^17.0.80",
"@types/react-dom": "^17.0.25",
"@types/react-redux": "^7.1.34",
"@types/react-router-dom": "^5.3.3",
"@types/react-router-hash-link": "^2.4.9",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"assert": "^2.1.0",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.1",
"eslint": "^8.57.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.3",
"eslint-plugin-react-hooks": "^4.6.2",
"https-browserify": "^1.0.0",
"husky": "^4.3.8",
"lint-staged": "^15.2.11",
"os-browserify": "^0.3.0",
"prettier": "^3.4.2",
"process": "^0.11.10",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"url": "^0.11.4",
"vm-browserify": "^1.1.2",
"webpack": "^5.97.1"
},
"husky": {
"hooks": {
Expand All @@ -95,18 +102,17 @@
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"yarn extract",
"yarn compile",
"bash -c 'yarn extract'",
"bash -c 'yarn compile'",
"git add src/intl/*",
"npx prettier --write '{,!(node_modules)/**/}*.{ts,tsx}'",
"yarn run eslint src --ext .js,.jsx,.ts,.tsx --fix-dry-run"
"npx prettier --write",
"bash -c 'yarn run eslint src --ext .js,.jsx,.ts,.tsx --fix-dry-run'"
]
},
"scripts": {
"start": "rescripts start",
"build": "rescripts build",
"test": "rescripts test",
"eject": "rescripts eject",
"start": "craco start",
"build": "craco build",
"test": "craco test",
"extract": "formatjs extract 'src/**/*.{t,j}sx' --out-file src/intl/en.json --id-interpolation-pattern '[sha512:contenthash:base64:6]' --format crowdin",
"compile": "formatjs compile src/intl/en.json --format crowdin --out-file src/intl/compiled/en.json --ast"
},
Expand All @@ -119,7 +125,40 @@
"plugins": [
"@typescript-eslint",
"prettier"
]
],
"rules": {
"no-undef": "off",
"no-redeclare": "off",
"no-use-before-define": "off",
"no-promise-executor-return": "off",
"@typescript-eslint/no-redeclare": "warn",
"@typescript-eslint/no-use-before-define": "off",
"no-param-reassign": [
"error",
{
"props": false
}
],
"no-shadow": "warn",
"default-param-last": "warn",
"arrow-body-style": "warn",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"craco.config.js"
]
}
],
"react/require-default-props": "off",
"react/default-props-match-prop-types": "off",
"react/no-unused-prop-types": "warn",
"react/no-unstable-nested-components": "warn",
"react/jsx-no-useless-fragment": "warn",
"react/jsx-no-bind": "warn",
"react/function-component-definition": "off",
"react/no-array-index-key": "warn"
}
},
"browserslist": {
"production": [
Expand All @@ -132,5 +171,9 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"resolutions": {
"@types/react": "^17.0.80",
"@types/react-dom": "^17.0.25"
}
}
Loading