From 6e157bbd9beced3649a106ba0cbe09831d9f4cae Mon Sep 17 00:00:00 2001 From: David Date: Tue, 3 Sep 2024 10:12:07 +0200 Subject: [PATCH] fix(prettier): fix prettier rules (#22) * fix(prettier): fix prettier rules * fix(prettier): fix prettier rules * fix(prettier): fix prettier rules --- sample/src/components/counter/Counter.test.tsx | 1 - sample/src/containers/welcome/Welcome.test.tsx | 1 - sample/src/hooks/useCounter.test.ts | 1 - sample/src/main.tsx | 1 - sample/vite.config.ts | 1 - src/.prettierrc.js | 13 +++++++++---- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sample/src/components/counter/Counter.test.tsx b/sample/src/components/counter/Counter.test.tsx index 92f2b05..736cbab 100644 --- a/sample/src/components/counter/Counter.test.tsx +++ b/sample/src/components/counter/Counter.test.tsx @@ -1,7 +1,6 @@ import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; import { userEvent } from '@testing-library/user-event'; - import { Counter } from './Counter'; describe('Counter', () => { diff --git a/sample/src/containers/welcome/Welcome.test.tsx b/sample/src/containers/welcome/Welcome.test.tsx index 443ec7b..469409e 100644 --- a/sample/src/containers/welcome/Welcome.test.tsx +++ b/sample/src/containers/welcome/Welcome.test.tsx @@ -1,6 +1,5 @@ import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; - import { Welcome } from './Welcome'; describe('Welcome', () => { diff --git a/sample/src/hooks/useCounter.test.ts b/sample/src/hooks/useCounter.test.ts index b044aa2..d518cf6 100644 --- a/sample/src/hooks/useCounter.test.ts +++ b/sample/src/hooks/useCounter.test.ts @@ -1,5 +1,4 @@ import { act, renderHook } from '@testing-library/react'; - import { useCounter } from './useCounter'; describe('useCounter', () => { diff --git a/sample/src/main.tsx b/sample/src/main.tsx index fbc6427..ebc1797 100644 --- a/sample/src/main.tsx +++ b/sample/src/main.tsx @@ -1,6 +1,5 @@ import { StrictMode } from 'react'; import ReactDOM from 'react-dom/client'; - import { App } from './App'; import './styles/index.css'; diff --git a/sample/vite.config.ts b/sample/vite.config.ts index 56f6a02..627a319 100644 --- a/sample/vite.config.ts +++ b/sample/vite.config.ts @@ -1,5 +1,4 @@ import { defineConfig } from 'vite'; - import react from '@vitejs/plugin-react'; // https://vitejs.dev/config/ diff --git a/src/.prettierrc.js b/src/.prettierrc.js index 36db17c..9161f14 100644 --- a/src/.prettierrc.js +++ b/src/.prettierrc.js @@ -1,8 +1,13 @@ module.exports = { - singleQuote: true, - printWidth: 120, - plugins: [require.resolve('@trivago/prettier-plugin-sort-imports')], + arrowParens: 'always', + bracketSpacing: true, importOrder: ['^@(.*)$', '^[a-zA-Z]*/(.*)$', '^[./]'], - importOrderSeparation: true, + importOrderSeparation: false, importOrderSortSpecifiers: true, + plugins: [require.resolve('@trivago/prettier-plugin-sort-imports')], + printWidth: 120, + semi: true, + singleQuote: true, + tabWidth: 2, + trailingComma: 'all', };