Skip to content

Commit 3d12e69

Browse files
authored
feat: update typegen import (#21)
* chore: update dependencies * chore: allow js * feat: update typegen import * fix: prevent typescript warn overwrite input file * chore: dont remove files array
1 parent b23ce6f commit 3d12e69

File tree

8 files changed

+477
-563
lines changed

8 files changed

+477
-563
lines changed

.vscode/settings.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313

1414
"eslint.format.enable": true,
1515

16-
"eslint.options": {
17-
"flags": ["unstable_ts_config"]
18-
},
19-
2016
"eslint.runtime": "node",
2117

2218
// Silent the stylistic rules in you IDE, but still auto fix them

lint-staged.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
/** @type {import('lint-staged').Config} */
44
const config = {
5-
'*.?([cm])[jt]s?(x)': ['eslint --flag unstable_ts_config --fix'],
6-
'*.json?(c|5)': ['eslint --flag unstable_ts_config --fix'],
7-
'*.{md,htm,html,yml,yaml}': ['eslint --flag unstable_ts_config --fix'],
8-
'*.{c,le,sc,pc,postc}ss': ['eslint --flag unstable_ts_config --fix'],
5+
'*.?([cm])[jt]s?(x)': ['eslint --fix'],
6+
'*.json?(c|5)': ['eslint --fix'],
7+
'*.{md,htm,html,yml,yaml}': ['eslint --fix'],
8+
'*.{c,le,sc,pc,postc}ss': ['eslint --fix'],
99
}
1010

1111
export default config

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"test": "vitest --run --logHeapUsage",
2222
"coverage": "vitest run --coverage",
2323
"typegen": "tsx scripts/typegen.ts",
24-
"lint": "eslint --cache --flag unstable_ts_config .",
24+
"lint": "eslint --cache .",
2525
"prepare": "husky"
2626
},
2727
"devDependencies": {
@@ -33,11 +33,11 @@
3333
"@types/node": "^22.10.5",
3434
"@vitest/coverage-v8": "^2.1.8",
3535
"dprint": "^0.48.0",
36-
"eslint": "^9.17.0",
36+
"eslint": "^9.18.0",
3737
"eslint-typegen": "^1.0.0",
3838
"happy-dom": "^16.5.3",
3939
"husky": "^9.1.7",
40-
"jiek": "2.2.7",
40+
"jiek": "^2.3.3",
4141
"jiti": "^2.4.2",
4242
"lint-staged": "^15.3.0",
4343
"tsx": "^4.19.2",
@@ -46,8 +46,6 @@
4646
},
4747
"pnpm": {
4848
"overrides": {
49-
"@jiek/pkger": "npm:@jiek/[email protected]",
50-
"@jiek/rollup-plugin-dts": "npm:@jiek/[email protected]",
5149
"deep-equal": "npm:@nolyfill/deep-equal@^1",
5250
"is-core-module": "npm:@nolyfill/is-core-module@^1",
5351
"is-generator-function": "npm:@nolyfill/is-generator-function@^1",

packages/eslint-config/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@
1515
"./package.json": "./package.json",
1616
".": "./src/index.ts"
1717
},
18+
"imports": {
19+
"#typegen": "./typegen.d.ts"
20+
},
1821
"files": [
1922
"LICENSE",
2023
"README.md",
21-
"dist"
24+
"dist",
25+
"typegen.d.ts"
2226
],
2327
"publishConfig": {
2428
"provenance": true

packages/eslint-config/src/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import type { ConfigNames, RuleOptions } from '#typegen'
12
import type { Linter } from 'eslint'
23

3-
import type { ConfigNames, RuleOptions } from './typegen.d.ts'
4-
54
/**
65
* Copied from antfu/eslint-config
76
* Ref: https://github.com/antfu/eslint-config/blob/5d0c2a5ef25a7bc3a2d6d55c1ce157cc47b0bf55/src/types.ts#L9

0 commit comments

Comments
 (0)