Skip to content

Commit b0aec6d

Browse files
authored
Merge branch 'dev' into dependabot/npm_and_yarn/npm_and_yarn-0d75c3b79c
2 parents 3f0f158 + e77a3af commit b0aec6d

4 files changed

Lines changed: 629 additions & 241 deletions

File tree

.eslintrc.js

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
module.exports = {
2-
parser: 'babel-eslint',
2+
parser: '@babel/eslint-parser',
3+
parserOptions: {
4+
requireConfigFile: false, // allows using without a separate babel config
5+
babelOptions: {
6+
presets: ['@babel/preset-react'], // React JSX support
7+
},
8+
ecmaFeatures: {
9+
jsx: true,
10+
},
11+
ecmaVersion: 12,
12+
sourceType: 'module',
13+
},
314
env: {
415
browser: true,
516
es2021: true,
@@ -8,29 +19,13 @@ module.exports = {
819
'plugin:react/recommended',
920
'airbnb',
1021
],
11-
parserOptions: {
12-
ecmaFeatures: {
13-
jsx: true,
14-
},
15-
ecmaVersion: 12,
16-
sourceType: 'module',
17-
},
1822
plugins: [
1923
'react',
2024
],
2125
rules: {
22-
indent: [
23-
'error',
24-
4,
25-
],
26-
'react/jsx-indent': [
27-
'error',
28-
4,
29-
],
30-
'react/jsx-indent-props': [
31-
'error',
32-
4,
33-
],
26+
indent: ['error', 4],
27+
'react/jsx-indent': ['error', 4],
28+
'react/jsx-indent-props': ['error', 4],
3429
'max-len': [
3530
'error',
3631
{
@@ -54,14 +49,9 @@ module.exports = {
5449
},
5550
overrides: [
5651
{
57-
files: [
58-
'*ML.js',
59-
],
52+
files: ['*ML.js'],
6053
rules: {
61-
indent: [
62-
'error',
63-
2,
64-
],
54+
indent: ['error', 2],
6555
},
6656
},
6757
],

craco.config.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const webpack = require('webpack');
2+
3+
module.exports = {
4+
webpack: {
5+
configure: (webpackConfig) => {
6+
const newConfig = { ...webpackConfig }; // copy the original config
7+
8+
newConfig.resolve = {
9+
...newConfig.resolve,
10+
fallback: {
11+
...newConfig.resolve.fallback,
12+
timers: require.resolve('timers-browserify'),
13+
util: require.resolve('util/'),
14+
stream: require.resolve('stream-browserify'),
15+
buffer: require.resolve('buffer/'),
16+
process: require.resolve('process/browser.js'),
17+
},
18+
};
19+
20+
newConfig.plugins = [
21+
...newConfig.plugins,
22+
new webpack.ProvidePlugin({
23+
Buffer: ['buffer', 'Buffer'],
24+
process: 'process/browser.js',
25+
}),
26+
];
27+
28+
return newConfig;
29+
},
30+
},
31+
};

0 commit comments

Comments
 (0)