Skip to content

Commit

Permalink
chore: configure prettier (#427)
Browse files Browse the repository at this point in the history
* chore: use prettier to format style

* chore: bump dev dependencies
  • Loading branch information
Daniel Sanchez authored Apr 28, 2022
1 parent 761cef7 commit 7e428f1
Show file tree
Hide file tree
Showing 155 changed files with 4,761 additions and 4,192 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged --allow-empty
7 changes: 5 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"printWidth": 120,
"printWidth": 100,
"arrowParens": "avoid",
"trailingComma": "all",
"singleQuote": true
"singleQuote": true,
"semi": false,
"endOfLine": "auto"
}
28 changes: 14 additions & 14 deletions apps/compound/config-overrides.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const webpack = require('webpack');
const webpack = require('webpack')

module.exports = {
webpack: function (config, env) {
const fallback = config.resolve.fallback || {};
const fallback = config.resolve.fallback || {}

// https://github.com/ChainSafe/web3.js#web3-and-create-react-app
Object.assign(fallback, {
Expand All @@ -15,39 +15,39 @@ module.exports = {
url: require.resolve('url'),
// https://stackoverflow.com/questions/68707553/uncaught-referenceerror-buffer-is-not-defined
buffer: require.resolve('buffer'),
});
})

config.resolve.fallback = fallback;
config.resolve.fallback = fallback

config.plugins = (config.plugins || []).concat([
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
}),
]);
])

// https://github.com/facebook/create-react-app/issues/11924
config.ignoreWarnings = [/to parse source map/i];
config.ignoreWarnings = [/to parse source map/i]

return config;
return config
},
jest: function (config) {
return config;
return config
},
devServer: function (configFunction) {
return function (proxy, allowedHost) {
const config = configFunction(proxy, allowedHost);
const config = configFunction(proxy, allowedHost)

config.headers = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET',
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
};
}

return config;
};
return config
}
},
paths: function (paths) {
return paths;
return paths
},
};
}
Loading

0 comments on commit 7e428f1

Please sign in to comment.