From 68ce2e1a28d60bbcf07eb18b1f4a2285f8623911 Mon Sep 17 00:00:00 2001 From: Kenneth Aasan Date: Wed, 24 Apr 2024 09:23:13 +0200 Subject: [PATCH] refactor: upgrade prettier and format code accordingly --- .gitpod.yml | 2 +- .prettierignore | 1 + library/e2e/plugins/index.js | 2 +- library/loaders/remove-hashbag-loader.js | 2 +- library/tailwind.config.js | 4 ++-- library/webpack.config.js | 4 ++-- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 738349d00..f7d3bc69f 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -6,4 +6,4 @@ tasks: # List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/ ports: - port: 3000 - onOpen: open-preview \ No newline at end of file + onOpen: open-preview diff --git a/.prettierignore b/.prettierignore index 14e3dce0c..988b27454 100644 --- a/.prettierignore +++ b/.prettierignore @@ -21,3 +21,4 @@ lerna-debug.log* /.github playground/.next/ +playground/out/ diff --git a/library/e2e/plugins/index.js b/library/e2e/plugins/index.js index 72005749b..5ab0413d2 100644 --- a/library/e2e/plugins/index.js +++ b/library/e2e/plugins/index.js @@ -23,6 +23,6 @@ const webpackOptions = { }, }; -module.exports = on => { +module.exports = (on) => { on('file:preprocessor', wp({ webpackOptions })); }; diff --git a/library/loaders/remove-hashbag-loader.js b/library/loaders/remove-hashbag-loader.js index 43960049f..75df48679 100644 --- a/library/loaders/remove-hashbag-loader.js +++ b/library/loaders/remove-hashbag-loader.js @@ -1,6 +1,6 @@ /** * Make sure code does not contain properties such as `#property` */ -module.exports = function(source) { +module.exports = function (source) { return source.replace(/^#! .*\n/, ''); }; diff --git a/library/tailwind.config.js b/library/tailwind.config.js index ea5d3af61..885e9bd11 100644 --- a/library/tailwind.config.js +++ b/library/tailwind.config.js @@ -136,12 +136,12 @@ module.exports = { '5xl': '3rem', '6xl': '4rem', }, - borderColor: theme => ({ + borderColor: (theme) => ({ ...theme('colors'), DEFAULT: theme('colors.gray.400', 'currentColor'), }), extend: { - typography: theme => ({ + typography: (theme) => ({ DEFAULT: { css: { pre: { diff --git a/library/webpack.config.js b/library/webpack.config.js index 9fddc67b5..88947645b 100644 --- a/library/webpack.config.js +++ b/library/webpack.config.js @@ -1,6 +1,6 @@ const path = require('path'); -const BundleAnalyzerPlugin = require('webpack-bundle-analyzer') - .BundleAnalyzerPlugin; +const BundleAnalyzerPlugin = + require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const NodePolyfillPlugin = require('node-polyfill-webpack-plugin'); const umdBundle = {