From 148d3f108f7368389a3ab0014550d07f02f2a8c9 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Mon, 2 Feb 2026 05:42:10 +0530 Subject: [PATCH] Add Prettier configuration and ignore files for code formatting - Introduced a new `.prettierrc` file to define code formatting rules, including settings for semicolons, trailing commas, and import order. - Added a `.prettierignore` file to exclude specific directories and files from formatting, ensuring a cleaner codebase. - Updated `package.json` to include new scripts for formatting and linting, enhancing the development workflow. These changes establish a consistent code style and improve maintainability across the project. --- .prettierignore | 10 ++++++++++ .prettierrc | 22 ++++++++++++++++++++++ package.json | 6 +++++- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..30bc8aaa3 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,10 @@ +node_modules +dist +coverage +src-tauri +skills +*.config.js +*.config.ts +tsconfig.tsbuildinfo +yarn.lock +package-lock.json diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..777e933a3 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,22 @@ +{ + "semi": true, + "trailingComma": "es5", + "singleQuote": true, + "printWidth": 100, + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true, + "arrowParens": "avoid", + "endOfLine": "lf", + "bracketSameLine": true, + "objectWrap": "collapse", + "jsxSingleQuote": false, + "quoteProps": "as-needed", + "proseWrap": "preserve", + "plugins": ["@trivago/prettier-plugin-sort-imports"], + "importOrder": ["", "^src/", "^[../]", "^[./]"], + "importOrderSeparation": true, + "importOrderSortSpecifiers": true, + "importOrderCaseInsensitive": true, + "importOrderGroupNamespaceSpecifiers": true +} diff --git a/package.json b/package.json index 3a91178ef..0c86484c0 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,11 @@ "setup-python-sidecar": "node scripts/setup-python-sidecar.mjs", "test": "vitest run", "test:watch": "vitest", - "test:coverage": "vitest run --coverage" + "test:coverage": "vitest run --coverage", + "format": "prettier --write .", + "format:check": "prettier --check .", + "lint": "eslint . --ext .ts,.tsx", + "lint:fix": "eslint . --ext .ts,.tsx --fix" }, "dependencies": { "@reduxjs/toolkit": "^2.11.2",