Skip to content

Commit 646c9ef

Browse files
committed
feat: remove xo
1 parent 26f32d1 commit 646c9ef

File tree

6 files changed

+261
-3386
lines changed

6 files changed

+261
-3386
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 20 deletions
This file was deleted.

eslint.config.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import eslint from '@eslint/js'
2+
import tseslint from 'typescript-eslint'
3+
import prettier from 'eslint-config-prettier'
4+
5+
const config = [
6+
{ ignores: ['template/', 'outfile.js'] },
7+
{
8+
files: ['**/*.js', '**/*.ts'],
9+
linterOptions: { reportUnusedDisableDirectives: true },
10+
...eslint.configs.recommended,
11+
},
12+
{ files: ['**/*.js'], ...prettier },
13+
...tseslint.configs.recommendedTypeChecked.map((c) => ({
14+
...c,
15+
files: ['**/*.ts'],
16+
})),
17+
{
18+
files: ['**/*.ts'],
19+
languageOptions: {
20+
parserOptions: {
21+
projectService: true,
22+
tsconfigRootDir: import.meta.dirname,
23+
},
24+
},
25+
...prettier,
26+
},
27+
]
28+
29+
export default config

index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env node
22

3+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
4+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
35
import fs from 'node:fs'
46
import path from 'node:path'
57
import process from 'node:process'
@@ -258,7 +260,6 @@ ${getCommand(packageManager, 'test')}
258260
return readme
259261
}
260262

261-
// eslint-disable-next-line complexity
262263
async function init() {
263264
console.log()
264265
console.log(
@@ -369,6 +370,7 @@ async function init() {
369370
},
370371
},
371372
)
373+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
372374
} catch (error: any) {
373375
console.error(error.message)
374376
process.exit(1)

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"node": ">=18.19.1 <19 || >=20.6.1"
1616
},
1717
"scripts": {
18-
"format": "prettier --check \"**/*.{js,cjs,ts,json,md}\"",
19-
"lint": "eslint --ext .js,.cjs,.ts .",
18+
"format": "prettier --check \"**/*.{js,ts,json,md}\"",
19+
"lint": "eslint .",
2020
"type": "tsc --noEmit",
2121
"build": "tsc && mv index.js outfile.js"
2222
},
@@ -29,11 +29,14 @@
2929
"prompts": "^2.4.2"
3030
},
3131
"devDependencies": {
32+
"@eslint/js": "^9.22.0",
3233
"@types/ejs": "^3.1.5",
3334
"@types/node": "^22.13.10",
3435
"@types/prompts": "^2.4.9",
36+
"eslint": "^9.22.0",
37+
"eslint-config-prettier": "^10.1.1",
3538
"prettier": "^3.5.3",
3639
"typescript": "^5.8.2",
37-
"xo": "^0.60.0"
40+
"typescript-eslint": "^8.26.1"
3841
}
3942
}

0 commit comments

Comments
 (0)