@xonovex/prettier-config 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +46 -0
  2. package/src/index.js +28 -0
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@xonovex/prettier-config",
3
+ "version": "0.1.4",
4
+ "description": "Shared Prettier configuration for Xonovex projects",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Xonovex",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/xonovex/platform.git",
11
+ "directory": "packages/config/prettier-config"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/xonovex/platform/issues"
15
+ },
16
+ "homepage": "https://github.com/xonovex/platform/tree/main/packages/config/prettier-config#readme",
17
+ "publishConfig": {
18
+ "access": "public",
19
+ "registry": "https://registry.npmjs.org/"
20
+ },
21
+ "files": [
22
+ "src"
23
+ ],
24
+ "exports": {
25
+ "./package.json": "./package.json",
26
+ ".": "./src/index.js"
27
+ },
28
+ "dependencies": {
29
+ "@ianvs/prettier-plugin-sort-imports": "4.7.0",
30
+ "prettier-plugin-astro": "0.14.1",
31
+ "prettier-plugin-tailwindcss": "0.7.2"
32
+ },
33
+ "devDependencies": {
34
+ "@xonovex/eslint-config-base": "0.1.4",
35
+ "@xonovex/ts-config-build": "0.1.4"
36
+ },
37
+ "scripts": {
38
+ "lint": "eslint .",
39
+ "lint:fix": "eslint . --fix",
40
+ "fmt": "prettier --write .",
41
+ "fmt:check": "prettier --check .",
42
+ "typecheck": "tsc --noemit",
43
+ "test": "echo 'No tests for config package'",
44
+ "build": "mkdir -p dist && echo \"No build needed for config package\" > dist/.gitkeep"
45
+ }
46
+ }
package/src/index.js ADDED
@@ -0,0 +1,28 @@
1
+ import {fileURLToPath} from "node:url";
2
+
3
+ const sortImportsPath = fileURLToPath(
4
+ import.meta.resolve("@ianvs/prettier-plugin-sort-imports"),
5
+ );
6
+ const astroPath = fileURLToPath(import.meta.resolve("prettier-plugin-astro"));
7
+ const tailwindPath = fileURLToPath(
8
+ import.meta.resolve("prettier-plugin-tailwindcss"),
9
+ );
10
+
11
+ /** @type {import("prettier").Config} */
12
+ export default {
13
+ // Core formatting options
14
+ semi: true,
15
+ tabWidth: 2,
16
+ useTabs: false,
17
+ singleQuote: false,
18
+ bracketSameLine: true,
19
+ bracketSpacing: false,
20
+
21
+ // Plugin configuration
22
+ // Note: The Tailwind CSS plugin must be loaded last
23
+ plugins: [sortImportsPath, astroPath, tailwindPath],
24
+
25
+ // Import order configuration
26
+ importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
27
+ importOrderTypeScriptVersion: "5.0.0",
28
+ };