@vijayhardaha/dev-config 1.1.0 → 1.1.1

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.
package/README.md CHANGED
@@ -25,63 +25,45 @@ bun install @vijayhardaha/dev-config --save-dev
25
25
  ### Install Required Packages
26
26
 
27
27
  ```bash
28
- bun install --save-dev eslint@9.39.4 @eslint/js@9.39.4 @next/eslint-plugin-next@15.5.15 eslint-config-next@15.5.15 prettier vitest husky @eslint/compat @eslint/eslintrc eslint-config-prettier eslint-plugin-prettier globals typescript@5.9.3 @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-jsdoc eslint-plugin-import eslint-import-resolver-typescript
28
+ bun add --save-dev eslint@9.39.4 @eslint/js@9.39.4 @next/eslint-plugin-next@15.5.15 eslint-config-next@15.5.15 prettier @prettier/plugin-xml vitest husky @eslint/compat @eslint/eslintrc eslint-config-prettier eslint-plugin-prettier globals typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-jsdoc eslint-plugin-import eslint-import-resolver-typescript
29
29
  ```
30
30
 
31
31
  ### Install Optional Packages
32
32
 
33
- #### Stylelint
34
-
35
- ```bash
36
- bun install --save-dev stylelint stylelint-config-property-sort-order-smacss stylelint-config-standard-scss stylelint-order
37
- ```
38
-
39
- #### React
40
-
41
- ```bash
42
- bun install --save-dev eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y
43
- ```
44
-
45
- #### Next.js
46
-
47
- ```bash
48
- bun install --save-dev @next/eslint-plugin-next eslint-config-next
49
- ```
50
-
51
- #### Commitlint
33
+ ### Prettier
52
34
 
53
35
  ```bash
54
- bun install --save-dev @commitlint/cli @commitlint/config-conventional @commitlint/types
36
+ bun add --save-dev prettier @prettier/plugin-xml
55
37
  ```
56
38
 
57
- #### Next Sitemap
39
+ #### Stylelint
58
40
 
59
41
  ```bash
60
- bun install --save-dev next-sitemap
42
+ bun add --save-dev stylelint stylelint-config-property-sort-order-smacss stylelint-config-standard-scss stylelint-order
61
43
  ```
62
44
 
63
45
  #### React
64
46
 
65
47
  ```bash
66
- bun install --save-dev eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y
48
+ bun add --save-dev eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y
67
49
  ```
68
50
 
69
51
  #### Next.js
70
52
 
71
53
  ```bash
72
- bun install --save-dev @next/eslint-plugin-next eslint-config-next
54
+ bun add --save-dev @next/eslint-plugin-next eslint-config-next
73
55
  ```
74
56
 
75
57
  #### Commitlint
76
58
 
77
59
  ```bash
78
- bun install --save-dev @commitlint/cli @commitlint/config-conventional @commitlint/types
60
+ bun add --save-dev @commitlint/cli @commitlint/config-conventional @commitlint/types
79
61
  ```
80
62
 
81
63
  #### Next Sitemap
82
64
 
83
65
  ```bash
84
- bun install --save-dev next-sitemap
66
+ bun add --save-dev next-sitemap
85
67
  ```
86
68
 
87
69
  ## Quick Start
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@vijayhardaha/dev-config",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Reusable development configurations for Next.js + TypeScript projects",
5
5
  "scripts": {
6
6
  "lint": "eslint .",
7
7
  "lint:fix": "eslint --fix .",
8
- "format": "prettier --write .",
9
- "format:check": "prettier --check .",
8
+ "format": "prettier --write --log-level error .",
9
+ "format:check": "prettier --check --log-level error .",
10
10
  "release": "release-it",
11
11
  "release:dry": "release-it --dry-run",
12
12
  "test": "vitest run",
13
13
  "test:watch": "vitest",
14
14
  "test:coverage": "vitest run --coverage",
15
- "prepare": "husky",
16
- "gc": "source .tmp/git.md"
15
+ "gc": "read -p 'Execute git commands from .tmp/git.txt? [Y/n] ' ans; [ \"$ans\" = \"n\" ] || [ \"$ans\" = \"N\" ] && echo 'Aborted.' || source .tmp/git.txt",
16
+ "prepare": "husky"
17
17
  },
18
18
  "files": [
19
19
  "src",
@@ -63,6 +63,7 @@
63
63
  "@commitlint/config-conventional": "^20.5.3",
64
64
  "@commitlint/types": "^20.5.0",
65
65
  "@next/eslint-plugin-next": "^15.5.15",
66
+ "@prettier/plugin-xml": "^3.4.2",
66
67
  "@vitest/coverage-v8": "^4.1.5",
67
68
  "eslint-config-next": "^15.5.15",
68
69
  "eslint-plugin-jsx-a11y": "^6.10.2",
@@ -70,27 +71,29 @@
70
71
  "eslint-plugin-react-hooks": "^7.1.1",
71
72
  "next-sitemap": "^4.2.3",
72
73
  "release-it": "^20.0.1",
73
- "stylelint": "^17.10.0",
74
+ "stylelint": "^17.11.0",
74
75
  "stylelint-config-property-sort-order-smacss": "^11.2.0",
75
76
  "stylelint-config-standard-scss": "^17.0.0",
76
- "stylelint-order": "^8.1.1"
77
+ "stylelint-order": "^8.1.1",
78
+ "typescript": "^6.0.3"
77
79
  },
78
80
  "peerDependencies": {
79
81
  "@eslint/compat": ">=2",
80
82
  "@eslint/eslintrc": ">=3",
81
83
  "@eslint/js": ">=9",
84
+ "@prettier/plugin-xml": ">=3",
82
85
  "@typescript-eslint/eslint-plugin": ">=8",
83
86
  "@typescript-eslint/parser": ">=8",
84
- "eslint": ">=9",
85
87
  "eslint-config-prettier": ">=10",
86
88
  "eslint-import-resolver-typescript": ">=4",
87
89
  "eslint-plugin-import": ">=2",
88
90
  "eslint-plugin-jsdoc": ">=62",
89
91
  "eslint-plugin-prettier": ">=5",
92
+ "eslint": ">=9",
90
93
  "globals": ">=17",
91
94
  "husky": ">=9",
92
95
  "prettier": ">=3",
93
- "typescript": ">=5",
96
+ "typescript": ">=6",
94
97
  "vitest": ">=4"
95
98
  },
96
99
  "peerDependenciesMeta": {
@@ -38,6 +38,11 @@ const config = {
38
38
  experimentalOperatorPosition: 'start',
39
39
  // Collapse object literals
40
40
  objectWrap: 'collapse',
41
+ // Ensures that whitespace in XML is preserved as-is
42
+ xmlWhitespaceSensitivity: 'strict',
43
+
44
+ // ---- Plugins ----
45
+ plugins: ['@prettier/plugin-xml'],
41
46
 
42
47
  // ---- Overrides ----
43
48
  // Different formatting rules for different file types
@@ -63,6 +68,10 @@ const config = {
63
68
  // ---- YAML ----
64
69
  // Use yaml parser with 2-space indentation
65
70
  { files: ['*.yml', '*.yaml'], options: { parser: 'yaml', tabWidth: 2 } },
71
+
72
+ // ---- XML ----
73
+ // Use 2-space indentation for XML files
74
+ { files: ['.xml', '.xsd', '.xsl', '.xslt'], options: { tabWidth: 2 } },
66
75
  ],
67
76
  };
68
77