@majordigital/create-acorn 1.0.9 → 1.1.0

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.
@@ -127,11 +127,15 @@ async function scaffoldNextApp() {
127
127
  console.log('Acorn dependencies installed.');
128
128
  console.log('');
129
129
 
130
- console.log('Installing Biome for linting...');
130
+ console.log('Installing Biome, commitlint, and lefthook...');
131
131
  await runCommand('npm', ['install', '--save-dev', '--save-exact', '@biomejs/biome']);
132
- await runCommand('npx', ['@biomejs/biome', 'init']);
132
+ await runCommand('npm', ['install', '--save-dev',
133
+ '@commitlint/cli', '@commitlint/config-conventional', '@commitlint/types', 'lefthook'
134
+ ]);
135
+ // Remove default biome.json if created — we use biome.jsonc from the template
136
+ try { rmSync(join(process.cwd(), 'biome.json')); } catch {}
133
137
  console.log('');
134
- console.log('Biome configured successfully.');
138
+ console.log('Biome, commitlint, and lefthook configured.');
135
139
  console.log('');
136
140
  }
137
141
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majordigital/create-acorn",
3
- "version": "1.0.9",
3
+ "version": "1.1.0",
4
4
  "description": "Interactive scaffold for Acorn with Storyblok/Prismic/DatoCMS, TypeScript, and Tailwind.",
5
5
  "bin": {
6
6
  "create-acorn": "bin/create-acorn.mjs",
@@ -0,0 +1,105 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
3
+ "vcs": {
4
+ "enabled": true,
5
+ "clientKind": "git",
6
+ "useIgnoreFile": true
7
+ },
8
+ "files": {
9
+ "ignoreUnknown": false
10
+ },
11
+ "formatter": {
12
+ "enabled": true,
13
+ "indentWidth": 4,
14
+ "indentStyle": "tab",
15
+ "lineWidth": 80,
16
+ "lineEnding": "lf"
17
+ },
18
+ "linter": {
19
+ "enabled": true,
20
+ "domains": {
21
+ "react": "recommended",
22
+ "next": "recommended"
23
+ },
24
+ "rules": {
25
+ "style": {
26
+ "noNonNullAssertion": "off"
27
+ },
28
+ "correctness": {
29
+ "noUnusedImports": {
30
+ "level": "error",
31
+ "fix": "safe",
32
+ "options": {}
33
+ },
34
+ "noUnusedVariables": "error",
35
+ "useUniqueElementIds": "error"
36
+ },
37
+ "complexity": {
38
+ "noUselessFragments": {
39
+ "level": "warn",
40
+ "fix": "safe",
41
+ "options": {}
42
+ }
43
+ },
44
+ "suspicious": {
45
+ "noExplicitAny": "off",
46
+ "noImplicitAnyLet": "off",
47
+ "noConsole": {
48
+ "fix": "unsafe",
49
+ "level": "error",
50
+ "options": {}
51
+ },
52
+ "noUnknownAtRules": "off"
53
+ },
54
+ "nursery": {
55
+ "useSortedClasses": {
56
+ "level": "error",
57
+ "fix": "safe",
58
+ "options": {
59
+ "functions": ["clsx"]
60
+ }
61
+ }
62
+ }
63
+ }
64
+ },
65
+ "javascript": {
66
+ "formatter": {
67
+ "quoteStyle": "single",
68
+ "trailingCommas": "es5",
69
+ "semicolons": "always",
70
+ "arrowParentheses": "asNeeded"
71
+ }
72
+ },
73
+ "css": {
74
+ "formatter": {
75
+ "quoteStyle": "single"
76
+ },
77
+ "parser": {
78
+ "tailwindDirectives": true
79
+ }
80
+ },
81
+ "assist": {
82
+ "enabled": true,
83
+ "actions": {
84
+ "source": {
85
+ "organizeImports": {
86
+ "level": "on",
87
+ "options": {
88
+ "groups": [
89
+ ":NODE:",
90
+ ":BLANK_LINE:",
91
+ [":PACKAGE:", ":PACKAGE_WITH_PROTOCOL:"],
92
+ ":BLANK_LINE:",
93
+ ":ALIAS:",
94
+ ":BLANK_LINE:",
95
+ ":PATH:",
96
+ ":BLANK_LINE:",
97
+ ":URL:"
98
+ ]
99
+ }
100
+ }
101
+ }
102
+ }
103
+ },
104
+ "overrides": []
105
+ }
@@ -0,0 +1,7 @@
1
+ import type { UserConfig } from '@commitlint/types';
2
+
3
+ const commitlintConfig: UserConfig = {
4
+ extends: ['@commitlint/config-conventional'],
5
+ };
6
+
7
+ export default commitlintConfig;
@@ -0,0 +1,15 @@
1
+ pre-commit:
2
+ parallel: true
3
+ commands:
4
+ check-js:
5
+ glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
6
+ run: npx biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
7
+ stage_fixed: true
8
+ check-toml:
9
+ glob: "*.toml"
10
+ run: test -z "{staged_files}" || (npx taplo format {staged_files} && git update-index --again)
11
+
12
+ commit-msg:
13
+ scripts:
14
+ "commitlint.sh":
15
+ runner: bash