Skip to content

Commit d6dfc4e

Browse files
committedSep 4, 2024
feat: update deps, enable antfu/consistent-chaining
1 parent 237cb5e commit d6dfc4e

File tree

12 files changed

+438
-476
lines changed

12 files changed

+438
-476
lines changed
 

‎fixtures/input/jsx.jsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ export function HelloWorld({
55
return null};
66

77
// TODO: Don't use random in render
8-
let num = Math.floor (Math.random() * 1E+7).toString()
9-
.replace(/\.\d+/ig, "")
8+
let num = Math
9+
.floor (Math.random() * 1E+7).toString()
10+
.replace(/\.\d+/ig, "")
1011

1112
return <div className='HelloWorld' title={`You are visitor number ${ num }`} onMouseOver={onMouseOver}>
1213
<strong>{ greeting.slice( 0, 1 ).toUpperCase() + greeting.slice(1).toLowerCase() }</strong>

‎fixtures/output/all/jsx.jsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ export function HelloWorld({
99
};
1010

1111
// TODO: Don't use random in render
12-
const num = Math.floor (Math.random() * 1e+7).toString()
12+
const num = Math
13+
.floor (Math.random() * 1e+7)
14+
.toString()
1315
.replace(/\.\d+/g, '')
1416

1517
return (

‎fixtures/output/js/jsx.jsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ export function HelloWorld({
99
};
1010

1111
// TODO: Don't use random in render
12-
const num = Math.floor (Math.random() * 1e+7).toString()
12+
const num = Math
13+
.floor (Math.random() * 1e+7)
14+
.toString()
1315
.replace(/\.\d+/g, '')
1416

1517
return (

‎fixtures/output/no-style/jsx.jsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ export function HelloWorld({
55
return null};
66

77
// TODO: Don't use random in render
8-
const num = Math.floor (Math.random() * 1e+7).toString()
9-
.replace(/\.\d+/g, "")
8+
const num = Math
9+
.floor (Math.random() * 1e+7).toString()
10+
.replace(/\.\d+/g, "")
1011

1112
return <div className='HelloWorld' title={`You are visitor number ${ num }`} onMouseOver={onMouseOver}>
1213
<strong>{ greeting.slice( 0, 1 ).toUpperCase() + greeting.slice(1).toLowerCase() }</strong>

‎fixtures/output/tab-double-quotes/jsx.jsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ export function HelloWorld({
99
};
1010

1111
// TODO: Don't use random in render
12-
const num = Math.floor (Math.random() * 1e+7).toString()
12+
const num = Math
13+
.floor (Math.random() * 1e+7)
14+
.toString()
1315
.replace(/\.\d+/g, "")
1416

1517
return (

‎fixtures/output/ts-override/jsx.jsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ export function HelloWorld({
99
};
1010

1111
// TODO: Don't use random in render
12-
const num = Math.floor (Math.random() * 1e+7).toString()
12+
const num = Math
13+
.floor (Math.random() * 1e+7)
14+
.toString()
1315
.replace(/\.\d+/g, '')
1416

1517
return (

‎fixtures/output/ts-strict/jsx.jsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ export function HelloWorld({
99
};
1010

1111
// TODO: Don't use random in render
12-
const num = Math.floor (Math.random() * 1e+7).toString()
12+
const num = Math
13+
.floor (Math.random() * 1e+7)
14+
.toString()
1315
.replace(/\.\d+/g, '')
1416

1517
return (

‎fixtures/output/with-formatters/jsx.jsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ export function HelloWorld({
99
};
1010

1111
// TODO: Don't use random in render
12-
const num = Math.floor (Math.random() * 1e+7).toString()
12+
const num = Math
13+
.floor (Math.random() * 1e+7)
14+
.toString()
1315
.replace(/\.\d+/g, '')
1416

1517
return (

‎package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,16 @@
9999
"@antfu/install-pkg": "^0.4.1",
100100
"@clack/prompts": "^0.7.0",
101101
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
102-
"@stylistic/eslint-plugin": "^2.6.5",
103-
"@typescript-eslint/eslint-plugin": "^8.3.0",
104-
"@typescript-eslint/parser": "^8.3.0",
102+
"@stylistic/eslint-plugin": "^2.7.2",
103+
"@typescript-eslint/eslint-plugin": "^8.4.0",
104+
"@typescript-eslint/parser": "^8.4.0",
105105
"@vitest/eslint-plugin": "^1.1.0",
106106
"eslint-config-flat-gitignore": "^0.3.0",
107107
"eslint-flat-config-utils": "^0.3.1",
108108
"eslint-merge-processors": "^0.1.0",
109-
"eslint-plugin-antfu": "^2.3.6",
109+
"eslint-plugin-antfu": "^2.4.1",
110110
"eslint-plugin-command": "^0.2.3",
111-
"eslint-plugin-import-x": "^4.1.0",
111+
"eslint-plugin-import-x": "^4.1.1",
112112
"eslint-plugin-jsdoc": "^50.2.2",
113113
"eslint-plugin-jsonc": "^2.16.0",
114114
"eslint-plugin-markdown": "^5.1.0",
@@ -119,14 +119,14 @@
119119
"eslint-plugin-toml": "^0.11.1",
120120
"eslint-plugin-unicorn": "^55.0.0",
121121
"eslint-plugin-unused-imports": "^4.1.3",
122-
"eslint-plugin-vue": "^9.27.0",
122+
"eslint-plugin-vue": "^9.28.0",
123123
"eslint-plugin-yml": "^1.14.0",
124124
"eslint-processor-vue-blocks": "^0.1.2",
125125
"globals": "^15.9.0",
126126
"jsonc-eslint-parser": "^2.4.0",
127127
"local-pkg": "^0.5.0",
128128
"parse-gitignore": "^2.0.0",
129-
"picocolors": "^1.0.1",
129+
"picocolors": "^1.1.0",
130130
"toml-eslint-parser": "^0.10.0",
131131
"vue-eslint-parser": "^9.4.3",
132132
"yaml-eslint-parser": "^1.2.3",
@@ -135,13 +135,13 @@
135135
"devDependencies": {
136136
"@antfu/eslint-config": "workspace:*",
137137
"@antfu/ni": "^0.23.0",
138-
"@eslint-react/eslint-plugin": "^1.12.3",
138+
"@eslint-react/eslint-plugin": "^1.13.0",
139139
"@eslint/config-inspector": "^0.5.4",
140140
"@prettier/plugin-xml": "^3.4.1",
141-
"@stylistic/eslint-plugin-migrate": "^2.6.5",
141+
"@stylistic/eslint-plugin-migrate": "^2.7.2",
142142
"@types/eslint": "^9.6.1",
143143
"@types/fs-extra": "^11.0.4",
144-
"@types/node": "^22.5.1",
144+
"@types/node": "^22.5.3",
145145
"@types/prompts": "^2.4.9",
146146
"@types/yargs": "^17.0.33",
147147
"@unocss/eslint-plugin": "^0.62.3",
@@ -160,7 +160,7 @@
160160
"fast-glob": "^3.3.2",
161161
"fs-extra": "^11.2.0",
162162
"jiti": "^1.21.6",
163-
"lint-staged": "^15.2.9",
163+
"lint-staged": "^15.2.10",
164164
"prettier-plugin-astro": "^0.14.1",
165165
"prettier-plugin-slidev": "^1.0.5",
166166
"rimraf": "^6.0.1",
@@ -171,11 +171,11 @@
171171
"tsx": "^4.19.0",
172172
"typescript": "^5.5.4",
173173
"vitest": "^2.0.5",
174-
"vue": "^3.4.38"
174+
"vue": "^3.5.0"
175175
},
176176
"resolutions": {
177177
"@eslint-community/eslint-utils": "^4.4.0",
178-
"@typescript-eslint/utils": "^8.3.0",
178+
"@typescript-eslint/utils": "^8.4.0",
179179
"eslint": "^9.9.1",
180180
"tsx": "^4.19.0"
181181
},

‎pnpm-lock.yaml

+397-452
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/cli/stages/update-package-json.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ export async function updatePackageJson(result: PromptResult): Promise<void> {
1919

2020
pkg.devDependencies ??= {}
2121
pkg.devDependencies['@antfu/eslint-config'] = `^${pkgJson.version}`
22-
pkg.devDependencies.eslint ??= pkgJson.devDependencies.eslint
22+
pkg.devDependencies.eslint ??= pkgJson
23+
.devDependencies
24+
.eslint
2325
.replace('npm:eslint-ts-patch@', '')
2426
.replace(/-\d+$/, '')
2527

‎src/configs/stylistic.ts

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export async function stylistic(
4949
rules: {
5050
...config.rules,
5151

52+
'antfu/consistent-chaining': 'error',
5253
'antfu/consistent-list-newline': 'error',
5354

5455
...(lessOpinionated

0 commit comments

Comments
 (0)
Please sign in to comment.