diff --git a/.prettierrc.json b/.prettierrc.json index 57317be3cb..0937b35f57 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,5 +1,9 @@ { "trailingComma": "es5", - "plugins": ["prettier-plugin-packagejson", "prettier-plugin-tailwindcss"], + "plugins": [ + "prettier-plugin-packagejson", + "prettier-plugin-organize-imports", + "prettier-plugin-tailwindcss" + ], "tailwindFunctions": ["clsx", "cn", "cva"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 3f6d6f7871..60ab6a0b84 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,13 +1,26 @@ { "search.exclude": { + ".vscode": true, + "pnpm-lock.yaml": true, "**/.pnp.*": true, - "**/.yarn": true + "**/.yarn": true, + "**/node_modules": true, + "**/dist": true, + "**/build": true, + "**/out": true, + "**/lib": true, + "**/.next": true, + "**/storybook-static": true, + "**/generated": true, + "**/__test__/**/fixtures": true, + "**/__test__/**/output": true, + "**/__snapshots__/**": true, + "tests": true }, "typescript.enablePromptUseWorkspaceTsdk": true, "editor.formatOnSave": true, "editor.codeActionsOnSave": [ "source.fixAll", - "source.organizeImports", "source.sortMembers", ], "editor.defaultFormatter": "esbenp.prettier-vscode", diff --git a/eslint.config.mjs b/eslint.config.mjs index 0225cdc842..76c233f794 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -13,6 +13,9 @@ const compat = new FlatCompat({ export default tseslint.config( { + files: [ + "**/*.{ts,tsx,js,jsx,mjs,mts,mjsx,mtsx,cjs,cjsx,cts,ctsx,es,es6,esm}", + ], ignores: [ "**/generated", "**/dist", @@ -60,7 +63,7 @@ export default tseslint.config( }), { - files: ["**/*.test.ts", "**/*.test.tsx"], + files: ["**/*.test.{ts,tsx}"], plugins: { vitest, }, diff --git a/package.json b/package.json index 27c8f3ef20..b61188ed46 100644 --- a/package.json +++ b/package.json @@ -105,6 +105,7 @@ "organize-imports-cli": "^0.10.0", "playwright": "^1.47.1", "prettier": "^3.4.2", + "prettier-plugin-organize-imports": "^4.1.0", "prettier-plugin-tailwindcss": "^0.6.9", "react": "^18", "rollup": "^4.22.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bfaa8a67fb..7aab82624b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -174,9 +174,12 @@ importers: prettier: specifier: ^3.4.2 version: 3.4.2 + prettier-plugin-organize-imports: + specifier: ^4.1.0 + version: 4.1.0(prettier@3.4.2)(typescript@5.7.2) prettier-plugin-tailwindcss: specifier: ^0.6.9 - version: 0.6.9(prettier@3.4.2) + version: 0.6.9(prettier-plugin-organize-imports@4.1.0(prettier@3.4.2)(typescript@5.7.2))(prettier@3.4.2) react: specifier: 18.3.1 version: 18.3.1 @@ -13555,6 +13558,16 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + prettier-plugin-organize-imports@4.1.0: + resolution: {integrity: sha512-5aWRdCgv645xaa58X8lOxzZoiHAldAPChljr/MT0crXVOWTZ+Svl4hIWlz+niYSlO6ikE5UXkN1JrRvIP2ut0A==} + peerDependencies: + prettier: '>=2.0' + typescript: 5.7.2 + vue-tsc: ^2.1.0 + peerDependenciesMeta: + vue-tsc: + optional: true + prettier-plugin-packagejson@2.5.6: resolution: {integrity: sha512-TY7KiLtyt6Tlf53BEbXUWkN0+TRdHKgIMmtXtDCyHH6yWnZ50Lwq6Vb6lyjapZrhDTXooC4EtlY5iLe1sCgi5w==} peerDependencies: @@ -30538,6 +30551,11 @@ snapshots: prelude-ls@1.2.1: {} + prettier-plugin-organize-imports@4.1.0(prettier@3.4.2)(typescript@5.7.2): + dependencies: + prettier: 3.4.2 + typescript: 5.7.2 + prettier-plugin-packagejson@2.5.6(prettier@3.4.2): dependencies: sort-package-json: 2.12.0 @@ -30545,9 +30563,11 @@ snapshots: optionalDependencies: prettier: 3.4.2 - prettier-plugin-tailwindcss@0.6.9(prettier@3.4.2): + prettier-plugin-tailwindcss@0.6.9(prettier-plugin-organize-imports@4.1.0(prettier@3.4.2)(typescript@5.7.2))(prettier@3.4.2): dependencies: prettier: 3.4.2 + optionalDependencies: + prettier-plugin-organize-imports: 4.1.0(prettier@3.4.2)(typescript@5.7.2) prettier@2.8.8: {}