From 17cb4dab41f33a32a4c6a0104dd188c51517ca22 Mon Sep 17 00:00:00 2001 From: Dheeraj Prakash Date: Mon, 22 Nov 2021 21:42:28 -0500 Subject: [PATCH] chore(*): format properly (4 spaces best) --- .eslintrc.json | 30 ++++----- .vscode/launch.json | 34 +++++----- postcss.config.js | 2 +- src/app.global.css | 10 +-- tailwind.config.js | 26 ++++---- tsconfig.json | 34 +++++----- webpack.main.config.js | 24 +++---- webpack.plugins.js | 4 +- webpack.renderer.config.js | 14 ++-- webpack.rules.js | 131 +++++++++++++++++++------------------ 10 files changed, 156 insertions(+), 153 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 1e4bbe2..96499c8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,17 +1,17 @@ { - "env": { - "browser": true, - "es6": true, - "node": true - }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "plugin:import/recommended", - "plugin:import/electron", - "plugin:import/typescript" - ], - "parser": "@typescript-eslint/parser", - "ignorePatterns": "/*.js" + "env": { + "browser": true, + "es6": true, + "node": true + }, + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:import/recommended", + "plugin:import/electron", + "plugin:import/typescript" + ], + "parser": "@typescript-eslint/parser", + "ignorePatterns": "/*.js" } diff --git a/.vscode/launch.json b/.vscode/launch.json index 14e0215..f6aafd4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,19 +1,19 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Electron Main", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-nix", - "windows": { - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-win.cmd" - }, - "runtimeArgs": [], - "cwd": "${workspaceFolder}" - } - ] + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Electron Main", + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-nix", + "windows": { + "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-win.cmd" + }, + "runtimeArgs": [], + "cwd": "${workspaceFolder}" + } + ] } diff --git a/postcss.config.js b/postcss.config.js index 116848f..1d606ee 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,3 +1,3 @@ module.exports = { - plugins: [require("tailwindcss"), require("autoprefixer")], + plugins: [require("tailwindcss"), require("autoprefixer")], }; diff --git a/src/app.global.css b/src/app.global.css index d9a4325..9e37998 100644 --- a/src/app.global.css +++ b/src/app.global.css @@ -3,9 +3,9 @@ @tailwind utilities; body { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, - Arial, sans-serif; - margin: auto; - max-width: 38rem; - padding: 2rem; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + Helvetica, Arial, sans-serif; + margin: auto; + max-width: 38rem; + padding: 2rem; } diff --git a/tailwind.config.js b/tailwind.config.js index 663c20d..febd416 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,18 +1,18 @@ const colors = require("tailwindcss/colors"); module.exports = { - purge: [], - darkMode: false, // or 'media' or 'class' - theme: { - extend: { - colors: { - sky: colors.sky, - cyan: colors.cyan, - }, + purge: [], + darkMode: false, // or 'media' or 'class' + theme: { + extend: { + colors: { + sky: colors.sky, + cyan: colors.cyan, + }, + }, }, - }, - variants: { - extend: {}, - }, - plugins: [], + variants: { + extend: {}, + }, + plugins: [], }; diff --git a/tsconfig.json b/tsconfig.json index ef57a5b..3fd2669 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,19 +1,19 @@ { - "compilerOptions": { - "allowJs": true, - "module": "commonjs", - "skipLibCheck": true, - "esModuleInterop": true, - "noImplicitAny": true, - "sourceMap": true, - "baseUrl": ".", - "outDir": "dist", - "moduleResolution": "node", - "resolveJsonModule": true, - "jsx": "react", - "paths": { - "*": ["node_modules/*"] - } - }, - "include": ["src/**/*"] + "compilerOptions": { + "allowJs": true, + "module": "commonjs", + "skipLibCheck": true, + "esModuleInterop": true, + "noImplicitAny": true, + "sourceMap": true, + "baseUrl": ".", + "outDir": "dist", + "moduleResolution": "node", + "resolveJsonModule": true, + "jsx": "react", + "paths": { + "*": ["node_modules/*"] + } + }, + "include": ["src/**/*"] } diff --git a/webpack.main.config.js b/webpack.main.config.js index 159d712..a0fd571 100644 --- a/webpack.main.config.js +++ b/webpack.main.config.js @@ -1,14 +1,14 @@ module.exports = { - /** - * This is the main entry point for your application, it's the first file - * that runs in the main process. - */ - entry: "./src/index.ts", - // Put your normal webpack config below here - module: { - rules: require("./webpack.rules"), - }, - resolve: { - extensions: [".js", ".ts", ".jsx", ".tsx", ".css", ".json"], - }, + /** + * This is the main entry point for your application, it's the first file + * that runs in the main process. + */ + entry: "./src/index.ts", + // Put your normal webpack config below here + module: { + rules: require("./webpack.rules"), + }, + resolve: { + extensions: [".js", ".ts", ".jsx", ".tsx", ".css", ".json"], + }, }; diff --git a/webpack.plugins.js b/webpack.plugins.js index e01a73b..06bf698 100644 --- a/webpack.plugins.js +++ b/webpack.plugins.js @@ -2,6 +2,6 @@ const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin"); const webpack = require("webpack"); module.exports = [ - new ForkTsCheckerWebpackPlugin(), - new webpack.ExternalsPlugin("commonjs", ["electron"]), + new ForkTsCheckerWebpackPlugin(), + new webpack.ExternalsPlugin("commonjs", ["electron"]), ]; diff --git a/webpack.renderer.config.js b/webpack.renderer.config.js index 1d536f2..1b56291 100644 --- a/webpack.renderer.config.js +++ b/webpack.renderer.config.js @@ -2,11 +2,11 @@ const rules = require("./webpack.rules"); const plugins = require("./webpack.plugins"); module.exports = { - module: { - rules, - }, - plugins: plugins, - resolve: { - extensions: [".js", ".ts", ".jsx", ".tsx", ".css"], - }, + module: { + rules, + }, + plugins: plugins, + resolve: { + extensions: [".js", ".ts", ".jsx", ".tsx", ".css"], + }, }; diff --git a/webpack.rules.js b/webpack.rules.js index ed66868..8a34116 100644 --- a/webpack.rules.js +++ b/webpack.rules.js @@ -1,69 +1,72 @@ module.exports = [ - // Add support for native node modules - { - // We're specifying native_modules in the test because the asset relocator loader generates a - // "fake" .node file which is really a cjs file. - test: /native_modules\/.+\.node$/, - use: "node-loader", - }, - { - test: /\.(m?js|node)$/, - parser: { amd: false }, - use: { - loader: "@vercel/webpack-asset-relocator-loader", - options: { - outputAssetBase: "native_modules", - }, + // Add support for native node modules + { + // We're specifying native_modules in the test because the asset relocator loader generates a + // "fake" .node file which is really a cjs file. + test: /native_modules\/.+\.node$/, + use: "node-loader", }, - }, - { - test: /\.tsx?$/, - exclude: /(node_modules|\.webpack)/, - use: { - loader: "ts-loader", - options: { - transpileOnly: true, - }, - }, - }, - { - test: /\.global\.css$/, - use: [ - { - loader: "style-loader", - }, - { - loader: "css-loader", - options: { - sourceMap: true, - }, - }, - { - loader: "postcss-loader", - options: { - postcssOptions: { - plugins: [require("tailwindcss"), require("autoprefixer")], - }, + { + test: /\.(m?js|node)$/, + parser: { amd: false }, + use: { + loader: "@vercel/webpack-asset-relocator-loader", + options: { + outputAssetBase: "native_modules", + }, }, - }, - ], - }, - { - test: /^((?!\.global).)*\.css$/, - use: [ - { - loader: "style-loader", - }, - { - loader: "css-loader", - options: { - modules: { - localIdentName: "[name]__[local]__[hash:base64:5]", - }, - sourceMap: true, - importLoaders: 1, + }, + { + test: /\.tsx?$/, + exclude: /(node_modules|\.webpack)/, + use: { + loader: "ts-loader", + options: { + transpileOnly: true, + }, }, - }, - ], - }, + }, + { + test: /\.global\.css$/, + use: [ + { + loader: "style-loader", + }, + { + loader: "css-loader", + options: { + sourceMap: true, + }, + }, + { + loader: "postcss-loader", + options: { + postcssOptions: { + plugins: [ + require("tailwindcss"), + require("autoprefixer"), + ], + }, + }, + }, + ], + }, + { + test: /^((?!\.global).)*\.css$/, + use: [ + { + loader: "style-loader", + }, + { + loader: "css-loader", + options: { + modules: { + localIdentName: "[name]__[local]__[hash:base64:5]", + }, + sourceMap: true, + importLoaders: 1, + }, + }, + ], + }, ];