@vijayhardaha/dev-config 1.1.0 → 1.1.2

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,51 @@ 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 prettier @prettier/plugin-xml @eslint/compat @eslint/eslintrc eslint-config-prettier eslint-plugin-prettier globals eslint-plugin-jsdoc eslint-plugin-import eslint-import-resolver-typescript typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser
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
33
+ ### Typescript
40
34
 
41
35
  ```bash
42
- bun install --save-dev eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y
36
+ bun add --save-dev typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser
43
37
  ```
44
38
 
45
- #### Next.js
46
-
47
- ```bash
48
- bun install --save-dev @next/eslint-plugin-next eslint-config-next
49
- ```
50
-
51
- #### Commitlint
39
+ ### Prettier
52
40
 
53
41
  ```bash
54
- bun install --save-dev @commitlint/cli @commitlint/config-conventional @commitlint/types
42
+ bun add --save-dev prettier @prettier/plugin-xml
55
43
  ```
56
44
 
57
- #### Next Sitemap
45
+ #### Stylelint
58
46
 
59
47
  ```bash
60
- bun install --save-dev next-sitemap
48
+ bun add --save-dev stylelint stylelint-config-property-sort-order-smacss stylelint-config-standard-scss stylelint-order
61
49
  ```
62
50
 
63
51
  #### React
64
52
 
65
53
  ```bash
66
- bun install --save-dev eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y
54
+ bun add --save-dev eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y
67
55
  ```
68
56
 
69
57
  #### Next.js
70
58
 
71
59
  ```bash
72
- bun install --save-dev @next/eslint-plugin-next eslint-config-next
60
+ bun add --save-dev @next/eslint-plugin-next@15.5.15 eslint-config-next@15.5.15
73
61
  ```
74
62
 
75
63
  #### Commitlint
76
64
 
77
65
  ```bash
78
- bun install --save-dev @commitlint/cli @commitlint/config-conventional @commitlint/types
66
+ bun add --save-dev husky @commitlint/cli @commitlint/config-conventional @commitlint/types
79
67
  ```
80
68
 
81
69
  #### Next Sitemap
82
70
 
83
71
  ```bash
84
- bun install --save-dev next-sitemap
72
+ bun add --save-dev next-sitemap
85
73
  ```
86
74
 
87
75
  ## 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.2",
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",
@@ -62,36 +62,37 @@
62
62
  "@commitlint/cli": "^20.5.3",
63
63
  "@commitlint/config-conventional": "^20.5.3",
64
64
  "@commitlint/types": "^20.5.0",
65
- "@next/eslint-plugin-next": "^15.5.15",
65
+ "@prettier/plugin-xml": "^3.4.2",
66
66
  "@vitest/coverage-v8": "^4.1.5",
67
- "eslint-config-next": "^15.5.15",
68
67
  "eslint-plugin-jsx-a11y": "^6.10.2",
69
68
  "eslint-plugin-react": "^7.37.5",
70
69
  "eslint-plugin-react-hooks": "^7.1.1",
71
70
  "next-sitemap": "^4.2.3",
72
71
  "release-it": "^20.0.1",
73
- "stylelint": "^17.10.0",
72
+ "stylelint": "^17.11.0",
74
73
  "stylelint-config-property-sort-order-smacss": "^11.2.0",
75
74
  "stylelint-config-standard-scss": "^17.0.0",
76
- "stylelint-order": "^8.1.1"
75
+ "stylelint-order": "^8.1.1",
76
+ "typescript": "^6.0.3",
77
+ "vitest": "^4.1.5"
77
78
  },
78
79
  "peerDependencies": {
79
80
  "@eslint/compat": ">=2",
80
81
  "@eslint/eslintrc": ">=3",
81
82
  "@eslint/js": ">=9",
83
+ "@prettier/plugin-xml": ">=3",
82
84
  "@typescript-eslint/eslint-plugin": ">=8",
83
85
  "@typescript-eslint/parser": ">=8",
84
- "eslint": ">=9",
85
86
  "eslint-config-prettier": ">=10",
86
87
  "eslint-import-resolver-typescript": ">=4",
87
88
  "eslint-plugin-import": ">=2",
88
89
  "eslint-plugin-jsdoc": ">=62",
89
90
  "eslint-plugin-prettier": ">=5",
91
+ "eslint": ">=9",
90
92
  "globals": ">=17",
91
93
  "husky": ">=9",
92
94
  "prettier": ">=3",
93
- "typescript": ">=5",
94
- "vitest": ">=4"
95
+ "typescript": ">=6"
95
96
  },
96
97
  "peerDependenciesMeta": {
97
98
  "@commitlint/cli": {
@@ -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