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, "tabWidth": 2,
"printWidth": 500, "printWidth": 500,
"bracketSpacing": false,
"useTabs": false, "useTabs": false,
"semi": false, "semi": false,
"singleQuote": true, "singleQuote": true
"bracketSpacing": false
} }

@ -1,9 +1,5 @@
{ {
"presets": ["@babel/preset-env", ["@babel/preset-react", "presets": ["@babel/preset-env", ["@babel/preset-react", { "runtime": "automatic" }]],
{"runtime": "automatic"}
]],
"plugins": ["@babel/plugin-proposal-class-properties", "@babel/plugin-transform-runtime", "@babel/plugin-proposal-nullish-coalescing-operator"], "plugins": ["@babel/plugin-proposal-class-properties", "@babel/plugin-transform-runtime", "@babel/plugin-proposal-nullish-coalescing-operator"],
"ignore": [ "ignore": ["**/node_modules/**"]
"**/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 = { export const environment = {
production: true production: true,
}; }

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

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

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

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

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

Loading…
Cancel
Save