Modify .prettierrc and prettify `contract-verification-plugin` folder

pull/5285/head
Kaan Uzdoğan 5 months ago committed by Aniket
parent 6d56bf4135
commit 61c0e01c83
  1. 4
      .prettierrc.json
  2. 8
      apps/contract-verification/.babelrc
  3. 2
      apps/contract-verification/.eslintrc
  4. 2
      apps/contract-verification/src/app/layouts/index.ts
  5. 2
      apps/contract-verification/src/app/types/ThemeType.ts
  6. 4
      apps/contract-verification/src/environments/environment.prod.ts
  7. 4
      apps/contract-verification/src/environments/environment.ts
  8. 3
      apps/contract-verification/src/index.html
  9. 10
      apps/contract-verification/src/main.tsx
  10. 4
      apps/contract-verification/src/polyfills.ts
  11. 20
      apps/contract-verification/webpack.config.js

@ -1,9 +1,7 @@
{
"tabWidth": 2,
"printWidth": 500,
"bracketSpacing": false,
"useTabs": false,
"semi": false,
"singleQuote": true,
"bracketSpacing": false
"singleQuote": true
}

@ -1,9 +1,5 @@
{
"presets": ["@babel/preset-env", ["@babel/preset-react",
{"runtime": "automatic"}
]],
"presets": ["@babel/preset-env", ["@babel/preset-react", { "runtime": "automatic" }]],
"plugins": ["@babel/plugin-proposal-class-properties", "@babel/plugin-transform-runtime", "@babel/plugin-proposal-nullish-coalescing-operator"],
"ignore": [
"**/node_modules/**"
]
"ignore": ["**/node_modules/**"]
}

@ -1,3 +1,3 @@
{
"extends": "../../.eslintrc.json",
"extends": "../../.eslintrc.json"
}

@ -1 +1 @@
export { DefaultLayout } from "./Default"
export { DefaultLayout } from './Default'

@ -1 +1 @@
export type ThemeType = "dark" | "light"
export type ThemeType = 'dark' | 'light'

@ -1,3 +1,3 @@
export const environment = {
production: true
};
production: true,
}

@ -2,5 +2,5 @@
// When building for production, this file is replaced with `environment.prod.ts`.
export const environment = {
production: false
};
production: false,
}

@ -7,8 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" integrity="ha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css">
<link rel="stylesheet" integrity="ha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" />
</head>
<body>
<div id="root"></div>

@ -1,14 +1,10 @@
import React from 'react'
import * as ReactDOM from 'react-dom'
import { createRoot } from 'react-dom/client';
import { createRoot } from 'react-dom/client'
import App from './app/app'
const container = document.getElementById('root');
const container = document.getElementById('root')
if (container) {
createRoot(container).render(
<App />
);
createRoot(container).render(<App />)
}

@ -3,5 +3,5 @@
*
* See: https://github.com/zloirock/core-js#babel
*/
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import 'core-js/stable'
import 'regenerator-runtime/runtime'

@ -5,7 +5,7 @@ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
const versionData = {
timestamp: Date.now(),
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development'
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
}
// Nx plugins for webpack.
module.exports = composePlugins(withNx(), (config) => {
@ -31,13 +31,13 @@ module.exports = composePlugins(withNx(), (config) => {
readline: false,
child_process: false,
buffer: require.resolve('buffer/'),
vm: require.resolve('vm-browserify')
vm: require.resolve('vm-browserify'),
}
// add externals
config.externals = {
...config.externals,
solc: 'solc'
solc: 'solc',
}
// add public path
@ -52,7 +52,7 @@ module.exports = composePlugins(withNx(), (config) => {
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
url: ['url', 'URL'],
process: 'process/browser'
process: 'process/browser',
})
)
@ -60,7 +60,7 @@ module.exports = composePlugins(withNx(), (config) => {
config.module.rules.push({
test: /\.js$/,
use: ['source-map-loader'],
enforce: 'pre'
enforce: 'pre',
})
config.ignoreWarnings = [/Failed to parse source map/] // ignore source-map-loader warnings
@ -74,16 +74,16 @@ module.exports = composePlugins(withNx(), (config) => {
compress: false,
mangle: false,
format: {
comments: false
}
comments: false,
},
},
extractComments: false
extractComments: false,
}),
new CssMinimizerPlugin()
new CssMinimizerPlugin(),
]
config.watchOptions = {
ignored: /node_modules/
ignored: /node_modules/,
}
return config

Loading…
Cancel
Save