Skip to content

Commit ddf1e2f

Browse files
committed
Merge branch 'master' into beta
2 parents c4f1fde + 90a231e commit ddf1e2f

27 files changed

Lines changed: 9285 additions & 13878 deletions

.github/workflows/publish.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ on:
77
jobs:
88
publish:
99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
id-token: write
1013
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-node@v3
14+
- name: Check out repository
15+
uses: actions/checkout@v4
1316
with:
14-
node-version: 16
17+
fetch-depth: 0
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '22'
1522
- run: npm ci
1623
- run: npx semantic-release
1724
env:
18-
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
1925
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,12 @@
1111

1212
# ide
1313
.idea
14+
15+
# Claude AI context file
16+
**/CLAUDE.md
17+
18+
# VSCode
19+
.vscode
20+
21+
# Zed
22+
.zed

.husky/pre-commit

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
npx --no-install pretty-quick --staged
1+
npx --no-install lint-staged

bin/generate-react.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
#!/usr/bin/env node
22
import cli from '../src/cli.js';
3+
import { error } from '../src/utils/messagesUtils.js';
34

4-
const isNotValidNodeVersion = () => {
5+
function isNotValidNodeVersion() {
56
const currentNodeVersion = process.versions.node;
67
const semver = currentNodeVersion.split('.');
78
const major = semver[0];
89

9-
if (major < 16) {
10-
console.error(
11-
// eslint-disable-next-line
12-
'You are running Node ' +
13-
currentNodeVersion +
14-
' Generate React CLI requires Node 16 or higher. Please update your version of Node.'
15-
);
10+
if (major < 22) {
11+
error(`Node ${currentNodeVersion} is not supported`, {
12+
details: 'Generate React CLI requires Node 22 or higher',
13+
suggestions: [
14+
'Update your Node.js version to 22 or higher',
15+
],
16+
});
1617

1718
return true;
1819
}
1920

2021
return false;
21-
};
22+
}
2223

2324
// --- Check if user is running Node 12 or higher.
2425

eslint.config.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import antfu from '@antfu/eslint-config';
2+
3+
export default antfu({
4+
// Node.js project - no browser/framework stuff needed
5+
vue: false,
6+
react: false,
7+
typescript: false,
8+
9+
// Style preferences
10+
stylistic: {
11+
indent: 2,
12+
quotes: 'single',
13+
semi: true,
14+
},
15+
16+
// Ignore patterns
17+
ignores: [
18+
'node_modules',
19+
'dist',
20+
'coverage',
21+
],
22+
23+
// Rule overrides
24+
rules: {
25+
'no-console': 'off', // CLI tool - console output is expected
26+
'node/prefer-global/process': 'off', // process is always available in Node.js
27+
'style/brace-style': ['error', '1tbs', { allowSingleLine: true }],
28+
},
29+
});

0 commit comments

Comments
 (0)